From: <iro...@us...> - 2004-02-15 14:59:21
|
Update of /cvsroot/perl-openssl/Crypt/OpenSSL/RSA In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13136 Modified Files: RSA.xs Log Message: Give more verbose error strings Index: RSA.xs =================================================================== RCS file: /cvsroot/perl-openssl/Crypt/OpenSSL/RSA/RSA.xs,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** RSA.xs 15 Feb 2004 14:20:17 -0000 1.32 --- RSA.xs 15 Feb 2004 14:52:00 -0000 1.33 *************** *** 15,19 **** #define CHECK_OPEN_SSL(p_result) if (!(p_result)) \ ! croak("OpenSSL error: %s", ERR_reason_error_string(ERR_get_error())); /* convenience hv routines - I'm lazy */ --- 15,20 ---- #define CHECK_OPEN_SSL(p_result) if (!(p_result)) \ ! croak("OpenSSL error in %s at %d: %s", \ ! __FILE__, __LINE__, ERR_reason_error_string(ERR_get_error())); /* convenience hv routines - I'm lazy */ *************** *** 309,312 **** --- 310,314 ---- unsigned long exponent; CODE: + { if (items > 3) { *************** *** 317,320 **** --- 319,323 ---- CHECK_OPEN_SSL(rsa = RSA_generate_key(SvIV(bitsSV), exponent, NULL, NULL)) set_RSA_key(rsa_HV, rsa); + } SV* *************** *** 464,467 **** --- 467,471 ---- RSA* rsa; CODE: + { if (! is_private(rsa_HV)) { *************** *** 490,493 **** --- 494,498 ---- RETVAL = newSVpv(plaintext, plaintext_length); Safefree(plaintext); + } OUTPUT: RETVAL |