Lines Matching refs:rsa

69 	int			(*orig_finish)(RSA *rsa);
175 pkcs11_rsa_finish(RSA *rsa) in pkcs11_rsa_finish() argument
180 if ((k11 = RSA_get_app_data(rsa)) != NULL) { in pkcs11_rsa_finish()
182 rv = k11->orig_finish(rsa); in pkcs11_rsa_finish()
221 pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, in pkcs11_rsa_private_encrypt() argument
246 if ((k11 = RSA_get_app_data(rsa)) == NULL) { in pkcs11_rsa_private_encrypt()
247 error("RSA_get_app_data failed for rsa %p", rsa); in pkcs11_rsa_private_encrypt()
251 error("no pkcs11 (valid) provider for rsa %p", rsa); in pkcs11_rsa_private_encrypt()
294 tlen = RSA_size(rsa); in pkcs11_rsa_private_encrypt()
305 pkcs11_rsa_private_decrypt(int flen, const u_char *from, u_char *to, RSA *rsa, in pkcs11_rsa_private_decrypt() argument
314 CK_ATTRIBUTE *keyid_attrib, RSA *rsa) in pkcs11_rsa_wrap() argument
333 RSA_set_method(rsa, &k11->rsa_method); in pkcs11_rsa_wrap()
334 RSA_set_app_data(rsa, k11); in pkcs11_rsa_wrap()
451 RSA *rsa; in pkcs11_fetch_keys_filter() local
505 rsa = NULL; in pkcs11_fetch_keys_filter()
510 if ((rsa = RSA_new()) == NULL) { in pkcs11_fetch_keys_filter()
513 rsa->n = BN_bin2bn(attribs[1].pValue, in pkcs11_fetch_keys_filter()
515 rsa->e = BN_bin2bn(attribs[2].pValue, in pkcs11_fetch_keys_filter()
527 evp->pkey.rsa == NULL) { in pkcs11_fetch_keys_filter()
529 } else if ((rsa = RSAPublicKey_dup(evp->pkey.rsa)) in pkcs11_fetch_keys_filter()
536 if (rsa && rsa->n && rsa->e && in pkcs11_fetch_keys_filter()
537 pkcs11_rsa_wrap(p, slotidx, &attribs[0], rsa) == 0) { in pkcs11_fetch_keys_filter()
539 key->rsa = rsa; in pkcs11_fetch_keys_filter()
552 } else if (rsa) { in pkcs11_fetch_keys_filter()
553 RSA_free(rsa); in pkcs11_fetch_keys_filter()