Lines Matching refs:meth
86 custom_ext_method *meth = exts->meths;
88 for (i = 0; i < exts->meths_count; i++, meth++) {
89 if (ext_type == meth->ext_type
90 && (role == ENDPOINT_BOTH || role == meth->role
91 || meth->role == ENDPOINT_BOTH)) {
94 return meth;
106 custom_ext_method *meth = exts->meths;
108 for (i = 0; i < exts->meths_count; i++, meth++)
109 meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
120 custom_ext_method *meth;
126 meth = custom_ext_find(exts, role, ext_type, NULL);
128 if (!meth)
132 if (!extension_is_relevant(s, meth->context, context))
140 if ((meth->ext_flags & SSL_EXT_FLAG_SENT) == 0) {
153 meth->ext_flags |= SSL_EXT_FLAG_RECEIVED;
156 if (meth->parse_cb == NULL)
159 if (meth->parse_cb(SSL_CONNECTION_GET_USER_SSL(s), ext_type, context, ext_data,
160 ext_size, x, chainidx, &al, meth->parse_arg)
177 custom_ext_method *meth;
186 meth = exts->meths + i;
188 if (!should_add_extension(s, meth->context, context, maxversion))
193 if (!(meth->ext_flags & SSL_EXT_FLAG_RECEIVED))
200 if ((context & SSL_EXT_CLIENT_HELLO) == 0 && meth->add_cb == NULL)
203 if (meth->add_cb != NULL) {
204 int cb_retval = meth->add_cb(SSL_CONNECTION_GET_USER_SSL(s),
205 meth->ext_type, context, &out,
207 meth->add_arg);
218 if (!WPACKET_put_bytes_u16(pkt, meth->ext_type)
222 if (meth->free_cb != NULL)
223 meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
224 context, out, meth->add_arg);
233 if (!ossl_assert((meth->ext_flags & SSL_EXT_FLAG_SENT) == 0)) {
234 if (meth->free_cb != NULL)
235 meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
236 context, out, meth->add_arg);
246 meth->ext_flags |= SSL_EXT_FLAG_SENT;
248 if (meth->free_cb != NULL)
249 meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
250 context, out, meth->add_arg);
375 custom_ext_method *meth;
377 for (i = 0, meth = exts->meths; i < exts->meths_count; i++, meth++) {
378 if (meth->add_cb != custom_ext_add_old_cb_wrap)
382 OPENSSL_free(meth->add_arg);
383 OPENSSL_free(meth->parse_arg);
407 custom_ext_method *meth, *tmp;
452 meth = exts->meths + exts->meths_count;
453 memset(meth, 0, sizeof(*meth));
454 meth->role = role;
455 meth->context = context;
456 meth->parse_cb = parse_cb;
457 meth->add_cb = add_cb;
458 meth->free_cb = free_cb;
459 meth->ext_type = ext_type;
460 meth->ext_flags = (ctx == NULL) ? SSL_EXT_FLAG_CONN : 0;
461 meth->add_arg = add_arg;
462 meth->parse_arg = parse_arg;