diff options
author | tb <> | 2020-09-19 10:05:00 +0000 |
---|---|---|
committer | tb <> | 2020-09-19 10:05:00 +0000 |
commit | 6946a1a0fe28e7ca3594e290ba2654826ac23618 (patch) | |
tree | 159c0e06b1712f3b1ba39cd6ae96914dc31c2fd3 /src | |
parent | 6c23be8ae2a3bfec4de157d86a462d08f4efd3ed (diff) | |
download | openbsd-6946a1a0fe28e7ca3594e290ba2654826ac23618.tar.gz openbsd-6946a1a0fe28e7ca3594e290ba2654826ac23618.tar.bz2 openbsd-6946a1a0fe28e7ca3594e290ba2654826ac23618.zip |
Prepare to provide SSL{,_CTX}_{get,set}_max_early_data
Similar to the SSL_SESSION versions, these are noops that are expected
to be available by some configure tests.
ok beck jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/ssl.h | 11 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 25 |
2 files changed, 34 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 401c9cf843..b01c426c9c 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.174 2020/09/19 09:56:34 tb Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.175 2020/09/19 10:05:00 tb 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 | * |
@@ -1458,6 +1458,15 @@ int SSL_is_server(const SSL *s); | |||
1458 | int SSL_read(SSL *ssl, void *buf, int num); | 1458 | int SSL_read(SSL *ssl, void *buf, int num); |
1459 | int SSL_peek(SSL *ssl, void *buf, int num); | 1459 | int SSL_peek(SSL *ssl, void *buf, int num); |
1460 | int SSL_write(SSL *ssl, const void *buf, int num); | 1460 | int SSL_write(SSL *ssl, const void *buf, int num); |
1461 | |||
1462 | #if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL) | ||
1463 | uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx); | ||
1464 | int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data); | ||
1465 | |||
1466 | uint32_t SSL_get_max_early_data(const SSL *s); | ||
1467 | int SSL_set_max_early_data(SSL *s, uint32_t max_early_data); | ||
1468 | #endif | ||
1469 | |||
1461 | long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg); | 1470 | long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg); |
1462 | long SSL_callback_ctrl(SSL *, int, void (*)(void)); | 1471 | long SSL_callback_ctrl(SSL *, int, void (*)(void)); |
1463 | long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg); | 1472 | long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg); |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index c184f75abe..3c62f39a57 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.230 2020/09/18 16:18:56 schwarze Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.231 2020/09/19 10:05:00 tb 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 | * |
@@ -1000,6 +1000,29 @@ SSL_write(SSL *s, const void *buf, int num) | |||
1000 | return ssl3_write(s, buf, num); | 1000 | return ssl3_write(s, buf, num); |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | uint32_t | ||
1004 | SSL_CTX_get_max_early_data(const SSL_CTX *ctx) | ||
1005 | { | ||
1006 | return 0; | ||
1007 | } | ||
1008 | |||
1009 | int | ||
1010 | SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data) | ||
1011 | { | ||
1012 | return 1; | ||
1013 | } | ||
1014 | |||
1015 | uint32_t | ||
1016 | SSL_get_max_early_data(const SSL *s) | ||
1017 | { | ||
1018 | return 0; | ||
1019 | } | ||
1020 | |||
1021 | int | ||
1022 | SSL_set_max_early_data(SSL *s, uint32_t max_early_data) | ||
1023 | { | ||
1024 | return 1; | ||
1025 | } | ||
1003 | int | 1026 | int |
1004 | SSL_shutdown(SSL *s) | 1027 | SSL_shutdown(SSL *s) |
1005 | { | 1028 | { |