Re: i2d_RSAPublicKey/d2i_RSAPublicKey problem redux

2009-08-01 Thread Conor
> Well memcmp certainly wont work with an RSA structure, it contains pointers > which will differ even for the same key. > > You can check the values by calling BN_cmp() on rsa->n and rsa->e . Marvelous. That's solved my problem. Thank you for your time and input Dr. Henson. _

Re: i2d_RSAPublicKey/d2i_RSAPublicKey problem redux

2009-08-01 Thread Dr. Stephen Henson
On Sat, Aug 01, 2009, Conor wrote: > Greetings community, > > Alright, I'm trying to serialise a RSA public key and then > deserialise it again; Later the key will be serialised and > then deserialised on the other end of a TCP connection. > For now, I'm just serialising and then deserialising th

Re: i2d_RSAPublicKey,d2i_RSAPublicKey

2000-12-05 Thread Nacho Diaz Asenjo
El vie, 01 de dic de 2000, a las 18:27, Rafa Marín López escribió: > Hello. > > > I have a problem with this situation: > > I have this code in function A: > > char keystr[1024]; > > > ... > RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL); > > unsigned char *ptr; > int derlen > ptr

Re: i2d_RSAPublicKey

2000-11-30 Thread Goetz Babin-Ebell
Rafa Marín López wrote: > Hello, all. Hello, > I have executed this instruction: > > char keystr[1024]; > > RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL); > > i2d_RSAPublicKey(rsa,&(keystr)); &keystr is a I/O parameter, pointing past the DER coded key. You must use something like:

Re: i2d_RSAPublicKey

2000-11-30 Thread Dr S N Henson
Rafa Marín López wrote: > > Hello, all. > > I have executed this instruction: > > char keystr[1024]; > > RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL); > > i2d_RSAPublicKey(rsa,&(keystr)); > > But resultant keystr is zeroed. Why? > > I have verified the RSA key pair and they are co