RE: Can't get RSA object from .pem file after base64 decoding it

2010-07-12 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Carlos Saldaña > Sent: Monday, 12 July, 2010 10:50 > Here's another approach for the same porpuse and it seems to work!, > can you please help me to optimize my implementation? Do you mean 'optimize' as just 'make better', o

Re: Can't get RSA object from .pem file after base64 decoding it

2010-07-12 Thread Ger Hobbelt
2010/7/12 Carlos Saldaña > unsigned char encrypted[2560] = { 0 }; > int resultEncrypt = 0; > > resultEncrypt = RSA_public_encrypt ( strlen(text) + 1 , (unsigned char > *)text, encrypted, rsa_rpu, RSA_PKCS1_OAEP_PADDING ); > NSLog(@"%d from encrypt.", resultEncrypt); > //This line prin

Re: Can't get RSA object from .pem file after base64 decoding it

2010-07-12 Thread Carlos Saldaña
Here's another approach for the same porpuse and it seems to work!, can you please help me to optimize my implementation? Thanks in advance. void encryptThis () { FILE *fp; RSA *rsa_rpu=NULL; fp = fopen([[[NSBundle mainBundle] pathForResource:@"publickey" ofType:@ "pem"]UTF8String],"r"); rsa_rpu

RE: Can't get RSA object from .pem file after base64 decoding it

2010-07-09 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Carlos Saldaña > Sent: Friday, 09 July, 2010 12:48 > Thanks for answer Dave, > Actually what I'm trying to do is encode messages using the public key > presumably encoded in a .pem file. I checked the contents of this

Re: Can't get RSA object from .pem file after base64 decoding it

2010-07-09 Thread Carlos Saldaña
Thanks for answer Dave, Actually what I'm trying to do is encode messages using the public key presumably encoded in a .pem file. I checked the contents of this .pem file and ir has the -BEGIN PUBLIC KEY- and -END PUBLIC KEY- headers. I fixed my code to take away this headers and t

RE: Can't get RSA object from .pem file after base64 decoding it

2010-07-08 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Carlos Saldaña > Sent: Thursday, 08 July, 2010 18:51 > I'm to openssl and PKI in general and got a problem whit decrypting in my application. > My partners provided me with two files: publickey.x509 and publickey.pem >

Can't get RSA object from .pem file after base64 decoding it

2010-07-08 Thread Carlos Saldaña
Hi, I'm to openssl and PKI in general and got a problem whit decrypting in my application. My partners provided me with two files: publickey.x509 and publickey.pem to find a wy to send messages between server and my client application. So far I've dicovered that .pem files are just base64 encoded