| /freebsd/crypto/openssl/test/ |
| H A D | evp_pkey_provided_test.c | 352 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in test_fromdata_rsa() local 401 EVP_PKEY_CTX_free(key_ctx); in test_fromdata_rsa() 402 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, ""))) in test_fromdata_rsa() 405 if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0) in test_fromdata_rsa() 406 || !TEST_int_gt(EVP_PKEY_public_check(key_ctx), 0) in test_fromdata_rsa() 407 || !TEST_int_gt(EVP_PKEY_private_check(key_ctx), 0) in test_fromdata_rsa() 408 || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0)) in test_fromdata_rsa() 445 EVP_PKEY_CTX_free(key_ctx); in test_fromdata_rsa() 464 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in do_fromdata_rsa_derive() local 504 EVP_PKEY_CTX_free(key_ctx); in do_fromdata_rsa_derive() [all …]
|
| H A D | acvp_test.c | 218 EVP_PKEY_CTX *key_ctx = NULL; in ecdsa_pub_verify_test() local 226 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, "")) in ecdsa_pub_verify_test() 227 || !TEST_int_eq(EVP_PKEY_public_check(key_ctx), tst->pass)) in ecdsa_pub_verify_test() 233 EVP_PKEY_CTX_free(key_ctx); in ecdsa_pub_verify_test() 477 EVP_PKEY_CTX *key_ctx = NULL; in eddsa_pub_verify_test() local 484 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, "")) in eddsa_pub_verify_test() 485 || !TEST_int_eq(EVP_PKEY_public_check(key_ctx), tst->pass)) in eddsa_pub_verify_test() 490 EVP_PKEY_CTX_free(key_ctx); in eddsa_pub_verify_test() 726 EVP_PKEY_CTX *key_ctx = NULL; in dsa_pqver_test() local 737 || !TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(libctx, param_key, in dsa_pqver_test() [all …]
|
| H A D | evp_extra_test.c | 3872 EVP_PKEY_CTX *key_ctx = NULL; in test_RSA_OAEP_set_get_params() local 3878 || !TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(0, key, 0))) in test_RSA_OAEP_set_get_params() 3892 if (!TEST_int_gt(EVP_PKEY_encrypt_init_ex(key_ctx, params), 0)) in test_RSA_OAEP_set_get_params() 3906 if (!TEST_true(EVP_PKEY_CTX_get_params(key_ctx, params))) in test_RSA_OAEP_set_get_params() 3918 EVP_PKEY_CTX_free(key_ctx); in test_RSA_OAEP_set_get_params() 3928 EVP_PKEY_CTX *key_ctx = NULL; in test_RSA_OAEP_set_null_label() local 3931 || !TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(testctx, key, NULL)) in test_RSA_OAEP_set_null_label() 3932 || !TEST_true(EVP_PKEY_encrypt_init(key_ctx))) in test_RSA_OAEP_set_null_label() 3935 if (!TEST_true(EVP_PKEY_CTX_set_rsa_padding(key_ctx, RSA_PKCS1_OAEP_PADDING))) in test_RSA_OAEP_set_null_label() 3938 if (!TEST_true(EVP_PKEY_CTX_set0_rsa_oaep_label(key_ctx, OPENSSL_strdup("foo"), 0))) in test_RSA_OAEP_set_null_label() [all …]
|
| /freebsd/sys/dev/cxgbe/crypto/ |
| H A D | t4_crypto.c | 573 memcpy(crwr->key_ctx.key, s->hmac.pads, kctx_len); in ccr_hash() 577 crwr->key_ctx.ctx_hdr = htobe32(V_KEY_CONTEXT_CTX_LEN(kctx_flits) | in ccr_hash() 738 crwr->key_ctx.ctx_hdr = s->cipher.key_ctx_hdr; in ccr_cipher() 742 memcpy(crwr->key_ctx.key, s->cipher.enckey, in ccr_cipher() 745 memcpy(crwr->key_ctx.key, s->cipher.deckey, in ccr_cipher() 749 memcpy(crwr->key_ctx.key, s->cipher.enckey, in ccr_cipher() 754 memcpy(crwr->key_ctx.key, s->cipher.enckey + key_half, in ccr_cipher() 757 memcpy(crwr->key_ctx.key + key_half, in ccr_cipher() 760 memcpy(crwr->key_ctx.key + key_half, in ccr_cipher() 1046 crwr->key_ctx in ccr_eta() [all...] |
| H A D | t4_crypto.h | 51 struct _key_ctx key_ctx; member 217 union key_ctx { 216 union key_ctx { global() union
|
| /freebsd/crypto/openssl/providers/fips/ |
| H A D | self_test_kats.c | 614 EVP_PKEY_CTX *key_ctx = NULL; in self_test_asym_keygen() local 621 key_ctx = EVP_PKEY_CTX_new_from_name(libctx, t->algorithm, NULL); in self_test_asym_keygen() 622 if (key_ctx == NULL) in self_test_asym_keygen() 629 if (EVP_PKEY_keygen_init(key_ctx) != 1 in self_test_asym_keygen() 630 || EVP_PKEY_CTX_set_params(key_ctx, key_params) != 1 in self_test_asym_keygen() 631 || EVP_PKEY_generate(key_ctx, &key) != 1) in self_test_asym_keygen() 648 EVP_PKEY_CTX_free(key_ctx); in self_test_asym_keygen()
|
| /freebsd/contrib/libucl/src/ |
| H A D | ucl_util.c | 947 EVP_PKEY_CTX *key_ctx; local 953 key_ctx = EVP_PKEY_CTX_new (key->key, NULL); 954 if (key_ctx != NULL) { 955 if (EVP_PKEY_verify_init (key_ctx) <= 0) { 956 EVP_PKEY_CTX_free (key_ctx); 959 if (EVP_PKEY_CTX_set_rsa_padding (key_ctx, RSA_PKCS1_PADDING) <= 0) { 960 EVP_PKEY_CTX_free (key_ctx); 963 if (EVP_PKEY_CTX_set_signature_md (key_ctx, EVP_sha256 ()) <= 0) { 964 EVP_PKEY_CTX_free (key_ctx); 971 if (EVP_PKEY_verify (key_ctx, sig, siglen, dig, diglen) == 1) { [all …]
|