Home | History | Annotate | Download | only in apps

Lines Matching refs:rsa

1 /* apps/rsa.c */
11 * apply to all code found in this distribution, be it the RC4, RSA,
68 #include <openssl/rsa.h>
92 * -modulus - print the RSA key modulus
104 RSA *rsa=NULL;
240 BIO_printf(bio_err," -modulus print the RSA key modulus\n");
296 rsa = EVP_PKEY_get1_RSA(pkey);
300 if (rsa == NULL)
326 if (!RSA_print(out,rsa,0))
336 BN_print(out,rsa->n);
342 int r = RSA_check_key(rsa);
345 BIO_printf(out,"RSA key ok\n");
355 BIO_printf(out, "RSA key error: %s\n", ERR_reason_error_string(err));
372 BIO_printf(bio_err,"writing RSA key\n");
377 i=i2d_RSAPublicKey_bio(out,rsa);
379 i=i2d_RSA_PUBKEY_bio(out,rsa);
381 else i=i2d_RSAPrivateKey_bio(out,rsa);
390 size=i2d_RSA_NET(rsa,NULL,NULL, sgckey);
397 i2d_RSA_NET(rsa,&p,NULL, sgckey);
406 i=PEM_write_bio_RSAPublicKey(out,rsa);
408 i=PEM_write_bio_RSA_PUBKEY(out,rsa);
410 else i=PEM_write_bio_RSAPrivateKey(out,rsa,
416 EVP_PKEY_set1_RSA(pk, rsa);
438 if(rsa != NULL) RSA_free(rsa);