Home
last modified time | relevance | path

Searched refs:key_ctx (Results 1 – 6 of 6) sorted by relevance

/freebsd/crypto/openssl/test/
H A Devp_pkey_provided_test.c352 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in test_fromdata_rsa() local
400 EVP_PKEY_CTX_free(key_ctx); in test_fromdata_rsa()
401 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, ""))) in test_fromdata_rsa()
404 if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0) in test_fromdata_rsa()
405 || !TEST_int_gt(EVP_PKEY_public_check(key_ctx), 0) in test_fromdata_rsa()
406 || !TEST_int_gt(EVP_PKEY_private_check(key_ctx), 0) in test_fromdata_rsa()
407 || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0)) in test_fromdata_rsa()
443 EVP_PKEY_CTX_free(key_ctx); in test_fromdata_rsa()
452 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in test_evp_pkey_get_bn_param_large()
484 || !TEST_ptr(key_ctx in test_evp_pkey_get_bn_param_large()
449 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; test_evp_pkey_get_bn_param_large() local
505 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; test_fromdata_dh_named_group() local
716 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; test_fromdata_dh_fips186_4() local
1429 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; test_fromdata_dsa_fips186_4() local
[all...]
H A Dacvp_test.c186 EVP_PKEY_CTX *key_ctx = NULL; in ecdsa_pub_verify_test() local
194 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, "")) in ecdsa_pub_verify_test()
195 || !TEST_int_eq(EVP_PKEY_public_check(key_ctx), tst->pass)) in ecdsa_pub_verify_test()
201 EVP_PKEY_CTX_free(key_ctx); in ecdsa_pub_verify_test()
524 EVP_PKEY_CTX *key_ctx = NULL; in dsa_pqver_test() local
535 || !TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(libctx, param_key, in dsa_pqver_test()
537 || !TEST_int_eq(EVP_PKEY_param_check(key_ctx), tst->pass)) in dsa_pqver_test()
544 EVP_PKEY_CTX_free(key_ctx); in dsa_pqver_test()
982 EVP_PKEY_CTX *key_ctx = NULL; in dh_safe_prime_keyver_test() local
990 || !TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, "")) in dh_safe_prime_keyver_test()
[all …]
H A Devp_extra_test.c2927 EVP_PKEY_CTX *key_ctx = NULL; in test_RSA_OAEP_set_get_params() local
2933 || !TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(0, key, 0))) in test_RSA_OAEP_set_get_params()
2947 if (!TEST_int_gt(EVP_PKEY_encrypt_init_ex(key_ctx, params),0)) in test_RSA_OAEP_set_get_params()
2961 if (!TEST_true(EVP_PKEY_CTX_get_params(key_ctx, params))) in test_RSA_OAEP_set_get_params()
2973 EVP_PKEY_CTX_free(key_ctx); in test_RSA_OAEP_set_get_params()
2983 EVP_PKEY_CTX *key_ctx = NULL; in test_RSA_OAEP_set_null_label() local
2986 || !TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(testctx, key, NULL)) in test_RSA_OAEP_set_null_label()
2987 || !TEST_true(EVP_PKEY_encrypt_init(key_ctx))) in test_RSA_OAEP_set_null_label()
2990 if (!TEST_true(EVP_PKEY_CTX_set_rsa_padding(key_ctx, RSA_PKCS1_OAEP_PADDING))) in test_RSA_OAEP_set_null_label()
2993 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 Dt4_crypto.c571 memcpy(crwr->key_ctx.key, s->hmac.pads, kctx_len); in ccr_hash()
575 crwr->key_ctx.ctx_hdr = htobe32(V_KEY_CONTEXT_CTX_LEN(kctx_flits) | in ccr_hash()
736 crwr->key_ctx.ctx_hdr = s->cipher.key_ctx_hdr; in ccr_cipher()
740 memcpy(crwr->key_ctx.key, s->cipher.enckey, in ccr_cipher()
743 memcpy(crwr->key_ctx.key, s->cipher.deckey, in ccr_cipher()
747 memcpy(crwr->key_ctx.key, s->cipher.enckey, in ccr_cipher()
752 memcpy(crwr->key_ctx.key, s->cipher.enckey + key_half, in ccr_cipher()
755 memcpy(crwr->key_ctx.key + key_half, in ccr_cipher()
758 memcpy(crwr->key_ctx.key + key_half, in ccr_cipher()
1044 crwr->key_ctx in ccr_eta()
[all...]
H A Dt4_crypto.h51 struct _key_ctx key_ctx; member
216 union key_ctx { union
/freebsd/contrib/libucl/src/
H A Ducl_util.c942 EVP_PKEY_CTX *key_ctx; local
948 key_ctx = EVP_PKEY_CTX_new (key->key, NULL);
949 if (key_ctx != NULL) {
950 if (EVP_PKEY_verify_init (key_ctx) <= 0) {
951 EVP_PKEY_CTX_free (key_ctx);
954 if (EVP_PKEY_CTX_set_rsa_padding (key_ctx, RSA_PKCS1_PADDING) <= 0) {
955 EVP_PKEY_CTX_free (key_ctx);
958 if (EVP_PKEY_CTX_set_signature_md (key_ctx, EVP_sha256 ()) <= 0) {
959 EVP_PKEY_CTX_free (key_ctx);
966 if (EVP_PKEY_verify (key_ctx, sig, siglen, dig, diglen) == 1) {
[all …]