I'm not a Delphi programmer, but I thought I'd try to provide some pointers.
First make sure that you create a new private key for your real application. Now that you have shared your private key with us, we do not need any open security holes.
Secondly, the ASN.1 format is generated using DER output from OpenSSL. The PEM format is just the base-64 encoding of the ASN.1 binary structure (and tokens are added).
You can return to DER in one of two ways:
1) . You can analyze and decode base 64 data in a PEM envelope. To do this, simply decode the data between the markers -----BEGIN/END RSA PRIVATE KEY----- .
Or, since you are still creating a new key ...;)
2) . You can use the -outform DER argument when creating your key using OpenSSL.
I'm not sure if this will work for your application, but maybe this will help you a little further.
TIP , to convert the PEM confirmation key to DER format, use the rsa utility in OpenSSL:
openssl rsa -inform PEM -outform DER -in privkey.pem -out privkey.der
jheddings
source share