Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

private key files and password protected private key files #46

Open
james-ctc opened this issue Feb 15, 2024 · 1 comment
Open

private key files and password protected private key files #46

james-ctc opened this issue Feb 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@james-ctc
Copy link
Collaborator

There is the option to protect private keys with a password (passed to the constructor of EvseSecurity).
The result is a PEM file that starts "-----BEGIN ENCRYPTED PRIVATE KEY-----"
When there is no password the following would be expected: "-----BEGIN PRIVATE KEY-----"
(TPM keys start with other strings)

At the moment when there is no password specified an empty password is used and the resulting file is still "-----BEGIN ENCRYPTED PRIVATE KEY-----".

I was hoping to use a generated key for mosquitto TLS and mosquitto doesn't support encrypted private key files.
My work around is to use OpenSSL to remove the encryption:

openssl pkey -in encrypted_key.pem -passin "pass:" -out unencrypted_key.pem

Perhaps EvseSecurity should be updated to generate unencrypted key files when no password is specified (which would match expectation).

@james-ctc james-ctc added the bug Something isn't working label Feb 15, 2024
@AssemblyJohn
Copy link
Collaborator

Certainly not intended behavior, will look into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants