Feature #1257
openHandle encypted CA/Certificate private keys
Added by Brad Langhorst almost 14 years ago. Updated about 4 years ago.
0%
Description
when i export a certificate using
http://192.168.3.1/system_certmanager.php
i get an empty file.
the private key downloads just fine.
Updated by Brad Langhorst almost 14 years ago
upon further investigation, i see that the crt was not saved.
here's a bit of the config file.
<descr><![CDATA[walden]]></descr>
<caref>4d460d3298bb2</caref>
<crt/>
<prv>I REMOVED THIS ONE THE OTHER ONE IS BLANK</prv>
</cert>
Updated by Brad Langhorst almost 14 years ago
the title of this bug should be "certificate file is not properly generated or saved." using internal cert auth
Updated by Jim Pingle almost 14 years ago
- Status changed from New to Rejected
I can't replicate this - I can make certificates several different ways on current snapshots and they are complete inside of the config.
You might want to make a thread on the forum with more detail about exactly how you are creating the certificates, there may be something else going on, but the certificate generation code appears to be working properly.
Updated by Brad Langhorst almost 14 years ago
Seems to be related to importing of a certificate authority.
To isolate a bit... I created an internal certificate authority and generated a cert.
This one looks fine.
I still cannot create certs when i choose the pre-existing cert authority that I created outside of pfsense
(using openssl/tinyca2)
I looked for some kind of log to show what commands php is trying to run, but didn't find one.
How can i help debug this problem?
Updated by Jim Pingle almost 14 years ago
When you imported the CA, did you import both the cert and private key of the CA?
All of the certificates are made in certs.inc. The code is laid out pretty well there, shouldn't be hard to see what commands are run.
Updated by Brad Langhorst almost 14 years ago
One more clarification...
I just checked and see that the private key is encrypted, so cert signing must fail since it never asks for a password.
- ask for a password before attempting to sign a new cert (my favorite option)
- don't allow encrypted private keys (probably not a great idea), and reject an invalid key during import
- don't allow creation of new certs if no usable key is available for the selected cert
Certificate generation works if I paste in the unencrypted ca key, though this strikes me as a poor security practice.
At minimum, I think the user should be notified if the a new cert cannot be generated.
Updated by Jim Pingle almost 14 years ago
- Subject changed from exported certificate files are empty to Handle encypted CA private keys
- Status changed from Rejected to New
- Target version deleted (
2.0) - Affected Architecture All added
- Affected Architecture deleted (
)
Not sure if this will make 2.0 or not. It may have to wait for 2.1 at this point, it may end up a documented limitation for 2.0 because it works fine for certificates made and managed in the GUI.
Updated by Peter Feichtinger over 5 years ago
I made a preliminary PR that adds support for encrypted private keys to the CA, certificate, and user managers.
Would love to get some feedback: https://github.com/pfsense/pfsense/pull/4062
Updated by Jim Pingle over 5 years ago
- Subject changed from Handle encypted CA private keys to Handle encypted CA/Certificate private keys
Updated by Jim Pingle about 5 years ago
- Status changed from New to Pull Request Review
- Target version set to 2.5.0
Updated by Renato Botelho about 4 years ago
- Target version changed from 2.5.0 to Future
Moving to Future due to lack of activity on proposed Pull Request