Hi all, I have written a program which does RSA_private_decrypt() repeatedly with a private key given with PEM format.
I also derive private key with BIO_new_mem_buf() and PEM_read_bio_RSAPrivateKey() functions, so the brief code is as follows. bioPtr = BIO_new_mem_buf( InputPEMstring, -1 ); : prvkey = PEM_read_bio_RSAPrivateKey( bioPtr, NULL, NULL, NULL ); : RSA_private_decrypt( ..., prvkey, RSA_PKCS1_OAEP_PADDING ); /* We use OAEP */ It does work well as long as providing appropriate private keys. Buf if I provide wrong private key, RSA_private_decrypt() fails of course, and then next BIO_new_mem_buf() also fails with the error code 0x407A079 by ERR_get_error(). Do I need to call some initializing api after private decryption failure, before calling BIO_new_mem_buf() again, or is there any work around ? I'm using OpenSSL 0.9.8a on 2.4.21-4 Best regards, Tatsuya Tsurukawa ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]