/openssl/crypto/ct/ |
H 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() 30 sctx->libctx = libctx; in SCT_CTX_new() 39 return sctx; in SCT_CTX_new() 44 if (sctx == NULL) in SCT_CTX_free() 52 OPENSSL_free(sctx); in SCT_CTX_free() 190 sctx->preder = preder; in SCT_CTX_set1_cert() 208 EVP_MD *sha256 = EVP_MD_fetch(sctx->libctx, "SHA2-256", sctx->propq); in ct_public_key_hash() 252 return ct_public_key_hash(sctx, pubkey, &sctx->ihash, &sctx->ihashlen); in SCT_CTX_set1_issuer_pubkey() 262 if (!ct_public_key_hash(sctx, pubkey, &sctx->pkeyhash, &sctx->pkeyhashlen)) { in SCT_CTX_set1_pubkey() [all …]
|
H 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 …]
|
H 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);
|
H A D | ct_sct.c | 285 SCT_CTX *sctx = NULL; in SCT_validate() local 307 sctx = SCT_CTX_new(ctx->libctx, ctx->propq); in SCT_validate() 308 if (sctx == NULL) in SCT_validate() 313 if (SCT_CTX_set1_pubkey(sctx, log_pkey) != 1) in SCT_validate() 328 if (SCT_CTX_set1_issuer_pubkey(sctx, pub) != 1) in SCT_validate() 332 SCT_CTX_set_time(sctx, ctx->epoch_time_in_ms); in SCT_validate() 352 if (SCT_CTX_set1_cert(sctx, ctx->cert, NULL) != 1) in SCT_validate() 355 sct->validation_status = SCT_CTX_verify(sctx, sct) == 1 ? in SCT_validate() 363 SCT_CTX_free(sctx); in SCT_validate()
|
/openssl/providers/implementations/ciphers/ |
H 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 …]
|
H 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 …]
|
H 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 …]
|
H 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 …]
|
/openssl/test/ |
H A D | dtlstest.c | 73 SSL_CTX *sctx = NULL, *cctx = NULL; in test_dtls_unprocessed() local 140 SSL_CTX_free(sctx); in test_dtls_unprocessed() 193 SSL_CTX *sctx = NULL, *cctx = NULL; in test_dtls_drop_records() local 302 SSL_CTX_free(sctx); in test_dtls_drop_records() 343 SSL_CTX_free(sctx); in test_cookie() 386 SSL_CTX_free(sctx); in test_dtls_duplicate_records() 399 SSL_CTX *sctx = NULL; in test_just_finished() local 434 serverssl = SSL_new(sctx); in test_just_finished() 466 SSL_CTX_free(sctx); in test_just_finished() 585 SSL_CTX_free(sctx); in test_swap_records() [all …]
|
H A D | sslapitest.c | 421 SSL_CTX_free(sctx); in test_keylog() 538 SSL_CTX_free(sctx); in test_keylog_no_master_key() 631 SSL_CTX_free(sctx); in test_client_cert_verify_cb() 788 SSL_CTX_free(sctx); in test_client_hello_cb() 839 SSL_CTX_free(sctx); in test_no_ems() 949 SSL_CTX_free(sctx); in test_ccs_change_cipher() 1012 SSL_CTX_free(sctx); in execute_test_large_message() 1289 SSL_CTX_free(sctx); in execute_test_ktls() 3421 if (*sctx == NULL in setupearly_data_test() 11875 SSL_CTX *sctx; member [all …]
|
H 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()
|
H A D | cert_comp_test.c | 124 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_cert_comp() local 164 &sctx, &cctx, cert, privkey))) in test_ssl_cert_comp() 170 if (!TEST_true(SSL_CTX_set1_cert_comp_preference(sctx, server_pref, 2))) in test_ssl_cert_comp() 176 … if (!TEST_true(SSL_CTX_set1_cert_comp_preference(sctx, server_pref, OSSL_NELEM(server_pref)))) in test_ssl_cert_comp() 184 SSL_CTX_set_verify(sctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, verify_cb); in test_ssl_cert_comp() 188 if (!TEST_true(SSL_CTX_compress_certs(sctx, expected_server))) in test_ssl_cert_comp() 192 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_cert_comp() 241 SSL_CTX_free(sctx); in test_ssl_cert_comp()
|
H A D | rpktest.c | 99 SSL_CTX *cctx = NULL, *sctx = NULL; in test_rpk() local 227 &sctx, &cctx, NULL, NULL))) in test_rpk() 242 if (!TEST_true(SSL_CTX_set_session_id_context(sctx, SID_CTX, sizeof(SID_CTX)))) in test_rpk() 247 if (!TEST_int_gt(SSL_CTX_dane_enable(sctx), 0)) in test_rpk() 255 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_rpk() 531 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_rpk() 628 SSL_CTX_free(sctx); in test_rpk() 646 SSL_CTX *cctx = NULL, *sctx = NULL; in test_rpk_api() local 662 &sctx, &cctx, NULL, NULL))) in test_rpk_api() 668 if (!TEST_false(SSL_CTX_set1_server_cert_type(sctx, cert_type_bad, sizeof(cert_type_bad)))) in test_rpk_api() [all …]
|
H A D | ssl_handshake_rtt_test.c | 47 SSL_CTX *cctx = NULL, *sctx = NULL; in test_handshake_rtt() local 68 &sctx, &cctx, cert, privkey)) in test_handshake_rtt() 69 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_handshake_rtt() 127 SSL_CTX_free(sctx); in test_handshake_rtt()
|
H A D | recordlentest.c | 82 SSL_CTX *cctx = NULL, *sctx = NULL; in test_record_overflow() local 107 &sctx, &cctx, cert, privkey))) in test_record_overflow() 116 SSL_CTX_set_max_proto_version(sctx, TLS1_2_VERSION); in test_record_overflow() 122 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_record_overflow() 179 SSL_CTX_free(sctx); in test_record_overflow()
|
H 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-384"))) in test_tls13ccs() 339 if (!TEST_true(create_ssl_objects(sctx, cctx, &sssl, &cssl, s_to_c_fbio, in test_tls13ccs() 481 SSL_CTX_free(sctx); in test_tls13ccs()
|
H A D | verify_extra_test.c | 67 X509_STORE_CTX *sctx = NULL; in test_alt_chains_cert_forgery() local 86 sctx = X509_STORE_CTX_new(); in test_alt_chains_cert_forgery() 87 if (sctx == NULL) in test_alt_chains_cert_forgery() 90 if (!X509_STORE_CTX_init(sctx, store, x, untrusted)) in test_alt_chains_cert_forgery() 93 i = X509_verify_cert(sctx); in test_alt_chains_cert_forgery() 95 if (i == 0 && X509_STORE_CTX_get_error(sctx) == X509_V_ERR_INVALID_CA) { in test_alt_chains_cert_forgery() 100 X509_STORE_CTX_free(sctx); in test_alt_chains_cert_forgery()
|
H 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()
|
/openssl/crypto/dh/ |
H A D | dh_pmeth.c | 86 DH_PKEY_CTX *dctx, *sctx; in pkey_dh_copy() local 90 sctx = src->data; in pkey_dh_copy() 92 dctx->prime_len = sctx->prime_len; in pkey_dh_copy() 94 dctx->generator = sctx->generator; in pkey_dh_copy() 96 dctx->pad = sctx->pad; in pkey_dh_copy() 97 dctx->md = sctx->md; in pkey_dh_copy() 98 dctx->param_nid = sctx->param_nid; in pkey_dh_copy() 100 dctx->kdf_type = sctx->kdf_type; in pkey_dh_copy() 104 dctx->kdf_md = sctx->kdf_md; in pkey_dh_copy() 105 if (sctx->kdf_ukm != NULL) { in pkey_dh_copy() [all …]
|
/openssl/crypto/ec/ |
H A D | ec_pmeth.c | 62 EC_PKEY_CTX *dctx, *sctx; in pkey_ec_copy() local 65 sctx = src->data; in pkey_ec_copy() 67 if (sctx->gen_group) { in pkey_ec_copy() 72 dctx->md = sctx->md; in pkey_ec_copy() 74 if (sctx->co_key) { in pkey_ec_copy() 79 dctx->kdf_type = sctx->kdf_type; in pkey_ec_copy() 80 dctx->kdf_md = sctx->kdf_md; in pkey_ec_copy() 81 dctx->kdf_outlen = sctx->kdf_outlen; in pkey_ec_copy() 82 if (sctx->kdf_ukm) { in pkey_ec_copy() 83 dctx->kdf_ukm = OPENSSL_memdup(sctx->kdf_ukm, sctx->kdf_ukmlen); in pkey_ec_copy() [all …]
|
/openssl/crypto/hmac/ |
H A D | hmac_s390x.c | 286 int s390x_HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx) in s390x_HMAC_CTX_copy() argument 288 dctx->plat.s390x.fc = sctx->plat.s390x.fc; in s390x_HMAC_CTX_copy() 289 dctx->plat.s390x.blk_size = sctx->plat.s390x.blk_size; in s390x_HMAC_CTX_copy() 290 dctx->plat.s390x.ikp = sctx->plat.s390x.ikp; in s390x_HMAC_CTX_copy() 291 dctx->plat.s390x.iimp = sctx->plat.s390x.iimp; in s390x_HMAC_CTX_copy() 293 memcpy(&dctx->plat.s390x.param, &sctx->plat.s390x.param, in s390x_HMAC_CTX_copy() 298 if (sctx->plat.s390x.buf != NULL) { in s390x_HMAC_CTX_copy() 299 dctx->plat.s390x.buf = OPENSSL_memdup(sctx->plat.s390x.buf, in s390x_HMAC_CTX_copy() 300 sctx->plat.s390x.size); in s390x_HMAC_CTX_copy() 305 dctx->plat.s390x.size = sctx->plat.s390x.size; in s390x_HMAC_CTX_copy() [all …]
|
H A D | hmac.c | 225 int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx) in HMAC_CTX_copy() argument 229 if (!EVP_MD_CTX_copy_ex(dctx->i_ctx, sctx->i_ctx)) in HMAC_CTX_copy() 231 if (!EVP_MD_CTX_copy_ex(dctx->o_ctx, sctx->o_ctx)) in HMAC_CTX_copy() 233 if (!EVP_MD_CTX_copy_ex(dctx->md_ctx, sctx->md_ctx)) in HMAC_CTX_copy() 235 dctx->md = sctx->md; in HMAC_CTX_copy() 238 if (s390x_HMAC_CTX_copy(dctx, sctx) == 0) in HMAC_CTX_copy()
|
/openssl/ssl/ |
H A D | tls_srp.c | 197 SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s); in ssl_srp_server_param_with_username_intern() local 224 s->srp_ctx.v, sctx->libctx, sctx->propq)) != in ssl_srp_server_param_with_username_intern() 331 SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s); in srp_generate_server_master_secret() local 336 sctx->libctx, sctx->propq)) == NULL) in srp_generate_server_master_secret() 363 SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s); in srp_generate_client_master_secret() local 370 sctx->libctx, sctx->propq)) in srp_generate_client_master_secret() 383 sctx->libctx, sctx->propq)) == NULL in srp_generate_client_master_secret() 387 sctx->libctx, in srp_generate_client_master_secret() 388 sctx->propq)) == NULL) { in srp_generate_client_master_secret()
|
/openssl/crypto/dsa/ |
H 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/crypto/rsa/ |
H A D | rsa_pmeth.c | 87 RSA_PKEY_CTX *dctx, *sctx; in pkey_rsa_copy() local 91 sctx = src->data; in pkey_rsa_copy() 93 dctx->nbits = sctx->nbits; in pkey_rsa_copy() 94 if (sctx->pub_exp) { in pkey_rsa_copy() 95 dctx->pub_exp = BN_dup(sctx->pub_exp); in pkey_rsa_copy() 99 dctx->pad_mode = sctx->pad_mode; in pkey_rsa_copy() 100 dctx->md = sctx->md; in pkey_rsa_copy() 101 dctx->mgf1md = sctx->mgf1md; in pkey_rsa_copy() 102 dctx->saltlen = sctx->saltlen; in pkey_rsa_copy() 104 if (sctx->oaep_label) { in pkey_rsa_copy() [all …]
|