diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 515065de6c..f0f0150d19 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_lib.c,v 1.302 2022/08/21 18:17:11 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.303 2022/08/21 19:32:38 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -339,6 +339,7 @@ SSL_new(SSL_CTX *ctx) | |||
| 339 | s->verify_result = X509_V_OK; | 339 | s->verify_result = X509_V_OK; |
| 340 | 340 | ||
| 341 | s->method = ctx->method; | 341 | s->method = ctx->method; |
| 342 | s->quic_method = ctx->quic_method; | ||
| 342 | 343 | ||
| 343 | if (!s->method->ssl_new(s)) | 344 | if (!s->method->ssl_new(s)) |
| 344 | goto err; | 345 | goto err; |
| @@ -2585,6 +2586,28 @@ SSL_get_error(const SSL *s, int i) | |||
| 2585 | } | 2586 | } |
| 2586 | 2587 | ||
| 2587 | int | 2588 | int |
| 2589 | SSL_CTX_set_quic_method(SSL_CTX *ctx, const SSL_QUIC_METHOD *quic_method) | ||
| 2590 | { | ||
| 2591 | if (ctx->method->dtls) | ||
| 2592 | return 0; | ||
| 2593 | |||
| 2594 | ctx->quic_method = quic_method; | ||
| 2595 | |||
| 2596 | return 1; | ||
| 2597 | } | ||
| 2598 | |||
| 2599 | int | ||
| 2600 | SSL_set_quic_method(SSL *ssl, const SSL_QUIC_METHOD *quic_method) | ||
| 2601 | { | ||
| 2602 | if (ssl->method->dtls) | ||
| 2603 | return 0; | ||
| 2604 | |||
| 2605 | ssl->quic_method = quic_method; | ||
| 2606 | |||
| 2607 | return 1; | ||
| 2608 | } | ||
| 2609 | |||
| 2610 | int | ||
| 2588 | SSL_do_handshake(SSL *s) | 2611 | SSL_do_handshake(SSL *s) |
| 2589 | { | 2612 | { |
| 2590 | if (s->internal->handshake_func == NULL) { | 2613 | if (s->internal->handshake_func == NULL) { |
