/openssl-master/crypto/ct/ |
A D | ct_sct_ctx.c | 25 SCT_CTX *sctx = OPENSSL_zalloc(sizeof(*sctx)); in SCT_CTX_new() local 27 if (sctx == NULL) { in SCT_CTX_new() 32 sctx->libctx = libctx; in SCT_CTX_new() 42 return sctx; in SCT_CTX_new() 47 if (sctx == NULL) in SCT_CTX_free() 55 OPENSSL_free(sctx); in SCT_CTX_free() 193 sctx->preder = preder; in SCT_CTX_set1_cert() 211 EVP_MD *sha256 = EVP_MD_fetch(sctx->libctx, "SHA2-256", sctx->propq); in ct_public_key_hash() 255 return ct_public_key_hash(sctx, pubkey, &sctx->ihash, &sctx->ihashlen); in SCT_CTX_set1_issuer_pubkey() 265 if (!ct_public_key_hash(sctx, pubkey, &sctx->pkeyhash, &sctx->pkeyhashlen)) { in SCT_CTX_set1_pubkey() [all …]
|
A D | ct_vfy.c | 62 der = sctx->certder; in sct_ctx_update() 63 derlen = sctx->certderlen; in sct_ctx_update() 65 if (!EVP_DigestUpdate(ctx, sctx->ihash, sctx->ihashlen)) in sct_ctx_update() 67 der = sctx->preder; in sct_ctx_update() 68 derlen = sctx->prederlen; in sct_ctx_update() 101 if (!SCT_is_complete(sct) || sctx->pkey == NULL || in SCT_CTX_verify() 111 if (sct->log_id_len != sctx->pkeyhashlen || in SCT_CTX_verify() 112 memcmp(sct->log_id, sctx->pkeyhash, sctx->pkeyhashlen) != 0) { in SCT_CTX_verify() 116 if (sct->timestamp > sctx->epoch_time_in_ms) { in SCT_CTX_verify() 126 sctx->propq, sctx->pkey, NULL)) in SCT_CTX_verify() [all …]
|
A D | ct_local.h | 127 void SCT_CTX_free(SCT_CTX *sctx); 138 __owur int SCT_CTX_set1_cert(SCT_CTX *sctx, X509 *cert, X509 *presigner); 147 __owur int SCT_CTX_set1_issuer(SCT_CTX *sctx, const X509 *issuer); 155 __owur int SCT_CTX_set1_issuer_pubkey(SCT_CTX *sctx, X509_PUBKEY *pubkey); 161 __owur int SCT_CTX_set1_pubkey(SCT_CTX *sctx, X509_PUBKEY *pubkey); 170 void SCT_CTX_set_time(SCT_CTX *sctx, uint64_t time_in_ms); 177 __owur int SCT_CTX_verify(const SCT_CTX *sctx, const SCT *sct);
|
A D | ct_sct.c | 293 SCT_CTX *sctx = NULL; in SCT_validate() local 315 sctx = SCT_CTX_new(ctx->libctx, ctx->propq); in SCT_validate() 316 if (sctx == NULL) in SCT_validate() 321 if (SCT_CTX_set1_pubkey(sctx, log_pkey) != 1) in SCT_validate() 336 if (SCT_CTX_set1_issuer_pubkey(sctx, pub) != 1) in SCT_validate() 340 SCT_CTX_set_time(sctx, ctx->epoch_time_in_ms); in SCT_validate() 360 if (SCT_CTX_set1_cert(sctx, ctx->cert, NULL) != 1) in SCT_validate() 363 sct->validation_status = SCT_CTX_verify(sctx, sct) == 1 ? in SCT_validate() 371 SCT_CTX_free(sctx); in SCT_validate()
|
/openssl-master/providers/implementations/ciphers/ |
A D | cipher_aes_ccm_hw_s390x.inc | 27 memset(sctx->ccm.s390x.nonce.b + 1, 0, sizeof(sctx->ccm.s390x.nonce.b)); 90 s390x_kmac(sctx->ccm.s390x.nonce.b, 32, sctx->ccm.s390x.fc, 97 s390x_kmac(aad, alen, sctx->ccm.s390x.fc, &sctx->ccm.s390x.kmac); 106 sctx->ccm.s390x.kmac.icv.b, sctx->ccm.s390x.fc, 129 sctx->ccm.s390x.fc, sctx->ccm.s390x.kmac.k); 172 sctx->ccm.s390x.fc, sctx->ccm.s390x.kmac.k); 192 sctx->ccm.s390x.fc, sctx->ccm.s390x.kmac.k); 199 s390x_km(sctx->ccm.s390x.nonce.b, 16, sctx->ccm.s390x.buf.b, 200 sctx->ccm.s390x.fc, sctx->ccm.s390x.kmac.k); 201 sctx->ccm.s390x.kmac.icv.g[0] ^= sctx->ccm.s390x.buf.g[0]; [all …]
|
A D | cipher_aes_cbc_hmac_sha256_hw.c | 60 sctx->tail = sctx->head; in aesni_cbc_hmac_sha256_init_key() 61 sctx->md = sctx->head; in aesni_cbc_hmac_sha256_init_key() 192 mctx->A[i] = sctx->md.h[0]; in tls1_multi_block_encrypt() 193 mctx->B[i] = sctx->md.h[1]; in tls1_multi_block_encrypt() 194 mctx->C[i] = sctx->md.h[2]; in tls1_multi_block_encrypt() 449 sctx->md.Nh++; in aesni_cbc_hmac_sha256_cipher() 462 sctx->md = sctx->tail; in aesni_cbc_hmac_sha256_cipher() 532 sctx->md = sctx->head; in aesni_cbc_hmac_sha256_cipher() 644 sctx->md = sctx->tail; in aesni_cbc_hmac_sha256_cipher() 739 sctx->md = sctx->head; in aesni_cbc_hmac_sha256_set_tls1_aad() [all …]
|
A D | cipher_aes_cbc_hmac_sha1_hw.c | 58 sctx->tail = sctx->head; in aesni_cbc_hmac_sha1_init_key() 59 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_init_key() 187 mctx->A[i] = sctx->md.h0; in tls1_multi_block_encrypt() 188 mctx->B[i] = sctx->md.h1; in tls1_multi_block_encrypt() 189 mctx->C[i] = sctx->md.h2; in tls1_multi_block_encrypt() 411 sctx->md.Nh++; in aesni_cbc_hmac_sha1_cipher() 424 sctx->md = sctx->tail; in aesni_cbc_hmac_sha1_cipher() 496 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_cipher() 593 sctx->md = sctx->tail; in aesni_cbc_hmac_sha1_cipher() 686 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_set_tls1_aad() [all …]
|
A D | cipher_aes_siv_hw.c | 23 SIV128_CONTEXT *sctx = &ctx->siv; in aes_siv_initkey() local 80 SIV128_CONTEXT *sctx = &ctx->siv; in aes_siv_settag() local 82 return ossl_siv128_set_tag(sctx, tag, tagl); in aes_siv_settag() 88 SIV128_CONTEXT *sctx = &ctx->siv; in aes_siv_setspeed() local 90 ossl_siv128_speed(sctx, (int)speed); in aes_siv_setspeed() 96 SIV128_CONTEXT *sctx = &ctx->siv; in aes_siv_cleanup() local 98 ossl_siv128_cleanup(sctx); in aes_siv_cleanup() 107 SIV128_CONTEXT *sctx = &ctx->siv; in aes_siv_cipher() local 111 return ossl_siv128_finish(sctx) == 0; in aes_siv_cipher() 115 return (ossl_siv128_aad(sctx, in, len) == 1); in aes_siv_cipher() [all …]
|
A D | cipher_seed_hw.c | 21 PROV_SEED_CTX *sctx = (PROV_SEED_CTX *)ctx; in cipher_hw_seed_initkey() local 23 SEED_set_key(key, &(sctx->ks.ks)); in cipher_hw_seed_initkey()
|
A D | cipher_sm4_hw.c | 15 PROV_SM4_CTX *sctx = (PROV_SM4_CTX *)ctx; in cipher_hw_sm4_initkey() local 16 SM4_KEY *ks = &sctx->ks.ks; in cipher_hw_sm4_initkey()
|
/openssl-master/test/ |
A D | dtlstest.c | 57 SSL_CTX *sctx = NULL, *cctx = NULL; in test_dtls_unprocessed() local 124 SSL_CTX_free(sctx); in test_dtls_unprocessed() 164 SSL_CTX *sctx = NULL, *cctx = NULL; in test_dtls_drop_records() local 266 SSL_CTX_free(sctx); in test_dtls_drop_records() 291 SSL_CTX *sctx = NULL, *cctx = NULL; in test_cookie() local 323 SSL_CTX_free(sctx); in test_cookie() 331 SSL_CTX *sctx = NULL, *cctx = NULL; in test_dtls_duplicate_records() local 366 SSL_CTX_free(sctx); in test_dtls_duplicate_records() 379 SSL_CTX *sctx = NULL; in test_just_finished() local 408 serverssl = SSL_new(sctx); in test_just_finished() [all …]
|
A D | sslapitest.c | 433 SSL_CTX_free(sctx); in test_keylog() 550 SSL_CTX_free(sctx); in test_keylog_no_master_key() 634 SSL_CTX_free(sctx); in test_client_cert_verify_cb() 779 SSL_CTX_free(sctx); in test_client_hello_cb() 824 SSL_CTX_free(sctx); in test_no_ems() 934 SSL_CTX_free(sctx); in test_ccs_change_cipher() 1030 SSL_CTX_free(sctx); in execute_test_large_message() 1262 SSL_CTX_free(sctx); in execute_test_ktls() 1393 SSL_CTX_free(sctx); in execute_test_ktls_sendfile() 1598 SSL_CTX_free(sctx); in execute_cleanse_plaintext() [all …]
|
A D | fatalerrtest.c | 21 SSL_CTX *sctx = NULL, *cctx = NULL; in test_fatalerr() local 33 &sctx, &cctx, cert, privkey))) in test_fatalerr() 40 if (!TEST_true(SSL_CTX_set_cipher_list(sctx, "AES128-SHA")) in test_fatalerr() 42 || !TEST_true(SSL_CTX_set_ciphersuites(sctx, in test_fatalerr() 46 || !TEST_true(create_ssl_objects(sctx, cctx, &sssl, &cssl, NULL, in test_fatalerr() 79 SSL_CTX_free(sctx); in test_fatalerr()
|
A D | verify_extra_test.c | 62 X509_STORE_CTX *sctx = NULL; in test_alt_chains_cert_forgery() local 81 sctx = X509_STORE_CTX_new(); in test_alt_chains_cert_forgery() 82 if (sctx == NULL) in test_alt_chains_cert_forgery() 85 if (!X509_STORE_CTX_init(sctx, store, x, untrusted)) in test_alt_chains_cert_forgery() 88 i = X509_verify_cert(sctx); in test_alt_chains_cert_forgery() 90 if (i == 0 && X509_STORE_CTX_get_error(sctx) == X509_V_ERR_INVALID_CA) { in test_alt_chains_cert_forgery() 95 X509_STORE_CTX_free(sctx); in test_alt_chains_cert_forgery()
|
A D | recordlentest.c | 82 SSL_CTX *cctx = NULL, *sctx = NULL; in test_record_overflow() local 109 &sctx, &cctx, cert, privkey))) in test_record_overflow() 118 SSL_CTX_set_max_proto_version(sctx, TLS1_2_VERSION); in test_record_overflow() 124 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_record_overflow() 181 SSL_CTX_free(sctx); in test_record_overflow()
|
A D | tls13ccstest.c | 245 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13ccs() local 259 &sctx, &cctx, cert, privkey)) in test_tls13ccs() 260 || !TEST_true(SSL_CTX_set_max_early_data(sctx, in test_tls13ccs() 294 SSL_CTX_clear_options(sctx, SSL_OP_ENABLE_MIDDLEBOX_COMPAT); in test_tls13ccs() 303 if (!TEST_true(create_ssl_objects(sctx, cctx, &sssl, &cssl, NULL, NULL)) in test_tls13ccs() 320 if (!TEST_true(SSL_CTX_set1_groups_list(sctx, "ffdhe3072"))) in test_tls13ccs() 324 if (!TEST_true(SSL_CTX_set1_groups_list(sctx, "P-256"))) in test_tls13ccs() 339 if (!TEST_true(create_ssl_objects(sctx, cctx, &sssl, &cssl, s_to_c_fbio, in test_tls13ccs() 485 SSL_CTX_free(sctx); in test_tls13ccs()
|
A D | ossl_store_test.c | 42 OSSL_STORE_CTX *sctx = NULL; in test_store_open() local 50 && TEST_ptr(sctx = OSSL_STORE_open_ex(input, NULL, NULL, ui_method, in test_store_open() 52 && TEST_false(OSSL_STORE_find(sctx, NULL)) in test_store_open() 53 && TEST_true(OSSL_STORE_find(sctx, search)); in test_store_open() 56 OSSL_STORE_close(sctx); in test_store_open()
|
A D | sslcorrupttest.c | 185 SSL_CTX *sctx = NULL, *cctx = NULL; in test_ssl_corrupt() local 202 &sctx, &cctx, cert, privkey))) in test_ssl_corrupt() 205 if (!TEST_true(SSL_CTX_set_dh_auto(sctx, 1)) in test_ssl_corrupt() 224 if (!TEST_true(create_ssl_objects(sctx, cctx, &server, &client, NULL, in test_ssl_corrupt() 252 SSL_CTX_free(sctx); in test_ssl_corrupt()
|
A D | servername_test.c | 204 SSL_CTX *cctx = NULL, *sctx = NULL; in server_setup_sni() local 211 &sctx, &cctx, cert, privkey)) in server_setup_sni() 212 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in server_setup_sni() 232 SSL_CTX_free(sctx); in server_setup_sni()
|
A D | evp_libctx_test.c | 528 EVP_PKEY_CTX *sctx = NULL, *rctx = NULL, *dctx = NULL; in kem_rsa_gen_recover() local 536 && TEST_ptr(sctx = EVP_PKEY_CTX_new_from_pkey(libctx, pub, NULL)) in kem_rsa_gen_recover() 537 && TEST_int_eq(EVP_PKEY_encapsulate_init(sctx, NULL), 1) in kem_rsa_gen_recover() 538 && TEST_int_eq(EVP_PKEY_CTX_set_kem_op(sctx, "RSASVE"), 1) in kem_rsa_gen_recover() 539 && TEST_ptr(dctx = EVP_PKEY_CTX_dup(sctx)) in kem_rsa_gen_recover() 558 EVP_PKEY_CTX_free(sctx); in kem_rsa_gen_recover() 686 EVP_PKEY_CTX *sctx = NULL; in kem_invalid_keytype() local 691 if (!TEST_ptr(sctx = EVP_PKEY_CTX_new_from_pkey(libctx, key, NULL))) in kem_invalid_keytype() 693 if (!TEST_int_eq(EVP_PKEY_encapsulate_init(sctx, NULL), -2)) in kem_invalid_keytype() 699 EVP_PKEY_CTX_free(sctx); in kem_invalid_keytype()
|
/openssl-master/crypto/dh/ |
A D | dh_pmeth.c | 88 DH_PKEY_CTX *dctx, *sctx; in pkey_dh_copy() local 92 sctx = src->data; in pkey_dh_copy() 94 dctx->prime_len = sctx->prime_len; in pkey_dh_copy() 96 dctx->generator = sctx->generator; in pkey_dh_copy() 98 dctx->pad = sctx->pad; in pkey_dh_copy() 99 dctx->md = sctx->md; in pkey_dh_copy() 100 dctx->param_nid = sctx->param_nid; in pkey_dh_copy() 102 dctx->kdf_type = sctx->kdf_type; in pkey_dh_copy() 106 dctx->kdf_md = sctx->kdf_md; in pkey_dh_copy() 107 if (sctx->kdf_ukm != NULL) { in pkey_dh_copy() [all …]
|
/openssl-master/crypto/ec/ |
A D | ec_pmeth.c | 64 EC_PKEY_CTX *dctx, *sctx; in pkey_ec_copy() local 67 sctx = src->data; in pkey_ec_copy() 69 if (sctx->gen_group) { in pkey_ec_copy() 74 dctx->md = sctx->md; in pkey_ec_copy() 76 if (sctx->co_key) { in pkey_ec_copy() 81 dctx->kdf_type = sctx->kdf_type; in pkey_ec_copy() 82 dctx->kdf_md = sctx->kdf_md; in pkey_ec_copy() 83 dctx->kdf_outlen = sctx->kdf_outlen; in pkey_ec_copy() 84 if (sctx->kdf_ukm) { in pkey_ec_copy() 85 dctx->kdf_ukm = OPENSSL_memdup(sctx->kdf_ukm, sctx->kdf_ukmlen); in pkey_ec_copy() [all …]
|
/openssl-master/crypto/dsa/ |
A D | dsa_pmeth.c | 58 DSA_PKEY_CTX *dctx, *sctx; in pkey_dsa_copy() local 62 sctx = src->data; in pkey_dsa_copy() 64 dctx->nbits = sctx->nbits; in pkey_dsa_copy() 65 dctx->qbits = sctx->qbits; in pkey_dsa_copy() 66 dctx->pmd = sctx->pmd; in pkey_dsa_copy() 67 dctx->md = sctx->md; in pkey_dsa_copy()
|
/openssl-master/crypto/rsa/ |
A D | rsa_pmeth.c | 84 RSA_PKEY_CTX *dctx, *sctx; in pkey_rsa_copy() local 88 sctx = src->data; in pkey_rsa_copy() 90 dctx->nbits = sctx->nbits; in pkey_rsa_copy() 91 if (sctx->pub_exp) { in pkey_rsa_copy() 92 dctx->pub_exp = BN_dup(sctx->pub_exp); in pkey_rsa_copy() 96 dctx->pad_mode = sctx->pad_mode; in pkey_rsa_copy() 97 dctx->md = sctx->md; in pkey_rsa_copy() 98 dctx->mgf1md = sctx->mgf1md; in pkey_rsa_copy() 99 dctx->saltlen = sctx->saltlen; in pkey_rsa_copy() 100 if (sctx->oaep_label) { in pkey_rsa_copy() [all …]
|
/openssl-master/crypto/hmac/ |
A D | hmac.c | 204 int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx) in HMAC_CTX_copy() argument 208 if (!EVP_MD_CTX_copy_ex(dctx->i_ctx, sctx->i_ctx)) in HMAC_CTX_copy() 210 if (!EVP_MD_CTX_copy_ex(dctx->o_ctx, sctx->o_ctx)) in HMAC_CTX_copy() 212 if (!EVP_MD_CTX_copy_ex(dctx->md_ctx, sctx->md_ctx)) in HMAC_CTX_copy() 214 dctx->md = sctx->md; in HMAC_CTX_copy()
|