Lines Matching refs:ext

37     const SSL_CUSTOM_EXTENSION *ext = sk_SSL_CUSTOM_EXTENSION_value(stack, i);  in custom_ext_find()  local
38 if (ext->value == value) { in custom_ext_find()
42 return ext; in custom_ext_find()
74 const SSL_CUSTOM_EXTENSION *ext = sk_SSL_CUSTOM_EXTENSION_value(stack, i); in custom_ext_add_hello() local
87 switch (ext->add_callback(ssl, ext->value, &contents, &contents_len, &alert, in custom_ext_add_hello()
88 ext->add_arg)) { in custom_ext_add_hello()
90 if (!CBB_add_u16(extensions, ext->value) || in custom_ext_add_hello()
95 ERR_add_error_dataf("extension: %u", (unsigned) ext->value); in custom_ext_add_hello()
96 if (ext->free_callback && 0 < contents_len) { in custom_ext_add_hello()
97 ext->free_callback(ssl, ext->value, contents, ext->add_arg); in custom_ext_add_hello()
102 if (ext->free_callback && 0 < contents_len) { in custom_ext_add_hello()
103 ext->free_callback(ssl, ext->value, contents, ext->add_arg); in custom_ext_add_hello()
118 ERR_add_error_dataf("extension: %u", (unsigned) ext->value); in custom_ext_add_hello()
133 const SSL_CUSTOM_EXTENSION *ext = in custom_ext_parse_serverhello() local
137 ext == NULL || in custom_ext_parse_serverhello()
146 if (ext->parse_callback != NULL && in custom_ext_parse_serverhello()
147 !ext->parse_callback(ssl, value, CBS_data(extension), CBS_len(extension), in custom_ext_parse_serverhello()
148 out_alert, ext->parse_arg)) { in custom_ext_parse_serverhello()
150 ERR_add_error_dataf("extension: %u", (unsigned)ext->value); in custom_ext_parse_serverhello()
160 const SSL_CUSTOM_EXTENSION *ext = in custom_ext_parse_clienthello() local
163 if (ext == NULL) { in custom_ext_parse_clienthello()
170 if (ext->parse_callback && in custom_ext_parse_clienthello()
171 !ext->parse_callback(ssl, value, CBS_data(extension), CBS_len(extension), in custom_ext_parse_clienthello()
172 out_alert, ext->parse_arg)) { in custom_ext_parse_clienthello()
174 ERR_add_error_dataf("extension: %u", (unsigned)ext->value); in custom_ext_parse_clienthello()
208 SSL_CUSTOM_EXTENSION *ext = OPENSSL_malloc(sizeof(SSL_CUSTOM_EXTENSION)); in custom_ext_append() local
209 if (ext == NULL) { in custom_ext_append()
212 ext->add_callback = add_cb; in custom_ext_append()
213 ext->add_arg = add_arg; in custom_ext_append()
214 ext->free_callback = free_cb; in custom_ext_append()
215 ext->parse_callback = parse_cb; in custom_ext_append()
216 ext->parse_arg = parse_arg; in custom_ext_append()
217 ext->value = extension_value; in custom_ext_append()
222 SSL_CUSTOM_EXTENSION_free(ext); in custom_ext_append()
227 if (!sk_SSL_CUSTOM_EXTENSION_push(*stack, ext)) { in custom_ext_append()
228 SSL_CUSTOM_EXTENSION_free(ext); in custom_ext_append()