Home
last modified time | relevance | path

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

12

/openssl/crypto/ec/
H A Decx_backend.c85 ecx->privkey = NULL; in ossl_ecx_key_fromdata()
140 && key->privkey != NULL) { in ossl_ecx_key_dup()
143 memcpy(ret->privkey, key->privkey, ret->keylen); in ossl_ecx_key_dup()
161 unsigned char *privkey, *pubkey; in ossl_ecx_key_op() local
197 privkey = ossl_ecx_key_allocate_privkey(key); in ossl_ecx_key_op()
198 if (privkey == NULL) { in ossl_ecx_key_op()
207 privkey[0] &= 248; in ossl_ecx_key_op()
209 privkey[X25519_KEYLEN - 1] |= 64; in ossl_ecx_key_op()
211 privkey[0] &= 252; in ossl_ecx_key_op()
212 privkey[X448_KEYLEN - 1] |= 128; in ossl_ecx_key_op()
[all …]
H A Decx_meth.c112 oct.data = ecxkey->privkey; in ecx_priv_encode()
746 *privkey = ecxkey->privkey; in validate_ecx_derive()
956 if (privkey == NULL) { in s390x_pkey_ecx_keygen25519()
964 privkey[0] &= 248; in s390x_pkey_ecx_keygen25519()
965 privkey[31] &= 127; in s390x_pkey_ecx_keygen25519()
966 privkey[31] |= 64; in s390x_pkey_ecx_keygen25519()
999 if (privkey == NULL) { in s390x_pkey_ecx_keygen448()
1007 privkey[0] &= 252; in s390x_pkey_ecx_keygen448()
1008 privkey[55] |= 128; in s390x_pkey_ecx_keygen448()
1048 if (privkey == NULL) { in s390x_pkey_ecd_keygen25519()
[all …]
H A Decx_key.c71 OPENSSL_secure_clear_free(key->privkey, key->keylen); in ossl_ecx_key_free()
95 key->privkey = OPENSSL_secure_zalloc(key->keylen); in ossl_ecx_key_allocate_privkey()
97 return key->privkey; in ossl_ecx_key_allocate_privkey()
H A Decp_s390x_nistp.c137 const BIGNUM *privkey; in ecdsa_s390x_nistp_sign_sig() local
141 privkey = EC_KEY_get0_private_key(eckey); in ecdsa_s390x_nistp_sign_sig()
142 if (group == NULL || privkey == NULL) { in ecdsa_s390x_nistp_sign_sig()
170 if (BN_bn2binpad(privkey, param + S390X_OFF_K(len), len) == -1) { in ecdsa_s390x_nistp_sign_sig()
/openssl/providers/implementations/keymgmt/
H A Decx_kmgmt.c601 privkey[0] &= 248; in ecx_gen()
607 privkey[0] &= 252; in ecx_gen()
851 if (privkey == NULL) { in MAKE_KEYMGMT_FUNCTIONS()
859 privkey[0] &= 248; in MAKE_KEYMGMT_FUNCTIONS()
860 privkey[31] &= 127; in MAKE_KEYMGMT_FUNCTIONS()
861 privkey[31] |= 64; in MAKE_KEYMGMT_FUNCTIONS()
897 if (privkey == NULL) { in s390x_ecx_keygen448()
905 privkey[0] &= 252; in s390x_ecx_keygen448()
906 privkey[55] |= 128; in s390x_ecx_keygen448()
949 if (privkey == NULL) { in s390x_ecd_keygen25519()
[all …]
/openssl/test/recipes/
H A D20-test_pkeyutl.t74 my $privkey = shift;
80 my $sigfile = basename($privkey, '.pem') . '.sig';
86 '-inkey', $privkey,
94 '-inkey', $privkey,
103 '-inkey', $privkey,
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,
/openssl/test/
H A Dtls-provider.c44 unsigned char privkey[XOR_KEY_SIZE]; member
280 secret[i] = pxorctx->key->privkey[i] ^ pxorctx->peerkey->pubkey[i]; in xor_derive()
499 memcpy(tokey->privkey, fromkey->privkey, XOR_KEY_SIZE); in xor_dup()
648 key->pubkey[i] = key->privkey[i] ^ private_constant[i]; in xor_gen()
662 unsigned char privkey[XOR_KEY_SIZE]; in xor_import() local
664 void *pprivkey = privkey, *ppubkey = pubkey; in xor_import()
671 memset(privkey, 0, sizeof(privkey)); in xor_import()
678 sizeof(privkey), &priv_len)) in xor_import()
685 memcpy(key->privkey, privkey, priv_len); in xor_import()
707 key->privkey, in xor_export()
[all …]
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()
360 if (!TEST_true(PEM_read_bio_PrivateKey(privkeybio, &privkey, NULL, NULL))) { in setup_tests()
380 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
67 &sctx, &cctx, cert, privkey))) in test_dtls_unprocessed()
175 &sctx, &cctx, cert, privkey))) in test_dtls_drop_records()
298 &sctx, &cctx, cert, privkey))) in test_cookie()
338 &sctx, &cctx, cert, privkey))) in test_dtls_duplicate_records()
405 &sctx, NULL, cert, privkey))) in test_just_finished()
465 &sctx, &cctx, cert, privkey))) in test_swap_epoch()
541 &sctx, &cctx, cert, privkey))) in test_swap_app_data()
623 &sctx, &cctx, cert, privkey))) in test_listen()
672 || !TEST_ptr(privkey = test_get_argument(1))) in setup_tests()
H A Drecordlentest.c16 static char *privkey = NULL; variable
109 &sctx, &cctx, cert, privkey))) in test_record_overflow()
196 || !TEST_ptr(privkey = test_get_argument(1))) in setup_tests()
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()
H A Dsslcorrupttest.c180 static char *privkey = NULL; variable
202 &sctx, &cctx, cert, privkey))) in test_ssl_corrupt()
269 || !TEST_ptr(privkey = test_get_argument(1))) in setup_tests()
H A Dthreadstest.c39 static char *privkey; variable
510 || !TEST_ptr(shared_evp_pkey = load_pkey_pem(privkey, multi_libctx)) in test_multi_shared_pkey_common()
712 privkey = test_mk_file_path(datadir, "rsakey.pem"); in setup_tests()
713 if (!TEST_ptr(privkey)) in setup_tests()
744 OPENSSL_free(privkey); in cleanup_tests()
H A Dasynciotest.c25 static char *privkey = NULL; variable
302 &serverctx, &clientctx, cert, privkey))) in test_asyncio()
407 || !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()
189 ASN1_STRING_clear_free(privkey); in ossl_dsa_key_from_pkcs8()
/openssl/providers/implementations/exchange/
H A Decx_exch.c125 || ecxctx->key->privkey == NULL in ecx_derive()
151 ecxctx->key->privkey) == 0) { in ecx_derive()
157 if (ossl_x25519(secret, ecxctx->key->privkey, in ecx_derive()
167 ecxctx->key->privkey) == 0) { in ecx_derive()
173 if (ossl_x448(secret, ecxctx->key->privkey, in ecx_derive()
/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.c114 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES], in ossl_c448_ed448_derive_public_key()
124 privkey, in ossl_c448_ed448_derive_public_key()
161 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES], in ossl_c448_ed448_sign()
185 if (!oneshot_hash(ctx, expanded, sizeof(expanded), privkey, in ossl_c448_ed448_sign()
270 const uint8_t privkey[EDDSA_448_PRIVATE_BYTES], in ossl_c448_ed448_sign_prehash()
275 return ossl_c448_ed448_sign(ctx, signature, privkey, pubkey, hash, 64, 1, in ossl_c448_ed448_sign_prehash()
/openssl/fuzz/
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/crypto/dh/
H A Ddh_backend.c197 ASN1_INTEGER *privkey = NULL; in ossl_dh_key_from_pkcs8() local
207 if ((privkey = d2i_ASN1_INTEGER(NULL, &p, pklen)) == NULL) in ossl_dh_key_from_pkcs8()
228 || !ASN1_INTEGER_to_BN(privkey, privkey_bn)) { in ossl_dh_key_from_pkcs8()
247 ASN1_STRING_clear_free(privkey); in ossl_dh_key_from_pkcs8()
/openssl/apps/
H A Dx509.c261 EVP_PKEY *privkey = NULL, *CAkey = NULL, *pubkey = NULL; in x509_main() local
633 if (privkey == NULL) in x509_main()
769 if ((pubkey != NULL || privkey != NULL || req != NULL) in x509_main()
771 privkey != NULL ? privkey : in x509_main()
826 if (privkey != NULL && !cert_matches_key(x, privkey)) in x509_main()
844 if (!X509V3_set_issuer_pkey(&ext_ctx, privkey)) in x509_main()
865 if (privkey == NULL) { in x509_main()
883 if (!do_X509_REQ_sign(rq, privkey, digest, sigopts)) in x509_main()
899 } else if (privkey != NULL) { in x509_main()
900 if (!do_X509_sign(x, privkey, digest, sigopts, &ext_ctx)) in x509_main()
[all …]
/openssl/doc/HOWTO/
H A Dcertificates.txt32 Private keys are generated with 'openssl genrsa -out privkey.pem' if
34 'openssl dsaparam -out dsaparam.pem 2048; openssl gendsa -out privkey.pem dsaparam.pem'.
39 The rest of this text assumes you have a private key in the file privkey.pem.
55 openssl req -new -key privkey.pem -out cert.csr
82 openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
/openssl/providers/implementations/signature/
H A Deddsa_sig.c176 if (ossl_ed25519_sign(sigret, tbs, tbslen, edkey->pubkey, edkey->privkey, in ed25519_digest_sign()
214 edkey->privkey, NULL, 0, edkey->propq) == 0) { in ed448_digest_sign()
374 memcpy(param.ed25519.priv, edkey->privkey, sizeof(param.ed25519.priv)); in s390x_ed25519_digestsign()
399 memcpy(param.ed448.priv + 64 - 57, edkey->privkey, 57); in s390x_ed448_digestsign()

Completed in 101 milliseconds

12