diff options
| author | tb <> | 2025-10-24 09:23:06 +0000 |
|---|---|---|
| committer | tb <> | 2025-10-24 09:23:06 +0000 |
| commit | 2e803cbe8e599c0ae52e9dda44c3d22e3dec105d (patch) | |
| tree | 1745d43df8008897003b3d8082f0f6d76a233b47 /src/lib/libssl/ssl_sess.c | |
| parent | 783e86feca43e6347eff9ec54047dfd62b4c93e0 (diff) | |
| download | openbsd-2e803cbe8e599c0ae52e9dda44c3d22e3dec105d.tar.gz openbsd-2e803cbe8e599c0ae52e9dda44c3d22e3dec105d.tar.bz2 openbsd-2e803cbe8e599c0ae52e9dda44c3d22e3dec105d.zip | |
libssl: const correct the ssl_session_dup() helper
This allows a const correct SSL_SESSION_dup() implementation at the cost
of casting away const due to the const incorrect CRYPTO_dup_ex_data()...
(I should look into fixing that, but things like rust-openssl make that
hard at this point in the release cycle.)
ok kenjiro (as part of a larger diff)
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_sess.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index a5cfc33c04..f2ef124e1e 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_sess.c,v 1.129 2025/03/09 15:53:36 tb Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.130 2025/10/24 09:23:06 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 | * |
| @@ -247,7 +247,7 @@ SSL_SESSION_new(void) | |||
| 247 | LSSL_ALIAS(SSL_SESSION_new); | 247 | LSSL_ALIAS(SSL_SESSION_new); |
| 248 | 248 | ||
| 249 | SSL_SESSION * | 249 | SSL_SESSION * |
| 250 | ssl_session_dup(SSL_SESSION *sess, int include_ticket) | 250 | ssl_session_dup(const SSL_SESSION *sess, int include_ticket) |
| 251 | { | 251 | { |
| 252 | SSL_SESSION *copy; | 252 | SSL_SESSION *copy; |
| 253 | CBS cbs; | 253 | CBS cbs; |
| @@ -313,7 +313,7 @@ ssl_session_dup(SSL_SESSION *sess, int include_ticket) | |||
| 313 | goto err; | 313 | goto err; |
| 314 | 314 | ||
| 315 | if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ©->ex_data, | 315 | if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ©->ex_data, |
| 316 | &sess->ex_data)) | 316 | (CRYPTO_EX_DATA *)&sess->ex_data)) |
| 317 | goto err; | 317 | goto err; |
| 318 | 318 | ||
| 319 | /* Omit prev/next: the new session gets its own slot in the cache. */ | 319 | /* Omit prev/next: the new session gets its own slot in the cache. */ |
