Home
last modified time | relevance | path

Searched refs:privkey (Results 1 – 25 of 53) sorted by relevance

123

/openssl/crypto/ec/
H A Decx_backend.c85 ecx->privkey = NULL; in ossl_ecx_key_fromdata()
137 && key->privkey != NULL) { in ossl_ecx_key_dup()
142 memcpy(ret->privkey, key->privkey, ret->keylen); in ossl_ecx_key_dup()
160 unsigned char *privkey, *pubkey; in ossl_ecx_key_op() local
196 privkey = ossl_ecx_key_allocate_privkey(key); in ossl_ecx_key_op()
197 if (privkey == NULL) { in ossl_ecx_key_op()
206 privkey[0] &= 248; in ossl_ecx_key_op()
208 privkey[X25519_KEYLEN - 1] |= 64; in ossl_ecx_key_op()
210 privkey[0] &= 252; in ossl_ecx_key_op()
211 privkey[X448_KEYLEN - 1] |= 128; in ossl_ecx_key_op()
[all …]
H A Decx_meth.c110 oct.data = ecxkey->privkey; in ecx_priv_encode()
744 *privkey = ecxkey->privkey; in validate_ecx_derive()
958 if (privkey == NULL) { in s390x_pkey_ecx_keygen25519()
966 privkey[0] &= 248; in s390x_pkey_ecx_keygen25519()
967 privkey[31] &= 127; in s390x_pkey_ecx_keygen25519()
968 privkey[31] |= 64; in s390x_pkey_ecx_keygen25519()
1001 if (privkey == NULL) { in s390x_pkey_ecx_keygen448()
1009 privkey[0] &= 252; in s390x_pkey_ecx_keygen448()
1010 privkey[55] |= 128; in s390x_pkey_ecx_keygen448()
1050 if (privkey == NULL) { in s390x_pkey_ecd_keygen25519()
[all …]
H A Decx_key.c78 OPENSSL_secure_clear_free(key->privkey, key->keylen); in ossl_ecx_key_free()
102 key->privkey = OPENSSL_secure_zalloc(key->keylen); in ossl_ecx_key_allocate_privkey()
104 return key->privkey; in ossl_ecx_key_allocate_privkey()
111 || priv->privkey == NULL in ossl_ecx_compute_key()
136 if (s390x_x25519_mul(secret, peer->pubkey, priv->privkey) == 0) { in ossl_ecx_compute_key()
142 if (ossl_x25519(secret, priv->privkey, peer->pubkey) == 0) { in ossl_ecx_compute_key()
150 if (s390x_x448_mul(secret, peer->pubkey, priv->privkey) == 0) { in ossl_ecx_compute_key()
156 if (ossl_x448(secret, priv->privkey, peer->pubkey) == 0) { in ossl_ecx_compute_key()
/openssl/providers/implementations/keymgmt/
H A Decx_kmgmt.c719 privkey[0] &= 248; in ecx_gen()
725 privkey[0] &= 252; in ecx_gen()
1051 if (privkey == NULL) { in MAKE_KEYMGMT_FUNCTIONS()
1070 privkey[0] &= 248; in MAKE_KEYMGMT_FUNCTIONS()
1071 privkey[31] &= 127; in MAKE_KEYMGMT_FUNCTIONS()
1072 privkey[31] |= 64; in MAKE_KEYMGMT_FUNCTIONS()
1108 if (privkey == NULL) { in s390x_ecx_keygen448()
1127 privkey[0] &= 252; in s390x_ecx_keygen448()
1128 privkey[55] |= 128; in s390x_ecx_keygen448()
1171 if (privkey == NULL) { in s390x_ecd_keygen25519()
[all …]
/openssl/test/recipes/
H A D20-test_dgst.t24 my $privkey = shift;
30 my $sigfile = basename($privkey, '.pem') . '.sig';
33 ok(run(app(['openssl', 'dgst', '-sign', $privkey,
38 ok(run(app(['openssl', 'dgst', '-prverify', $privkey,
56 my $privkey = shift;
62 my $sigfile = basename($privkey, '.pem') . '.sig';
65 ok(run(app(['openssl', 'sha512', '-sign', $privkey,
75 ok(run(app(['openssl', 'dgst', '-sha512', '-prverify', $privkey,
H A D20-test_pkeyutl.t101 my $privkey = shift;
107 $sigfile = basename($privkey, '.pem') . '.sig';
113 '-inkey', $privkey,
121 '-inkey', $privkey,
130 '-inkey', $privkey,
/openssl/test/
H A Dquic_newcid_test.c17 static char *privkey = NULL; variable
70 if (!TEST_true(qtest_create_quic_objects(NULL, cctx, NULL, cert, privkey, 0, in test_ncid_frame()
167 privkey = test_mk_file_path(certsdir, "serverkey.pem"); in setup_tests()
168 if (privkey == NULL) in setup_tests()
177 OPENSSL_free(privkey); in setup_tests()
184 OPENSSL_free(privkey); in cleanup_tests()
H A Dx509_test.c21 static EVP_PKEY *privkey = NULL; variable
99 && TEST_int_gt(X509_sign(x, privkey, signmd), 0) in test_x509_tbs_cache()
117 && TEST_int_gt(X509_CRL_sign(crl, privkey, signmd), 0) in test_x509_crl_tbs_cache()
196 privkey = d2i_PrivateKey(EVP_PKEY_EC, NULL, &p, sizeof(privkeydata)); in setup_tests()
198 if (pubkey == NULL || privkey == NULL) { in setup_tests()
220 EVP_PKEY_free(privkey); in cleanup_tests()
H A Dquicfaultstest.c17 static char *privkey = NULL; variable
37 if (!TEST_true(qtest_create_quic_objects(NULL, cctx, NULL, cert, privkey, 0, in test_basic()
107 if (!TEST_true(qtest_create_quic_objects(NULL, cctx, NULL, cert, privkey, 0, in test_unknown_frame()
189 if (!TEST_true(qtest_create_quic_objects(NULL, cctx, NULL, cert, privkey, 0, in test_drop_extensions()
276 if (!TEST_true(qtest_create_quic_objects(NULL, cctx, NULL, cert, privkey, in test_corrupted_data()
390 privkey = test_mk_file_path(certsdir, "serverkey.pem"); in setup_tests()
391 if (privkey == NULL) in setup_tests()
403 OPENSSL_free(privkey); in setup_tests()
410 OPENSSL_free(privkey); in cleanup_tests()
H A Dcert_comp_test.c38 static char *privkey = NULL; variable
57 || !TEST_ptr(priv_in = BIO_new_file(privkey, "r")) in client_cert_cb()
164 &sctx, &cctx, cert, privkey))) in test_ssl_cert_comp()
265 privkey = test_mk_file_path(certsdir, "serverkey.pem"); in setup_tests()
266 if (privkey == NULL) in setup_tests()
274 OPENSSL_free(privkey); in setup_tests()
285 OPENSSL_free(privkey); in cleanup_tests()
H A Ddecoder_propq_test.c51 EVP_PKEY *privkey = NULL; in test_decode_nonfipsalg() local
67 if (!TEST_ptr_null(PEM_read_bio_PrivateKey_ex(bio, &privkey, &passcb, NULL, libctx, NULL))) in test_decode_nonfipsalg()
74 …if (!TEST_ptr_null(PEM_read_bio_PrivateKey_ex(bio, &privkey, &passcb, NULL, libctx, "?fips=true"))) in test_decode_nonfipsalg()
80 EVP_PKEY_free(privkey); in test_decode_nonfipsalg()
H A Dcmsapitest.c21 static EVP_PKEY *privkey = NULL; variable
45 if (!TEST_true(CMS_decrypt(content, privkey, cert, NULL, outmsgbio, in test_encrypt_decrypt()
51 NULL, privkey, cert, NULL, in test_encrypt_decrypt()
97 && TEST_ptr(CMS_add1_signer(cms, cert, privkey, NULL, 0)) in test_CMS_add1_cert()
420 if (!TEST_true(PEM_read_bio_PrivateKey(privkeybio, &privkey, NULL, NULL))) { in setup_tests()
441 EVP_PKEY_free(privkey); in cleanup_tests()
H A Dfatalerrtest.c17 static char *privkey = NULL; variable
33 &sctx, &cctx, cert, privkey))) in test_fatalerr()
95 || !TEST_ptr(privkey = test_get_argument(1))) in setup_tests()
H A Ddtlstest.c20 static char *privkey = NULL; variable
83 &sctx, &cctx, cert, privkey))) in test_dtls_unprocessed()
205 &sctx, &cctx, cert, privkey))) in test_dtls_drop_records()
318 &sctx, &cctx, cert, privkey))) in test_cookie()
358 &sctx, &cctx, cert, privkey))) in test_dtls_duplicate_records()
425 &sctx, NULL, cert, privkey))) in test_just_finished()
490 &sctx, &cctx, cert, privkey))) in test_swap_records()
600 &sctx, &cctx, cert, privkey))) in test_listen()
649 || !TEST_ptr(privkey = test_get_argument(1))) in setup_tests()
H A Drecordlentest.c16 static char *privkey = NULL; variable
107 &sctx, &cctx, cert, privkey))) in test_record_overflow()
194 || !TEST_ptr(privkey = test_get_argument(1))) in setup_tests()
H A Dquicapitest.c30 static char *privkey = NULL; variable
229 cert, privkey, in test_fin_only_blocking()
523 privkey, in test_ssl_trace()
1339 privkey, in test_alpn()
1389 privkey, in test_get_shutdown()
2140 privkey, 0, &s, in test_tparam()
2225 privkey, in test_session_cb()
2320 privkey = test_mk_file_path(certsdir, "serverkey.pem"); in setup_tests()
2321 if (privkey == NULL) in setup_tests()
2325 if (privkey == NULL) in setup_tests()
[all …]
H A Dssl_handshake_rtt_test.c36 static char *privkey = NULL; variable
68 &sctx, &cctx, cert, privkey)) in test_handshake_rtt()
H A Dservername_test.c32 static char *privkey = NULL; variable
211 &sctx, &cctx, cert, privkey)) in server_setup_sni()
263 || !TEST_ptr(privkey = test_get_argument(1))) in setup_tests()
/openssl/crypto/dsa/
H A Ddsa_backend.c132 ASN1_INTEGER *privkey = NULL; in ossl_dsa_key_from_pkcs8() local
143 if ((privkey = d2i_ASN1_INTEGER(NULL, &p, pklen)) == NULL) in ossl_dsa_key_from_pkcs8()
145 if (privkey->type == V_ASN1_NEG_INTEGER || ptype != V_ASN1_SEQUENCE) in ossl_dsa_key_from_pkcs8()
155 || !ASN1_INTEGER_to_BN(privkey, dsa_privkey)) { in ossl_dsa_key_from_pkcs8()
192 ASN1_STRING_clear_free(privkey); in ossl_dsa_key_from_pkcs8()
/openssl/crypto/ec/curve448/
H A Ded448.h44 const uint8_t privkey [EDDSA_448_PRIVATE_BYTES],
67 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES],
93 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES],
H A Deddsa.c110 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES], in ossl_c448_ed448_derive_public_key()
120 privkey, in ossl_c448_ed448_derive_public_key()
157 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES], in ossl_c448_ed448_sign()
181 if (!oneshot_hash(ctx, expanded, sizeof(expanded), privkey, in ossl_c448_ed448_sign()
266 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES], in ossl_c448_ed448_sign_prehash()
271 return ossl_c448_ed448_sign(ctx, signature, privkey, pubkey, hash, 64, 1, in ossl_c448_ed448_sign_prehash()
/openssl/crypto/dh/
H A Ddh_backend.c191 ASN1_INTEGER *privkey = NULL; in ossl_dh_key_from_pkcs8() local
201 if ((privkey = d2i_ASN1_INTEGER(NULL, &p, pklen)) == NULL) in ossl_dh_key_from_pkcs8()
222 || !ASN1_INTEGER_to_BN(privkey, privkey_bn)) { in ossl_dh_key_from_pkcs8()
241 ASN1_STRING_clear_free(privkey); in ossl_dh_key_from_pkcs8()
/openssl/fuzz/
H A Ddtlsserver.c600 RSA *privkey; in FuzzerTestOneInput() local
630 privkey = PEM_read_bio_RSAPrivateKey(bio_buf, NULL, NULL, NULL); in FuzzerTestOneInput()
632 OPENSSL_assert(privkey != NULL); in FuzzerTestOneInput()
635 EVP_PKEY_assign_RSA(pkey, privkey); in FuzzerTestOneInput()
H A Dserver.c521 RSA *privkey; in FuzzerTestOneInput() local
552 privkey = d2i_RSAPrivateKey(NULL, &bufp, sizeof(kRSAPrivateKeyDER)); in FuzzerTestOneInput()
553 OPENSSL_assert(privkey != NULL); in FuzzerTestOneInput()
555 EVP_PKEY_assign_RSA(pkey, privkey); in FuzzerTestOneInput()
/openssl/apps/
H A Dx509.c270 EVP_PKEY *privkey = NULL, *CAkey = NULL, *pubkey = NULL; in x509_main() local
660 if (privkey == NULL) in x509_main()
798 if ((pubkey != NULL || privkey != NULL || req != NULL) in x509_main()
800 privkey != NULL ? privkey : in x509_main()
852 if (privkey != NULL && !cert_matches_key(x, privkey)) in x509_main()
860 if (reqfile || newcert || privkey != NULL || CAfile != NULL) { in x509_main()
875 if (!X509V3_set_issuer_pkey(&ext_ctx, privkey)) in x509_main()
896 if (privkey == NULL) { in x509_main()
914 if (!do_X509_REQ_sign(rq, privkey, digest, sigopts)) in x509_main()
942 } else if (privkey != NULL) { in x509_main()
[all …]

Completed in 64 milliseconds

123