diff options
author | 2020-09-19 10:12:06 +0000 | |
---|---|---|
committer | 2020-09-19 10:12:06 +0000 | |
commit | d9e525cae8f2bafd45fc9239c6e717fd765a9298 (patch) | |
tree | 0f635ea38169c840d61eeafe46551101e81128f7 /lib/libssl/ssl_lib.c | |
parent | Prepare to provide SSL{,_CTX}_{get,set}_max_early_data (diff) | |
download | wireguard-openbsd-d9e525cae8f2bafd45fc9239c6e717fd765a9298.tar.xz wireguard-openbsd-d9e525cae8f2bafd45fc9239c6e717fd765a9298.zip |
Prepare to provide stubbed out versions for reading/writing 0-RTT data
We do not support this feature but need to provide OpenSSL's API since
software assumes it's available whenever TLS1_3_VERSION is available.
These are minimal stubs that should have a decent chance to interact
reasonably with software expecting the tricky upstream semantics, but
this will have to be sorted out with runtime testing, so will likely
have to be refined and revisited.
ok beck jsing
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r-- | lib/libssl/ssl_lib.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 3c62f39a571..b04b67df41c 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.231 2020/09/19 10:05:00 tb Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.232 2020/09/19 10:12:06 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1023,6 +1023,34 @@ SSL_set_max_early_data(SSL *s, uint32_t max_early_data) { return 1; } + +int +SSL_get_early_data_status(const SSL *s) +{ + return SSL_EARLY_DATA_REJECTED; +} + +int +SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes) +{ + *readbytes = 0; + + if (!s->server) { + SSLerror(s, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return SSL_READ_EARLY_DATA_ERROR; + } + + return SSL_READ_EARLY_DATA_FINISH; +} + +int +SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written) +{ + *written = 0; + SSLerror(s, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; +} + int SSL_shutdown(SSL *s) { |