+# frozen_string_literal: true
+
require 'pathname'
require 'puppet/parameter/boolean'
if self[:content] && self[:source]
raise(_('The properties content and source are mutually exclusive.'))
end
+
if self[:id].length < 40
warning(_('The id should be a full fingerprint (40 characters), see README.'))
end
desc 'The key server to fetch the key from based on the ID. It can either be a domain name or url.'
defaultto :'keyserver.ubuntu.com'
- newvalues(%r{\A((hkp|http|https)://)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$})
+ newvalues(%r{\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_.]+)*\/?$})
end
newparam(:options) do
newparam(:refresh, boolean: true, parent: Puppet::Parameter::Boolean) do
desc 'When true, recreate an existing expired key'
+ defaultto false
+ end
+
+ newparam(:weak_ssl, boolean: true, parent: Puppet::Parameter::Boolean) do
+ desc 'When true and source uses https, accepts download of keys without SSL verification'
+ defaultto false
end
newproperty(:fingerprint) do