Bug #7110
Better SSL error message when retrieved certificate does not match private key
| Status: | Closed | Start date: | 04/14/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | SSL | |||
| Target version: | 2.7.10 | |||
| Affected Puppet version: | 2.6.0 | Branch: | ||
| Keywords: | ||||
Description
If you try to connect to a puppet master fort the first time using an agent that already has a signed cert on the master (this may happen if you need to wipe your agent but forget to revoke the dead agent’s cert on the master), you get the following:
/Users/matthewrobinson/work/puppet/lib/puppet/ssl/host.rb:166:in `certificate'
/Users/matthewrobinson/work/puppet/lib/puppet/ssl/host.rb:227:in `wait_for_cert'
/Users/matthewrobinson/work/puppet/lib/puppet/application/agent.rb:194:in `setup_host'
/Users/matthewrobinson/work/puppet/lib/puppet/application/agent.rb:259:in `setup'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:304:in `run'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:420:in `hook'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:304:in `run'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:411:in `exit_on_fail'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:304:in `run'
/Users/matthewrobinson/work/puppet/sbin/puppetd:4
err: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from
server and regenerate it with the current key
The error message should say which retrieved certificate (presumably it’s retrieving the the already signed cert for the old agent) and which private key (presumably it’s the private key that was generated before sending a CSR to the master) don’t match. This could be done by including the CN for the cert and some fingerprints or something so you can tell what doesn’t match what. And then some more detail on HOW to remove the certificate from the server would be helpful.
Related issues
History
#1
Updated by James Turnbull about 2 years ago
- Category set to SSL
- Status changed from Unreviewed to Accepted
#2
Updated by Joshua Lifton over 1 year ago
- Assignee set to Joshua Lifton
I recently ran into this issue as well. I’m working on a fix.
#3
Updated by Joshua Lifton over 1 year ago
- Status changed from Accepted to In Topic Branch Pending Review
See pull request 249 (https://github.com/puppetlabs/puppet/pull/249/).
#4
Updated by Jeff McCune over 1 year ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
Merged¶
Merged into master as: https://github.com/puppetlabs/puppet/commit/94bdc38086e757f53573a88ce9ebec5d667ed9a4
#5
Updated by Jeff McCune over 1 year ago
Merged into 2.7.x¶
The same commit has also been merged into 2.7.x as https://github.com/puppetlabs/puppet/commit/0f56154d3cdcb49106dd1a17687dd69492f02be4
#6
Updated by Michael Stahnke over 1 year ago
- Status changed from Merged - Pending Release to Closed
- Target version set to 2.7.10
released in 2.7.10rc1