root@apt:~# puppet agent --test --noopinfo: Creating a new SSL key for apt.example.comwarning: peer certificate won't be verified in this SSL sessioninfo: Caching certificate for apt.example.comerr: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current keyExiting; failed to retrieve certificate and waitforcert is disabled
root@puppet:~# puppet cert --revoke apt.example.comnotice: Revoked certificate with serial 3
root@apt:~# puppet agent --test --nooperr: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current keyExiting; failed to retrieve certificate and waitforcert is disabled
root@apt:~# puppet agent --test --noopinfo: Creating a new SSL key for apt.example.comwarning: peer certificate won't be verified in this SSL sessioninfo: Caching certificate for cawarning: peer certificate won't be verified in this SSL sessioninfo: Caching certificate for apt.example.comerr: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current keyExiting; failed to retrieve certificate and waitforcert is disabled
root@apt:~# cat /etc/debian_version6.0.2root@apt:~# puppet --version2.7.1
You can remove the client certificate entirely with:
puppetca --clean apt.example.com
A new one will then be generated next time you connect.
LS
--
Laurence Southon
Tiger Computing, Bexley
www.tiger-computing.co.uk
On 20/08/11 01:13, Brian Troutwine wrote:You can remove the client certificate entirely with:
> How do I actually revoke a faulty certificate?
puppetca --clean apt.example.com
A new one will then be generated next time you connect.
LS
--
Laurence Southon
Tiger Computing, Bexley
www.tiger-computing.co.uk
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Sat, Aug 20, 2011 at 10:04 AM, Laurence Southon <l...@tiger-computing.co.uk> wrote:On 20/08/11 01:13, Brian Troutwine wrote:You can remove the client certificate entirely with:
> How do I actually revoke a faulty certificate?
puppetca --clean apt.example.comI overlooked that entirely. Thank you.
# puppet cert --clean apt.example.comnotice: Revoked certificate with serial # Inventory of signed certificates# SERIAL NOT_BEFORE NOT_AFTER SUBJECT0x0001 2011-08-19T18:20:48GMT 2016-08-17T18:20:48GMT /CN=Puppet CA: puppet.example.com0x0002 2011-08-19T18:20:48GMT 2016-08-17T18:20:48GMT /CN=puppet.example.com0x0003 2011-08-19T18:21:46GMT 2016-08-17T18:21:46GMT /CN=gateway.example.com
err: Could not call revoke: Cannot convert into OpenSSL::BN
# puppet agent --test --noopinfo: Creating a new SSL key for apt.example.comwarning: peer certificate won't be verified in this SSL sessionwarning: peer certificate won't be verified in this SSL session
info: Creating a new SSL certificate request for apt.example.cominfo: Certificate Request fingerprint (md5): FB:05:0D:41:C8:46:3C:44:EE:AC:9D:48:4E:4A:CC:FB
warning: peer certificate won't be verified in this SSL sessionwarning: peer certificate won't be verified in this SSL sessioninfo: Caching certificate for apt.example.com
err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failedwarning: Not using cache on failed catalogerr: Could not retrieve catalog; skipping run
A new one will then be generated next time you connect.
LS
--
Laurence Southon
Tiger Computing, Bexley
www.tiger-computing.co.uk
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
--
Brian L. Troutwine
# puppet cert --list --all+ apt.example.com (4C:FB:40:5B:9F:0F:CB:8B:78:57:78:D2:34:3F:8F:9B)+ puppet.example.com (C5:37:33:6A:1D:AB:60:55:61:05:55:05:03:56:35:45)
# puppet cert --clean apt.example.com
notice: Revoked certificate with serial 3notice: Removing file Puppet::SSL::Certificate apt.example.com at '/var/lib/puppet/ssl/ca/signed/apt.example.com.pem'notice: Removing file Puppet::SSL::Certificate apt.example.com at '/var/lib/puppet/ssl/certs/apt.example.com.pem'
# puppet agent --test --noop
err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failedwarning: Not using cache on failed catalogerr: Could not retrieve catalog; skipping run
--A new one will then be generated next time you connect.
LS
--
Laurence Southon
Tiger Computing, Bexley
www.tiger-computing.co.uk
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
--
Brian L. Troutwine
Brian L. Troutwine
Hi,Are you calling the puppet run with the '--server <puppetmaster>' parameter?
With SSL you basically need the following:* working DNS* clocks in sync
* correct certnames
To help solve SSL issues also use 'openssl s_client' to test connections, check certnames and other errors.
This is a definitive reference on puppet and SSL.There is a newer doc than this on puppet docs site but can't find it at the moment:
# puppet agent --test --noopinfo: Creating a new SSL key for apt.example.comwarning: peer certificate won't be verified in this SSL session
info: Caching certificate for ca
warning: peer certificate won't be verified in this SSL sessioninfo: Caching certificate for apt.example.com
err: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current keyExiting; failed to retrieve certificate and waitforcert is disabled
# puppet cert --clean apt.example.com
notice: Revoked certificate with serial 4
notice: Removing file Puppet::SSL::Certificate apt.example.com at '/var/lib/puppet/ssl/ca/signed/apt.example.com.pem'notice: Removing file Puppet::SSL::Certificate apt.example.com at '/var/lib/puppet/ssl/certs/apt.example.com.pem'
# puppet agent --test --noop
err: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current keyExiting; failed to retrieve certificate and waitforcert is disabled
root@apt:~# openssl s_client -host puppet -port 8139 -cert /var/lib/puppet/ssl/certs/apt.example.com.pem -key /var/lib/puppet/ssl/private_keys/apt.example.com.pem -CAfile /var/lib/puppet/ssl/certs/ca.pemerror setting private key732:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:x509_cmp.c:406:
# openssl s_client -host puppet -port 8139 -cert /var/lib/puppet/ssl/certs/apt.example.com.pem -key /var/lib/puppet/ssl/private_keys/apt.example.com.pem -CAfile /var/lib/puppet/ssl/certs/ca.pemconnect: Connection refusedconnect:errno=111
# puppet agent --server puppet.example.com --test
Hi,
The standard port is 8140, are you using a different port?
You will need to pass --server on the puppet agent. The command line is different from the daemon config.
With certnames, your --servername must match the DNS name of the master. So using openssl s_client --connect <puppetmaster:8140> you should see the certname in the response. If that is different from the dns name then you will have issues (which can be solved through the puppet.conf certname directive).
Lastly it always good to run the same versions on client and server I find. So it's all running now?
To make sure you have a clean client and master knows nothing about it, (ssl-wise) do the following:on master:puppetca --clean client.example.comon client:rm -r /var/lib/puppet/sslpuppetd --test
back to master:puppetca --list (to check for the signing request from client)puppetca --sign client.example.comon client:puppetd --testand you shouldnt have any issues with ssl-connection. (if time/dns etc is correct).Nicolai Mollerup
--You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Ssoxy6kT-f0J.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.