Lines Matching defs:context

22 static int final_renegotiate(SSL *s, unsigned int context, int sent);
23 static int init_server_name(SSL *s, unsigned int context);
24 static int final_server_name(SSL *s, unsigned int context, int sent);
25 static int final_ec_pt_formats(SSL *s, unsigned int context, int sent);
26 static int init_session_ticket(SSL *s, unsigned int context);
28 static int init_status_request(SSL *s, unsigned int context);
31 static int init_npn(SSL *s, unsigned int context);
33 static int init_alpn(SSL *s, unsigned int context);
34 static int final_alpn(SSL *s, unsigned int context, int sent);
35 static int init_sig_algs_cert(SSL *s, unsigned int context);
36 static int init_sig_algs(SSL *s, unsigned int context);
37 static int init_certificate_authorities(SSL *s, unsigned int context);
39 unsigned int context,
43 unsigned int context, X509 *x,
46 static int init_srp(SSL *s, unsigned int context);
48 static int init_ec_point_formats(SSL *s, unsigned int context);
49 static int init_etm(SSL *s, unsigned int context);
50 static int init_ems(SSL *s, unsigned int context);
51 static int final_ems(SSL *s, unsigned int context, int sent);
52 static int init_psk_kex_modes(SSL *s, unsigned int context);
53 static int final_key_share(SSL *s, unsigned int context, int sent);
55 static int init_srtp(SSL *s, unsigned int context);
57 static int final_sig_algs(SSL *s, unsigned int context, int sent);
58 static int final_early_data(SSL *s, unsigned int context, int sent);
59 static int final_maxfragmentlen(SSL *s, unsigned int context, int sent);
60 static int init_post_handshake_auth(SSL *s, unsigned int context);
61 static int final_psk(SSL *s, unsigned int context, int sent);
68 * The context that this extension applies to, e.g. what messages and
71 unsigned int context;
76 int (*init)(SSL *s, unsigned int context);
78 int (*parse_ctos)(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
81 int (*parse_stoc)(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
84 EXT_RETURN (*construct_stoc)(SSL *s, WPACKET *pkt, unsigned int context,
87 EXT_RETURN (*construct_ctos)(SSL *s, WPACKET *pkt, unsigned int context,
94 int (*final)(SSL *s, unsigned int context, int sent);
106 * extension is relevant to the given context) even if we did not see the
112 * given context.
117 * The extension context is defined by a series of flags which specify which
402 /* Check whether an extension's context matches the current context */
405 /* Check we're allowed to use this extension in this context */
423 unsigned int context;
439 context = ext_defs[i].context;
447 context = meth->context;
450 if (!validate_context(s, context, thisctx))
459 * |context|. Returns 1 to indicate the extension is allowed or unknown or 0 to
463 static int verify_extension(SSL *s, unsigned int context, unsigned int type,
473 if (!validate_context(s, thisext->context, context))
487 if ((context & SSL_EXT_CLIENT_HELLO) != 0)
489 else if ((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0)
494 if (!validate_context(s, meth->context, context))
507 * Check whether the context defined for an extension |extctx| means whether
508 * the extension is relevant for the current context |thisctx| or not. Returns
509 * 1 if the extension is relevant for this context, and 0 otherwise
546 * Gather a list of all the extensions from the data in |packet]. |context|
561 int tls_collect_extensions(SSL *s, PACKET *packet, unsigned int context,
577 if ((context & SSL_EXT_CLIENT_HELLO) != 0)
603 if (!verify_extension(s, context, type, exts, raw_extensions, &thisex)
606 && (context & SSL_EXT_CLIENT_HELLO) != 0
627 && (context & (SSL_EXT_CLIENT_HELLO
635 && !((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0
658 * Initialise all known extensions relevant to this context,
663 if (thisexd->init != NULL && (thisexd->context & context) != 0
664 && extension_is_relevant(s, thisexd->context, context)
665 && !thisexd->init(s, context)) {
686 * given |context| and the parser has not already been run. If this is for a
692 int tls_parse_extension(SSL *s, TLSEXT_INDEX idx, int context,
696 int (*parser)(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
714 if (!extension_is_relevant(s, extdef->context, context))
720 return parser(s, &currext->data, context, x, chainidx);
729 return custom_ext_parse(s, context, currext->type,
742 int tls_parse_all_extensions(SSL *s, int context, RAW_EXTENSION *exts, X509 *x,
753 if (!tls_parse_extension(s, i, context, exts, x, chainidx)) {
761 * Finalise all known extensions relevant to this context,
766 if (thisexd->final != NULL && (thisexd->context & context) != 0
767 && !thisexd->final(s, context, exts[i].present)) {
780 /* Skip if not relevant for our context */
795 * Construct all the extensions relevant to the current |context| and write
802 int tls_construct_extensions(SSL *s, WPACKET *pkt, unsigned int context,
815 || ((context &
823 if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
832 if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
836 if (!custom_ext_add(s, context, pkt, x, chainidx, max_version)) {
842 EXT_RETURN (*construct)(SSL *s, WPACKET *pkt, unsigned int context,
846 /* Skip if not relevant for our context */
847 if (!should_add_extension(s, thisexd->context, context, max_version))
856 ret = construct(s, pkt, context, x, chainidx);
862 && (context & (SSL_EXT_CLIENT_HELLO
878 * or finalise the associated extension type for the given |context|. For
883 static int final_renegotiate(SSL *s, unsigned int context, int sent)
923 static int init_server_name(SSL *s, unsigned int context)
935 static int final_server_name(SSL *s, unsigned int context, int sent)
975 * context, to avoid the confusing situation of having sess_accept_good
976 * exceed sess_accept (zero) for the new context.
1033 static int final_ec_pt_formats(SSL *s, unsigned int context, int sent)
1071 static int init_session_ticket(SSL *s, unsigned int context)
1080 static int init_status_request(SSL *s, unsigned int context)
1099 static int init_npn(SSL *s, unsigned int context)
1107 static int init_alpn(SSL *s, unsigned int context)
1120 static int final_alpn(SSL *s, unsigned int context, int sent)
1140 static int init_sig_algs(SSL *s, unsigned int context)
1150 static int init_sig_algs_cert(SSL *s, ossl_unused unsigned int context)
1161 static int init_srp(SSL *s, unsigned int context)
1170 static int init_ec_point_formats(SSL *s, unsigned int context)
1179 static int init_etm(SSL *s, unsigned int context)
1186 static int init_ems(SSL *s, unsigned int context)
1196 static int final_ems(SSL *s, unsigned int context, int sent)
1222 static int init_certificate_authorities(SSL *s, unsigned int context)
1230 unsigned int context,
1259 unsigned int context, X509 *x,
1272 static int init_srtp(SSL *s, unsigned int context)
1281 static int final_sig_algs(SSL *s, unsigned int context, int sent)
1292 static int final_key_share(SSL *s, unsigned int context, int sent)
1299 if ((context & SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) != 0)
1456 static int init_psk_kex_modes(SSL *s, unsigned int context)
1642 static int final_early_data(SSL *s, unsigned int context, int sent)
1648 if (context == SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS
1685 static int final_maxfragmentlen(SSL *s, unsigned int context, int sent)
1703 static int init_post_handshake_auth(SSL *s, ossl_unused unsigned int context)
1714 static int final_psk(SSL *s, unsigned int context, int sent)