Lines Matching refs:ext

39     if (s->ext.hostname == NULL)
49 || !WPACKET_sub_memcpy_u16(pkt, s->ext.hostname,
50 strlen(s->ext.hostname))
65 if (s->ext.max_fragment_len_mode == TLSEXT_max_fragment_length_DISABLED)
76 || !WPACKET_put_bytes_u8(pkt, s->ext.max_fragment_len_mode)
264 && s->session->ext.tick != NULL
266 ticklen = s->session->ext.ticklen;
267 } else if (s->session && s->ext.session_ticket != NULL
268 && s->ext.session_ticket->data != NULL) {
269 ticklen = s->ext.session_ticket->length;
270 s->session->ext.tick = OPENSSL_malloc(ticklen);
271 if (s->session->ext.tick == NULL) {
275 memcpy(s->session->ext.tick,
276 s->ext.session_ticket->data, ticklen);
277 s->session->ext.ticklen = ticklen;
282 if (ticklen == 0 && s->ext.session_ticket != NULL &&
283 s->ext.session_ticket->data == NULL)
287 || !WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick, ticklen)) {
332 if (s->ext.status_type != TLSEXT_STATUSTYPE_ocsp)
344 for (i = 0; i < sk_OCSP_RESPID_num(s->ext.ocsp.ids); i++) {
346 OCSP_RESPID *id = sk_OCSP_RESPID_value(s->ext.ocsp.ids, i);
362 if (s->ext.ocsp.exts) {
364 int extlen = i2d_X509_EXTENSIONS(s->ext.ocsp.exts, NULL);
371 || i2d_X509_EXTENSIONS(s->ext.ocsp.exts, &extbytes)
390 if (s->ctx->ext.npn_select_cb == NULL || !SSL_IS_FIRST_HANDSHAKE(s))
412 if (s->ext.alpn == NULL || !SSL_IS_FIRST_HANDSHAKE(s))
419 || !WPACKET_sub_memcpy_u16(pkt, s->ext.alpn, s->ext.alpn_len)
584 s->ext.psk_kex_mode = TLSEXT_KEX_MODE_FLAG_KE_DHE;
586 s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE;
717 if (s->ext.tls13_cookie_len == 0)
723 || !WPACKET_sub_memcpy_u16(pkt, s->ext.tls13_cookie,
724 s->ext.tls13_cookie_len)
732 OPENSSL_free(s->ext.tls13_cookie);
733 s->ext.tls13_cookie = NULL;
734 s->ext.tls13_cookie_len = 0;
825 || (s->session->ext.max_early_data == 0
826 && (psksess == NULL || psksess->ext.max_early_data == 0))) {
830 edsess = s->session->ext.max_early_data != 0 ? s->session : psksess;
831 s->max_early_data = edsess->ext.max_early_data;
833 if (edsess->ext.hostname != NULL) {
834 if (s->ext.hostname == NULL
835 || (s->ext.hostname != NULL
836 && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) {
843 if ((s->ext.alpn == NULL && edsess->ext.alpn_selected != NULL)) {
852 if (edsess->ext.alpn_selected != NULL) {
856 if (!PACKET_buf_init(&prots, s->ext.alpn, s->ext.alpn_len)) {
861 if (PACKET_equal(&alpnpkt, edsess->ext.alpn_selected,
862 edsess->ext.alpn_selected_len)) {
885 s->ext.early_data = SSL_EARLY_DATA_REJECTED;
886 s->ext.early_data_ok = 1;
934 && s->session->ext.ticklen != 0
943 hlen += PSK_PRE_BINDER_OVERHEAD + s->session->ext.ticklen
987 s->ext.tick_identity = 0;
1000 || (s->session->ext.ticklen == 0 && s->psksession == NULL))
1006 if (s->session->ext.ticklen != 0) {
1049 if (s->session->ext.tick_lifetime_hint < agesec) {
1072 agems += s->session->ext.tick_age_add;
1075 s->ext.tick_identity++;
1115 if (!WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick,
1116 s->session->ext.ticklen)
1130 s->ext.tick_identity++;
1280 if (value != s->ext.max_fragment_len_mode) {
1290 s->session->ext.max_fragment_len_mode = value;
1298 if (s->ext.hostname == NULL) {
1309 if (s->session->ext.hostname != NULL) {
1313 s->session->ext.hostname = OPENSSL_strdup(s->ext.hostname);
1314 if (s->session->ext.hostname == NULL) {
1340 s->ext.peer_ecpointformats_len = 0;
1341 OPENSSL_free(s->ext.peer_ecpointformats);
1342 s->ext.peer_ecpointformats = OPENSSL_malloc(ecpointformats_len);
1343 if (s->ext.peer_ecpointformats == NULL) {
1344 s->ext.peer_ecpointformats_len = 0;
1349 s->ext.peer_ecpointformats_len = ecpointformats_len;
1352 s->ext.peer_ecpointformats,
1365 if (s->ext.session_ticket_cb != NULL &&
1366 !s->ext.session_ticket_cb(s, PACKET_data(pkt),
1368 s->ext.session_ticket_cb_arg)) {
1382 s->ext.ticket_expected = 1;
1400 if (s->ext.status_type != TLSEXT_STATUSTYPE_ocsp) {
1421 s->ext.status_expected = 1;
1446 OPENSSL_free(s->ext.scts);
1447 s->ext.scts = NULL;
1449 s->ext.scts_len = (uint16_t)size;
1451 s->ext.scts = OPENSSL_malloc(size);
1452 if (s->ext.scts == NULL) {
1453 s->ext.scts_len = 0;
1457 if (!PACKET_copy_bytes(pkt, s->ext.scts, size)) {
1524 if (s->ctx->ext.npn_select_cb == NULL) {
1535 if (s->ctx->ext.npn_select_cb(s, &selected, &selected_len,
1538 s->ctx->ext.npn_select_cb_arg) !=
1548 OPENSSL_free(s->ext.npn);
1549 s->ext.npn = OPENSSL_malloc(selected_len);
1550 if (s->ext.npn == NULL) {
1551 s->ext.npn_len = 0;
1556 memcpy(s->ext.npn, selected, selected_len);
1557 s->ext.npn_len = selected_len;
1599 if (s->session->ext.alpn_selected == NULL
1600 || s->session->ext.alpn_selected_len != len
1601 || memcmp(s->session->ext.alpn_selected, s->s3.alpn_selected, len)
1604 s->ext.early_data_ok = 0;
1611 if (!ossl_assert(s->session->ext.alpn_selected == NULL)) {
1615 s->session->ext.alpn_selected =
1617 if (s->session->ext.alpn_selected == NULL) {
1618 s->session->ext.alpn_selected_len = 0;
1622 s->session->ext.alpn_selected_len = s->s3.alpn_selected_len;
1689 s->ext.use_etm = 1;
1881 || !PACKET_memdup(&cookie, &s->ext.tls13_cookie,
1882 &s->ext.tls13_cookie_len)) {
1902 s->session->ext.max_early_data = max_early_data;
1912 if (!s->ext.early_data_ok
1923 s->ext.early_data = SSL_EARLY_DATA_ACCEPTED;
1939 if (identity >= (unsigned int)s->ext.tick_identity) {
1949 if (identity == 0 && (s->psksession == NULL || s->ext.tick_identity == 2)) {
1969 || s->session->ext.max_early_data > 0
1970 || s->psksession->ext.max_early_data == 0)
1979 s->ext.early_data_ok = 0;