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
ising and then deserialising the > key. I've read the other posts to the list on this, but I > haven't had any luck. > > Here's my problem - The deserialised key does not match > the original public key: > > // Code beginning > > int serialisedPublic

i2d_RSAPublicKey/d2i_RSAPublicKey problem redux

2009-08-01 Thread Conor
to the list on this, but I haven't had any luck. Here's my problem - The deserialised key does not match the original public key: // Code beginning int serialisedPublicKeySize = i2d_RSAPublicKey(ourKeyPair->pub_key, NULL); unsigned char* serialisedPublicKey = new unsigned

Re: i2d_RSAPublicKey,d2i_RSAPublicKey

2000-12-05 Thread Nacho Diaz Asenjo
t; > unsigned char *ptr; > int derlen > ptr=keystr; > derlen=i2d_RSAPublicKey(rsa,&ptr); > ptr=keystr; > > In a function B: > > >unsigned char *ptr; > int len; > > ptr=keystr; //keystr is a param but its value is equal keystr in > function A

i2d_RSAPublicKey,d2i_RSAPublicKey

2000-12-01 Thread Rafa Marín López
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=keystr; derlen=i2d_RSAPublicKey(rsa,&ptr); ptr=keystr; In a function B: unsigned char

i2d_RSAPublicKey, d2i_RSAPubliKey.

2000-12-01 Thread Rafa Marín López
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=keystr; derlen=i2d_RSAPublicKey(rsa,&ptr); ptr=keystr; In a function B: unsigned char

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 k

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? > >

i2d_RSAPublicKey

2000-11-30 Thread Rafa Marín López
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 cor