/openssl/crypto/x509/ |
H A D | v3_lib.c | 25 int X509V3_EXT_add(X509V3_EXT_METHOD *ext) in X509V3_EXT_add() argument 91 const X509V3_EXT_METHOD *ext; in X509V3_EXT_add_alias() local 100 *tmpext = *ext; in X509V3_EXT_add_alias() 114 if (ext->ext_flags & X509V3_EXT_DYNAMIC) in ext_list_free() 115 OPENSSL_free(ext); in ext_list_free() 130 void *X509V3_EXT_d2i(X509_EXTENSION *ext) in X509V3_EXT_d2i() argument 139 extvalue = X509_EXTENSION_get_data(ext); in X509V3_EXT_d2i() 223 X509_EXTENSION *ext = NULL, *extmp; in X509V3_add1_i2d() local 270 if (!ext) { in X509V3_add1_i2d() 288 if (!sk_X509_EXTENSION_push(ret, ext)) in X509V3_add1_i2d() [all …]
|
H A D | v3_prn.c | 19 static int unknown_ext_print(BIO *out, const unsigned char *ext, int extlen, 70 int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, in X509V3_EXT_print() argument 82 extoct = X509_EXTENSION_get_data(ext); in X509V3_EXT_print() 86 if ((method = X509V3_EXT_get(ext)) == NULL) in X509V3_EXT_print() 179 static int unknown_ext_print(BIO *out, const unsigned char *ext, int extlen, in unknown_ext_print() argument 195 return ASN1_parse_dump(out, ext, extlen, indent, -1); in unknown_ext_print() 197 return BIO_dump_indent(out, (const char *)ext, extlen, indent); in unknown_ext_print() 205 int X509V3_EXT_print_fp(FILE *fp, X509_EXTENSION *ext, int flag, int indent) in X509V3_EXT_print_fp() argument 212 ret = X509V3_EXT_print(bio_tmp, ext, flag, indent); in X509V3_EXT_print_fp()
|
H A D | v3_conf.c | 83 X509_EXTENSION *ext; in do_ext_nconf() local 134 return ext; in do_ext_nconf() 144 X509_EXTENSION *ext; in do_ext_i2d() local 177 if (!ext) { in do_ext_i2d() 183 return ext; in do_ext_i2d() 248 if ((obj = OBJ_txt2obj(ext, 0)) == NULL) { in v3_generic_extension() 250 "name=%s", ext); in v3_generic_extension() 316 X509_EXTENSION *ext; in X509V3_EXT_add_nconf_sk() local 344 delete_ext(*sk, ext); in X509V3_EXT_add_nconf_sk() 346 X509_EXTENSION_free(ext); in X509V3_EXT_add_nconf_sk() [all …]
|
H A D | x509_req.c | 124 ASN1_TYPE *ext = NULL; in STACK_OF() local 131 ext = X509_ATTRIBUTE_get0_type(attr, 0); in STACK_OF() 132 if (ext == NULL || ext->type != V_ASN1_SEQUENCE) { in STACK_OF() 136 p = ext->value.sequence->data; in STACK_OF() 138 ASN1_item_d2i(NULL, &p, ext->value.sequence->length, in STACK_OF() 170 unsigned char *ext = NULL; in X509_REQ_add_extensions_nid() local 188 &ext, ASN1_ITEM_rptr(X509_EXTENSIONS)); in X509_REQ_add_extensions_nid() 199 rv = X509_REQ_add1_attr_by_NID(req, nid, V_ASN1_SEQUENCE, ext, extlen); in X509_REQ_add_extensions_nid() 200 OPENSSL_free(ext); in X509_REQ_add_extensions_nid()
|
H A D | v3_asid.c | 113 ASIdentifiers *asid = ext; in i2r_ASIdentifiers() 768 if (ext != NULL) { in asid_validate_path_internal() 774 if ((ext = x->rfc3779_asid) == NULL) in asid_validate_path_internal() 777 if (!X509v3_asid_is_canonical(ext)) in asid_validate_path_internal() 779 if (ext->asnum != NULL) { in asid_validate_path_internal() 780 switch (ext->asnum->type) { in asid_validate_path_internal() 785 child_as = ext->asnum->u.asIdsOrRanges; in asid_validate_path_internal() 789 if (ext->rdi != NULL) { in asid_validate_path_internal() 790 switch (ext->rdi->type) { in asid_validate_path_internal() 795 child_rdi = ext->rdi->u.asIdsOrRanges; in asid_validate_path_internal() [all …]
|
H A D | x_crl.c | 96 X509_EXTENSION *ext; variable 138 ext = sk_X509_EXTENSION_value(exts, j); 139 if (X509_EXTENSION_get_critical(ext)) { 140 if (OBJ_obj2nid(X509_EXTENSION_get_object(ext)) 163 X509_EXTENSION *ext; in crl_cb() local 237 ext = sk_X509_EXTENSION_value(exts, idx); in crl_cb() 238 nid = OBJ_obj2nid(X509_EXTENSION_get_object(ext)); in crl_cb() 241 if (X509_EXTENSION_get_critical(ext)) { in crl_cb()
|
/openssl/ssl/statem/ |
H A D | extensions_clnt.c | 66 if (s->ext.hostname == NULL) in tls_construct_ctos_server_name() 391 if (s->ext.ocsp.exts) { in tls_construct_ctos_status_request() 451 || !WPACKET_sub_memcpy_u16(pkt, s->ext.alpn, s->ext.alpn_len) in tls_construct_ctos_alpn() 875 && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) { in tls_construct_ctos_early_data() 882 if ((s->ext.alpn == NULL && edsess->ext.alpn_selected != NULL)) { in tls_construct_ctos_early_data() 895 if (!PACKET_buf_init(&prots, s->ext.alpn, s->ext.alpn_len)) { in tls_construct_ctos_early_data() 1371 s->session->ext.hostname = OPENSSL_strdup(s->ext.hostname); in tls_parse_stoc_server_name() 1510 s->ext.scts = NULL; in tls_parse_stoc_sct() 1615 s->ext.npn_len = 0; in tls_parse_stoc_npn() 1654 if (!PACKET_buf_init(&confpkt, s->ext.alpn, s->ext.alpn_len)) { in tls_parse_stoc_alpn() [all …]
|
H A D | extensions_srvr.c | 155 s->ext.hostname = NULL; in tls_parse_ctos_server_name() 363 s->ext.ocsp.ids = NULL; in tls_parse_ctos_status_request() 411 s->ext.ocsp.exts = in tls_parse_ctos_status_request() 551 s->ext.use_etm = 1; in tls_parse_ctos_etm() 927 s->ext.cookieok = 1; in tls_parse_ctos_cookie() 1001 s->ext.ticket_expected = 1; in tls_get_stateful_ticket() 1040 if ((s->ext.psk_kex_mode in tls_parse_ctos_psk() 1136 ext = 1; in tls_parse_ctos_psk() 1257 s->ext.tick_identity = id; in tls_parse_ctos_psk() 1577 if (!s->ext.use_etm) in tls_construct_stoc_etm() [all …]
|
H A D | extensions.c | 695 if (s->ext.debug_cb) in tls_collect_extensions() 983 s->ext.hostname = NULL; in init_server_name() 1022 s->session->ext.hostname = OPENSSL_strdup(s->ext.hostname); in final_server_name() 1023 if (s->session->ext.hostname == NULL && s->ext.hostname != NULL) { in final_server_name() 1048 s->ext.ticket_expected = 0; in final_server_name() 1054 ss->ext.tick = NULL; in final_server_name() 1055 ss->ext.ticklen = 0; in final_server_name() 1132 s->ext.ticket_expected = 0; in init_session_ticket() 1148 s->ext.ocsp.resp = NULL; in init_status_request() 1149 s->ext.ocsp.resp_len = 0; in init_status_request() [all …]
|
H A D | statem_srvr.c | 664 if (s->ext.ticket_expected) in ossl_statem_server_write_transition() 685 if (s->ext.status_expected) { in ossl_statem_server_write_transition() 718 } else if (s->ext.ticket_expected) { in ossl_statem_server_write_transition() 2149 s->ext.status_expected = 0; in tls_handle_status_request() 2177 if (s->ext.ocsp.resp) in tls_handle_status_request() 2229 s->ext.early_data_ok = 0; in tls_handle_alpn() 2268 s->ext.early_data_ok = 0; in tls_handle_alpn() 3833 switch (s->ext.server_cert_type) { in tls_construct_server_certificate() 4009 if (tctx->ext.ticket_key_evp_cb != NULL || tctx->ext.ticket_key_cb != NULL) in construct_stateless_ticket() 4161 s->ext.extra_tickets_expected--; in tls_update_ticket_counts() [all …]
|
H A D | statem_clnt.c | 277 if (s->ext.ticket_expected) { in ossl_statem_client_read_transition() 375 if (s->ext.ticket_expected) { in ossl_statem_client_read_transition() 1619 && s->ext.session_secret_cb != NULL && s->session->ext.tick) { in tls_process_server_hello() 2756 s->session->ext.tick = NULL; in tls_process_new_session_ticket() 2757 s->session->ext.ticklen = 0; in tls_process_new_session_ticket() 2771 s->session->ext.ticklen = ticklen; in tls_process_new_session_ticket() 2883 if (s->ext.ocsp.resp == NULL) { in tls_process_cert_status_body() 2884 s->ext.ocsp.resp_len = 0; in tls_process_cert_status_body() 2888 s->ext.ocsp.resp_len = resplen; in tls_process_cert_status_body() 3776 switch (s->ext.client_cert_type) { in tls_construct_client_certificate() [all …]
|
/openssl/ssl/ |
H A D | ssl_sess.c | 157 dest->ext.hostname = NULL; in ssl_session_dup_intern() 158 dest->ext.tick = NULL; in ssl_session_dup_intern() 225 if (src->ext.hostname) { in ssl_session_dup_intern() 226 dest->ext.hostname = OPENSSL_strdup(src->ext.hostname); in ssl_session_dup_intern() 232 dest->ext.tick = in ssl_session_dup_intern() 233 OPENSSL_memdup(src->ext.tick, src->ext.ticklen); in ssl_session_dup_intern() 238 dest->ext.ticklen = 0; in ssl_session_dup_intern() 242 dest->ext.alpn_selected = OPENSSL_memdup(src->ext.alpn_selected, in ssl_session_dup_intern() 1015 return s->ext.hostname; in SSL_SESSION_get0_hostname() 1043 *len = s->ext.ticklen; in SSL_SESSION_get0_ticket() [all …]
|
H A D | t1_trce.c | 779 xlen = (ext[0] << 8) | ext[1]; in ssl_print_extension() 786 xlen = (ext[0] << 8) | ext[1]; in ssl_print_extension() 789 ext += 2; in ssl_print_extension() 807 xlen = (ext[0] << 8) | ext[1]; in ssl_print_extension() 815 sigalg = (ext[0] << 8) | ext[1]; in ssl_print_extension() 829 ext++; in ssl_print_extension() 857 group_id = (ext[0] << 8) | ext[1]; in ssl_print_extension() 868 xlen = (ext[0] << 8) | ext[1]; in ssl_print_extension() 878 group_id = (ext[0] << 8) | ext[1]; in ssl_print_extension() 879 share_len = (ext[2] << 8) | ext[3]; in ssl_print_extension() [all …]
|
H A D | ssl_asn1.c | 186 in->ext.hostname); in i2d_SSL_SESSION() 187 if (in->ext.tick) { in i2d_SSL_SESSION() 189 in->ext.tick, in->ext.ticklen); in i2d_SSL_SESSION() 191 if (in->ext.tick_lifetime_hint > 0) in i2d_SSL_SESSION() 206 if (in->ext.alpn_selected == NULL) in i2d_SSL_SESSION() 210 in->ext.alpn_selected, in->ext.alpn_selected_len); in i2d_SSL_SESSION() 371 OPENSSL_free(ret->ext.tick); in d2i_SSL_SESSION_ex() 377 ret->ext.tick = NULL; in d2i_SSL_SESSION_ex() 399 OPENSSL_free(ret->ext.alpn_selected); in d2i_SSL_SESSION_ex() 405 ret->ext.alpn_selected = NULL; in d2i_SSL_SESSION_ex() [all …]
|
H A D | ssl_txt.c | 103 if (x->ext.tick_lifetime_hint) { in SSL_SESSION_print() 106 x->ext.tick_lifetime_hint) <= 0) in SSL_SESSION_print() 109 if (x->ext.tick) { in SSL_SESSION_print() 113 (bp, (const char *)x->ext.tick, (int)x->ext.ticklen, 4) in SSL_SESSION_print() 158 (unsigned int)x->ext.max_early_data) <= 0) in SSL_SESSION_print()
|
H A D | s3_lib.c | 3480 OPENSSL_free(sc->ext.npn); in ssl3_clear() 3481 sc->ext.npn = NULL; in ssl3_clear() 3482 sc->ext.npn_len = 0; in ssl3_clear() 3580 sc->ext.hostname = NULL; in ssl3_ctrl() 3600 sc->ext.debug_arg = parg; in ssl3_ctrl() 3605 ret = sc->ext.status_type; in ssl3_ctrl() 3609 sc->ext.status_type = larg; in ssl3_ctrl() 3619 sc->ext.ocsp.exts = parg; in ssl3_ctrl() 3629 sc->ext.ocsp.ids = parg; in ssl3_ctrl() 3642 sc->ext.ocsp.resp = parg; in ssl3_ctrl() [all …]
|
H A D | ssl_lib.c | 810 s->ext.max_fragment_len_mode = ctx->ext.max_fragment_len_mode; in ossl_ssl_connection_new_int() 817 s->ext.debug_cb = 0; in ossl_ssl_connection_new_int() 820 s->ext.status_type = ctx->ext.status_type; in ossl_ssl_connection_new_int() 848 s->ext.supportedgroups_len = ctx->ext.supportedgroups_len; in ossl_ssl_connection_new_int() 852 s->ext.npn = NULL; in ossl_ssl_connection_new_int() 856 s->ext.alpn = OPENSSL_malloc(ctx->ext.alpn_len); in ossl_ssl_connection_new_int() 861 memcpy(s->ext.alpn, ctx->ext.alpn, ctx->ext.alpn_len); in ossl_ssl_connection_new_int() 862 s->ext.alpn_len = ctx->ext.alpn_len; in ossl_ssl_connection_new_int() 6314 if (s->ext.ocsp.resp == NULL || s->ext.ocsp.resp_len == 0) in ct_extract_ocsp_response_scts() 6754 present[ext->received_order] = ext->type; in SSL_client_hello_get1_extensions_present() [all …]
|
/openssl/test/recipes/ |
H A D | 70-test_key_share.t | 326 my $ext; 359 $ext = pack "C2", 362 $ext = pack "C12", 401 $ext = pack "C8", 426 $ext = pack "C7", 432 $ext = pack "C6H98", 456 my $ext; 471 $ext = pack "C4H64", 477 $ext = pack "C1", 480 $ext = pack "C6", [all …]
|
H A D | 70-test_tls13cookie.t | 78 my $ext = pack "C8", 89 $message->set_extension(TLSProxy::Message::EXT_COOKIE, $ext); 94 my $ext = pack "C7", 102 TLSProxy::Message::EXT_KEY_SHARE, $ext); 113 return if ($cookie cmp $ext) != 0;
|
H A D | 70-test_sslversions.t | 146 my $ext; 148 $ext = pack "C5", 153 $ext = pack "C5", 158 $ext = pack "C5", 163 $ext = pack "C5", 173 TLSProxy::Message::EXT_SUPPORTED_VERSIONS, $ext);
|
H A D | 70-test_tls13downgrade.t | 105 my $ext; 113 $ext = pack "C3", 117 $ext = pack "C3", 122 $message->set_extension(TLSProxy::Message::EXT_SUPPORTED_VERSIONS, $ext);
|
H A D | 70-test_sslsigalgs.t | 368 my $ext; 374 $ext = $message->extension_data->{TLSProxy::Message::EXT_SIG_ALGS}; 375 @algs = unpack('S>*', $ext); 391 $ext = $message->extension_data->{TLSProxy::Message::EXT_SIG_ALGS}; 392 @algs = unpack('S>*', $ext); 487 my $ext = pack "C8", 493 $message->set_extension($type, $ext);
|
/openssl/crypto/bn/ |
H A D | bn_mpi.c | 18 int ext = 0; in BN_bn2mpi() local 24 ext = ((bits & 0x07) == 0); in BN_bn2mpi() 27 return (num + 4 + ext); in BN_bn2mpi() 29 l = num + ext; in BN_bn2mpi() 34 if (ext) in BN_bn2mpi() 36 num = BN_bn2bin(a, &(d[4 + ext])); in BN_bn2mpi() 39 return (num + 4 + ext); in BN_bn2mpi()
|
/openssl/crypto/ct/ |
H A D | ct_sct.c | 40 OPENSSL_free(sct->ext); in SCT_free() 139 void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len) in SCT_set0_extensions() argument 141 OPENSSL_free(sct->ext); in SCT_set0_extensions() 142 sct->ext = ext; in SCT_set0_extensions() 149 OPENSSL_free(sct->ext); in SCT_set1_extensions() 150 sct->ext = NULL; in SCT_set1_extensions() 154 if (ext != NULL && ext_len > 0) { in SCT_set1_extensions() 155 sct->ext = OPENSSL_memdup(ext, ext_len); in SCT_set1_extensions() 156 if (sct->ext == NULL) in SCT_set1_extensions() 225 size_t SCT_get0_extensions(const SCT *sct, unsigned char **ext) in SCT_get0_extensions() argument [all …]
|
/openssl/test/ |
H A D | quicfaultstest.c | 168 int *ext = (int *)encextcbarg; in drop_extensions_cb() local 170 if (!qtest_fault_delete_extension(fault, *ext, ee->extensions, in drop_extensions_cb() 184 int ext, err; in test_drop_extensions() local 194 ext = TLSEXT_TYPE_quic_transport_parameters; in test_drop_extensions() 197 ext = TLSEXT_TYPE_application_layer_protocol_negotiation; in test_drop_extensions() 203 &ext))) in test_drop_extensions()
|