Lines Matching refs:meth

86     custom_ext_method *meth = exts->meths;  in custom_ext_find()  local
88 for (i = 0; i < exts->meths_count; i++, meth++) { in custom_ext_find()
89 if (ext_type == meth->ext_type in custom_ext_find()
90 && (role == ENDPOINT_BOTH || role == meth->role in custom_ext_find()
91 || meth->role == ENDPOINT_BOTH)) { in custom_ext_find()
94 return meth; in custom_ext_find()
106 custom_ext_method *meth = exts->meths; in custom_ext_init() local
108 for (i = 0; i < exts->meths_count; i++, meth++) in custom_ext_init()
109 meth->ext_flags = 0; in custom_ext_init()
120 custom_ext_method *meth; in custom_ext_parse() local
126 meth = custom_ext_find(exts, role, ext_type, NULL); in custom_ext_parse()
128 if (!meth) in custom_ext_parse()
132 if (!extension_is_relevant(s, meth->context, context)) in custom_ext_parse()
142 if ((meth->ext_flags & SSL_EXT_FLAG_SENT) == 0) { in custom_ext_parse()
155 meth->ext_flags |= SSL_EXT_FLAG_RECEIVED; in custom_ext_parse()
158 if (meth->parse_cb == NULL) in custom_ext_parse()
161 if (meth->parse_cb(SSL_CONNECTION_GET_USER_SSL(s), ext_type, context, ext_data, in custom_ext_parse()
162 ext_size, x, chainidx, &al, meth->parse_arg) <= 0) { in custom_ext_parse()
178 custom_ext_method *meth; in custom_ext_add() local
187 meth = exts->meths + i; in custom_ext_add()
189 if (!should_add_extension(s, meth->context, context, maxversion)) in custom_ext_add()
199 if (!(meth->ext_flags & SSL_EXT_FLAG_RECEIVED)) in custom_ext_add()
206 if ((context & SSL_EXT_CLIENT_HELLO) == 0 && meth->add_cb == NULL) in custom_ext_add()
209 if (meth->add_cb != NULL) { in custom_ext_add()
210 int cb_retval = meth->add_cb(SSL_CONNECTION_GET_USER_SSL(s), in custom_ext_add()
211 meth->ext_type, context, &out, in custom_ext_add()
213 meth->add_arg); in custom_ext_add()
224 if (!WPACKET_put_bytes_u16(pkt, meth->ext_type) in custom_ext_add()
228 if (meth->free_cb != NULL) in custom_ext_add()
229 meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type, in custom_ext_add()
230 context, out, meth->add_arg); in custom_ext_add()
239 if (!ossl_assert((meth->ext_flags & SSL_EXT_FLAG_SENT) == 0)) { in custom_ext_add()
240 if (meth->free_cb != NULL) in custom_ext_add()
241 meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type, in custom_ext_add()
242 context, out, meth->add_arg); in custom_ext_add()
252 meth->ext_flags |= SSL_EXT_FLAG_SENT; in custom_ext_add()
254 if (meth->free_cb != NULL) in custom_ext_add()
255 meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type, in custom_ext_add()
256 context, out, meth->add_arg); in custom_ext_add()
334 custom_ext_method *meth; in custom_exts_free() local
336 for (i = 0, meth = exts->meths; i < exts->meths_count; i++, meth++) { in custom_exts_free()
337 if (meth->add_cb != custom_ext_add_old_cb_wrap) in custom_exts_free()
341 OPENSSL_free(meth->add_arg); in custom_exts_free()
342 OPENSSL_free(meth->parse_arg); in custom_exts_free()
365 custom_ext_method *meth, *tmp; in ossl_tls_add_custom_ext_intern() local
410 meth = exts->meths + exts->meths_count; in ossl_tls_add_custom_ext_intern()
411 memset(meth, 0, sizeof(*meth)); in ossl_tls_add_custom_ext_intern()
412 meth->role = role; in ossl_tls_add_custom_ext_intern()
413 meth->context = context; in ossl_tls_add_custom_ext_intern()
414 meth->parse_cb = parse_cb; in ossl_tls_add_custom_ext_intern()
415 meth->add_cb = add_cb; in ossl_tls_add_custom_ext_intern()
416 meth->free_cb = free_cb; in ossl_tls_add_custom_ext_intern()
417 meth->ext_type = ext_type; in ossl_tls_add_custom_ext_intern()
418 meth->add_arg = add_arg; in ossl_tls_add_custom_ext_intern()
419 meth->parse_arg = parse_arg; in ossl_tls_add_custom_ext_intern()