RSA key check fails if header is -----BEGIN PRIVATE KEY-----
See original GitHub issueHi, I’m using Nginx Proxy Manager version 2.7.1 (latest pulled from dockerhub)
When uploading a custom SSL certificate an error occurs if the private key has the -----BEGIN PRIVATE KEY-----
instead of the -----BEGIN RSA PRIVATE KEY-----
By looking at the code, the following line in certificate.js
is responsible for the error
let key_type = private_key.includes('-----BEGIN RSA') ? 'rsa' : 'ec';
This causes the check to fail because the key is interpreted as ec instead of rsa.
I tried to manually run the openssl check command with my key and I get the expected result: RSA key ok
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
RSA key check fails if header is -----BEGIN PRIVATE KEY
Hi, I'm using Nginx Proxy Manager version 2.7.1 (latest pulled from dockerhub) When uploading a custom SSL certificate an error occurs if ......
Read more >What can I do if I'm getting an RSA Private Key is invalid error ...
If you are getting an RSA Private Key is invalid error when you try adding your .key file under Server > HTTPS &...
Read more >Differences between "BEGIN RSA PRIVATE KEY" and "BEGIN ...
For RSA keys, PKCS#1 contains CRT parameters, PKCS#8 doesn't. You can confirm this by looking at sizes. PKCS#8 is smaller even with more...
Read more >Questions on the variations of RSA keys
If the key is encrypted (PEM form only) it will contain extra header lines to indicate the encryption and IV, e.g.: -----BEGIN RSA...
Read more >ssh - Differences between "BEGIN RSA PRIVATE KEY" and ...
So as a result, OpenSSH created its own format for storing private keys (the one with BEGIN OPENSSH PRIVATE KEY headers), which uses...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Could you please check whether the issue still persists in this new pull request?
Use image
jc21/nginx-proxy-manager:github-pr-774
for this. Just change the tag from:latest
to:github-pr-774
in your docker-compose file.This image ( jc21/nginx-proxy-manager:github-pr-774 ) worked for me , thank you