Open einarpersson opened 5 years ago
Probably relates to https://unix.stackexchange.com/questions/415970/openssl-genpkey-algorithm-rsa-vs-genrsa
openssl rsa encloses them in BEGIN RSA PRIVATE KEY and END RSA PRIVATE KEY while openssl genpkey omits the RSA. The former is PKCS#1 format, while the latter is PKCS#8.
So this lib should accept both formats
(generated through
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
andopenssl rsa -pubout -in private_key.pem -out public_key.pem
)