diff options
| author | beck <> | 2021-10-23 16:29:15 +0000 |
|---|---|---|
| committer | beck <> | 2021-10-23 16:29:15 +0000 |
| commit | 272068e3e2ad0105e402f8f24df89c95eeeb92f9 (patch) | |
| tree | 38d02c3bf3e056c795b3de291d5640ccc31b6038 /src/lib/libssl/ssl_lib.c | |
| parent | bc5f5ccabc07ff4f9b740f57e6cac6847d1ab444 (diff) | |
| download | openbsd-272068e3e2ad0105e402f8f24df89c95eeeb92f9.tar.gz openbsd-272068e3e2ad0105e402f8f24df89c95eeeb92f9.tar.bz2 openbsd-272068e3e2ad0105e402f8f24df89c95eeeb92f9.zip | |
Add new OpenSSL API SSL_CTX_set_num_tickets and friends.
Since we don't support session tickets in LibreSSL at the moment
these functions currently do not have any effect.
Again, symbols will appear with tb@'s reptar sized bump..
ok tb@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index c48cee33b2..3c7bdfd265 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.273 2021/10/23 16:11:30 tb Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.274 2021/10/23 16:29:15 beck 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 | * |
| @@ -265,6 +265,7 @@ SSL_new(SSL_CTX *ctx) | |||
| 265 | s->internal->options = ctx->internal->options; | 265 | s->internal->options = ctx->internal->options; |
| 266 | s->internal->mode = ctx->internal->mode; | 266 | s->internal->mode = ctx->internal->mode; |
| 267 | s->internal->max_cert_list = ctx->internal->max_cert_list; | 267 | s->internal->max_cert_list = ctx->internal->max_cert_list; |
| 268 | s->internal->num_tickets = ctx->internal->num_tickets; | ||
| 268 | 269 | ||
| 269 | if ((s->cert = ssl_cert_dup(ctx->internal->cert)) == NULL) | 270 | if ((s->cert = ssl_cert_dup(ctx->internal->cert)) == NULL) |
| 270 | goto err; | 271 | goto err; |
| @@ -784,6 +785,34 @@ SSL_CTX_get_keylog_callback(const SSL_CTX *ctx) | |||
| 784 | } | 785 | } |
| 785 | 786 | ||
| 786 | int | 787 | int |
| 788 | SSL_set_num_tickets(SSL *s, size_t num_tickets) | ||
| 789 | { | ||
| 790 | s->internal->num_tickets = num_tickets; | ||
| 791 | |||
| 792 | return 1; | ||
| 793 | } | ||
| 794 | |||
| 795 | size_t | ||
| 796 | SSL_get_num_tickets(const SSL *s) | ||
| 797 | { | ||
| 798 | return s->internal->num_tickets; | ||
| 799 | } | ||
| 800 | |||
| 801 | int | ||
| 802 | SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets) | ||
| 803 | { | ||
| 804 | ctx->internal->num_tickets = num_tickets; | ||
| 805 | |||
| 806 | return 1; | ||
| 807 | } | ||
| 808 | |||
| 809 | size_t | ||
| 810 | SSL_CTX_get_num_tickets(const SSL_CTX *ctx) | ||
| 811 | { | ||
| 812 | return ctx->internal->num_tickets; | ||
| 813 | } | ||
| 814 | |||
| 815 | int | ||
| 787 | SSL_CTX_get_verify_mode(const SSL_CTX *ctx) | 816 | SSL_CTX_get_verify_mode(const SSL_CTX *ctx) |
| 788 | { | 817 | { |
| 789 | return (ctx->verify_mode); | 818 | return (ctx->verify_mode); |
