Lines Matching refs:rsa
40 static int convert_to_mincrypt_format(RSA *rsa, RSAPublicKey *pkey) in convert_to_mincrypt_format() argument
45 if (RSA_size(rsa) != RSANUMBYTES) in convert_to_mincrypt_format()
57 BN_copy(n, rsa->n); in convert_to_mincrypt_format()
71 pkey->exponent = BN_get_word(rsa->e); in convert_to_mincrypt_format()
119 RSA *rsa = NULL; in convert_x509() local
144 rsa = EVP_PKEY_get1_RSA(pkey); in convert_x509()
145 if (!rsa) { in convert_x509()
150 if (write_public_keyfile(rsa, key_file) < 0) { in convert_x509()
167 if (rsa) { in convert_x509()
168 RSA_free(rsa); in convert_x509()
178 RSA* rsa = RSA_new(); in generate_key() local
182 if (!pkey || !exponent || !rsa) { in generate_key()
188 RSA_generate_key_ex(rsa, 2048, exponent, NULL); in generate_key()
189 EVP_PKEY_set1_RSA(pkey, rsa); in generate_key()
202 if (write_public_keyfile(rsa, file) < 0) { in generate_key()
213 RSA_free(rsa); in generate_key()