apt:🔑 puppetlabs-apt check now the full GPG fingerprints.

Since commit 531ef9 of puppetlabs-apt, the gpg key (apt::key) is
checked, and should use the long format.

This value is validated with a regex enforcing it to only contain valid
hexadecimal characters, be precisely 8 or 16 hexadecimal characters long
and optionally prefixed with 0x for key IDs, or 40 hexadecimal
characters long for key fingerprints.

f588f2651a
This commit is contained in:
Sebastien Badia 2015-03-19 15:34:42 +01:00
parent 82bda98f22
commit 5f1da4fce9
2 changed files with 4 additions and 4 deletions

View file

@ -36,7 +36,7 @@ class nginx::package::debian(
apt::source { 'nginx':
location => "http://nginx.org/packages/${distro}",
repos => 'nginx',
key => '7BD9BF62',
key => 'ABF5BD827BD9BF62',
key_source => 'http://nginx.org/keys/nginx_signing.key',
}
}
@ -44,7 +44,7 @@ class nginx::package::debian(
apt::source { 'nginx':
location => "http://nginx.org/packages/mainline/${distro}",
repos => 'nginx',
key => '7BD9BF62',
key => 'ABF5BD827BD9BF62',
key_source => 'http://nginx.org/keys/nginx_signing.key',
}
}
@ -61,7 +61,7 @@ class nginx::package::debian(
ensure => 'present',
require => Exec['apt_update'],
}
if $package_name != 'nginx-extras' {
warning('You must set $package_name to "nginx-extras" to enable Passenger')
}

View file

@ -67,7 +67,7 @@ describe 'nginx::package' do
it { is_expected.to contain_apt__source('nginx').with(
'location' => "http://nginx.org/packages/#{operatingsystem.downcase}",
'repos' => 'nginx',
'key' => '7BD9BF62',
'key' => 'ABF5BD827BD9BF62',
'key_source' => 'http://nginx.org/keys/nginx_signing.key'
)}
it { is_expected.to contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::debian]') }