I shouldn't put all the blame on openSSL, I was trying to use Bouncy Castle.
The problem appears to be that a file began with
-----BEGIN RSA PRIVATE KEY-----
instead of this
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,913379F68EA66ADB
I would think that Bouncy Castle would detect this but apparently, I'm wrong.
Instead Bouncy Castle continues on its merry way, until it tries to get the decryption algorithm, at which point it throws the following exception:
org.bouncycastle.pkcs.PKCSException: unable to read encrypted data: unknown algorithm
Hence, my wasted day.
No comments:
Post a Comment