summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
authorjsing <>2021-04-30 19:26:45 +0000
committerjsing <>2021-04-30 19:26:45 +0000
commit43140dd2d9a01de0fff0ae59aec0e1d7cda76474 (patch)
tree3facea5851b6c8afd6d09865048a1f9e6e0c0c8b /src/lib/libssl/ssl_locl.h
parent83b76ed417b8b5f76bcd75ebddd3441a55c890ce (diff)
downloadopenbsd-43140dd2d9a01de0fff0ae59aec0e1d7cda76474.tar.gz
openbsd-43140dd2d9a01de0fff0ae59aec0e1d7cda76474.tar.bz2
openbsd-43140dd2d9a01de0fff0ae59aec0e1d7cda76474.zip
Clean up and harden TLSv1.2 master key derivation.
The master key and its length are only stored in one location, so it makes no sense to handle these outside of the derivation function (the current 'out' argument is unused). This simplifies the various call sites. If derivation fails for some reason, fail hard rather than continuing on and hoping that something deals with this correctly later. ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r--src/lib/libssl/ssl_locl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index a9cab69ee0..c55dada70f 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_locl.h,v 1.338 2021/04/25 13:15:22 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.339 2021/04/30 19:26:44 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 *
@@ -1379,8 +1379,6 @@ int tls1_PRF(SSL *s, const unsigned char *secret, size_t secret_len,
1379void tls1_cleanup_key_block(SSL *s); 1379void tls1_cleanup_key_block(SSL *s);
1380int tls1_change_cipher_state(SSL *s, int which); 1380int tls1_change_cipher_state(SSL *s, int which);
1381int tls1_setup_key_block(SSL *s); 1381int tls1_setup_key_block(SSL *s);
1382int tls1_generate_master_secret(SSL *s, unsigned char *out,
1383 unsigned char *p, int len);
1384int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen, 1382int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen,
1385 const char *label, size_t llen, const unsigned char *p, size_t plen, 1383 const char *label, size_t llen, const unsigned char *p, size_t plen,
1386 int use_context); 1384 int use_context);
@@ -1389,6 +1387,8 @@ int ssl_ok(SSL *s);
1389 1387
1390int tls12_derive_finished(SSL *s); 1388int tls12_derive_finished(SSL *s);
1391int tls12_derive_peer_finished(SSL *s); 1389int tls12_derive_peer_finished(SSL *s);
1390int tls12_derive_master_secret(SSL *s, uint8_t *premaster_secret,
1391 size_t premaster_secret_len);
1392 1392
1393int ssl_using_ecc_cipher(SSL *s); 1393int ssl_using_ecc_cipher(SSL *s);
1394int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s); 1394int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s);