File tree Expand file tree Collapse file tree 1 file changed +5
-19
lines changed Expand file tree Collapse file tree 1 file changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -198,21 +198,6 @@ static int tls_context_server_alpn_select_callback(SSL *ssl,
198
198
return result ;
199
199
}
200
200
201
- static int tls_context_client_alpn_select_callback (SSL * ssl ,
202
- unsigned char * * out ,
203
- unsigned char * outlen ,
204
- const unsigned char * in ,
205
- unsigned int inlen ,
206
- void * arg )
207
- {
208
- return tls_context_server_alpn_select_callback (ssl ,
209
- (const unsigned char * * ) out ,
210
- outlen ,
211
- in ,
212
- inlen ,
213
- arg );
214
- }
215
-
216
201
int tls_context_alpn_set (void * ctx_backend , const char * alpn )
217
202
{
218
203
size_t wire_format_alpn_index ;
@@ -283,10 +268,11 @@ int tls_context_alpn_set(void *ctx_backend, const char *alpn)
283
268
ctx );
284
269
}
285
270
else {
286
- SSL_CTX_set_next_proto_select_cb (
287
- ctx -> ctx ,
288
- tls_context_client_alpn_select_callback ,
289
- ctx );
271
+ if (SSL_CTX_set_alpn_protos (ctx -> ctx ,
272
+ (const unsigned char * ) & ctx -> alpn [1 ],
273
+ (unsigned int )ctx -> alpn [0 ]) != 0 ) {
274
+ result = -1 ;
275
+ }
290
276
}
291
277
}
292
278
You can’t perform that action at this time.
0 commit comments