--- [EMAIL PROTECTED] wrote:
> Hello openssl-users, > > I generate an RSA key-pair like this: > openssl genrsa 1024 > And put it's output into a PEM file. > Now I need to read both private and public parts > of the key-pair > into an RSA object in a program. > > This is how I try handling the PEM: > > fp = fopen( priv_exp, "rb" ); > if( NULL == fp ) > { > printf( "file not found '%s'\n", > priv_exp ); > exit( EXIT_FAILURE ); > } > > ca_rsa = PEM_read_RSAPrivateKey( fp, NULL, > NULL, NULL ); > if( NULL == ca_rsa ) > { > printf( "Failed\n" ); > exit( EXIT_FAILURE ); > } > > > If the key is unprotected - this works, if the key > is protected - it > fails. The book tells about some "default password > callback > function", which should be called if the third and > fourth parameters > are NULL. > I do not see any pass phrase promtps. Why? > > Please comment. > > Thank you in advance. The third of fourth is the function pointer for the passwd callback. Unless you pass it, how on earth will OpenSSL know which function to invoke for obtaining the password? > > -- > Best regards, > Tony mailto:[EMAIL PROTECTED] > > ______________________________________________________________________ > OpenSSL Project > http://www.openssl.org > User Support Mailing List > openssl-users@openssl.org > Automated List Manager > [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]