On 01/06/2014 10:34 PM, Alan Cabrera wrote:
I should have obtained the DER form using i2d_RSA_PUBKEY(). Also,
passing buf to the method should have warned me that the pointer was
being modified. I have no idea why it gets modified and what it points
to after the call.
So now I do
There is currently a parsing bug when converting from PEM to DER.
I encountered this as well, but with DSA keys.
I suppose the same bug occurs with RSA keys.
In DSA the G component gets copied to the pub component when converting
from PEM to DER.
From DER to PEM works fine.
Regards,
Dereck
On Mon, Jan 06, 2014 at 09:02:22AM +0100, Dereck Hurtubise wrote:
There is currently a parsing bug when converting from PEM to DER.
I encountered this as well, but with DSA keys.
I suppose the same bug occurs with RSA keys.
No.
public_key = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL);
From
On Sun, Jan 05, 2014, Alan D. Cabrera wrote:
I've created a public key file using the following commands:
openssl genrsa -out mykey.pem 2046
openssl rsa -in mykey.pem -pubout mykey.pub
I then read it from some C code:
public_key = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL);
and then
On Jan 5, 2014, at 11:49 AM, Alan D. Cabrera l...@toolazydogs.com wrote:
I've created a public key file using the following commands:
openssl genrsa -out mykey.pem 2046
openssl rsa -in mykey.pem -pubout mykey.pub
I then read it from some C code:
public_key = PEM_read_RSA_PUBKEY(fp,
I've created a public key file using the following commands:
openssl genrsa -out mykey.pem 2046
openssl rsa -in mykey.pem -pubout mykey.pub
I then read it from some C code:
public_key = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL);
and then obtain the DER form of this public key:
int len =