Hi,
From http://www.openssl.org/docs/crypto/RSA_size.html:
rsa->n must not be NULL.
In your code, it probably is. RSA_new initializes the structure but
doesn't generate a key. Try calling RSA_generate_key() before RSA_size():
http://www.openssl.org/docs/crypto/RSA_generate_key.html
Hope it helps !
**
[EMAIL PROTECTED] wrote:
Hi everybody, I use openssl-0.9.7i to write a small program
on winxp, VC6.0
-----------------------------------------------------------
#include <stdio.h>
#include <openssl/rsa.h>
int main( int argc, char* argv[] )
{
RSA *rsa_obj ;
int size ;
CRYPTO_malloc_init() ;
rsa_obj = RSA_new();
size = RSA_size( rsa_obj ) ;
RSA_free(rsa_obj) ;
return 0 ;
}
-------------------------------------------------------
I have change library option as MD, but error occurs when
calling RSA_size(),
execution error is
Unhandled exception in main.exe(LIBEAY32.DLL):0xC0000005:Access Violation
What this message means ?
Thnaks
Lung Sheng Chien
Tsing Hua university, R.O.C
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]
--
Alain Damiral,
I hope this message makes me look like a very intelligent person
Université Catholique de Louvain - student
alain.damiral'at'student.info.ucl.ac.be
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]