> RSA_public_encrypt(size, inText, sigBuffer, rsaPubKey,
RSA_PKCS1_OAEP_PADDING);

Ooops, you just threw away the return value from RSA_public_encrypt. So how
are you going to know how big the signature is?

> sigretVal = RSA_size(rsaPrivKey);
> unsigned char *plainText = new unsigned char[sigretVal];
> int encSize = strlen((char*)sigBuffer);

Ooops, you just called 'strlen' on something other than a C-style string.
The results of doing that are garbage.

Did you mean to convert the signature to a C-style string in base64 or
something? What exactly are you trying to do? (What format do you want the
signature in?)

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to