summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2019-04-22 14:49:42 +0000
committerjsing <>2019-04-22 14:49:42 +0000
commit6b84d880719e36db21e824f5474abd9536466ccb (patch)
tree63b0ea25d0746842832bbfbb818b6338df9733d6 /src/lib
parent6cb76fe84ed5d0dde673a8aea04318d4dbcc96d9 (diff)
downloadopenbsd-6b84d880719e36db21e824f5474abd9536466ccb.tar.gz
openbsd-6b84d880719e36db21e824f5474abd9536466ccb.tar.bz2
openbsd-6b84d880719e36db21e824f5474abd9536466ccb.zip
Inline and remove the tlsext_tick_md macro.
There is not much point having a tlsext_tick_md macro that replaces EVP_sha256() in two places, when the cipher is just hardcoded. ok tb@
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/ssl_locl.h3
-rw-r--r--src/lib/libssl/ssl_srvr.c4
-rw-r--r--src/lib/libssl/t1_lib.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 31f3e60893..b895de1fd3 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.245 2019/04/04 16:44:24 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.246 2019/04/22 14:49:42 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 *
@@ -1327,7 +1327,6 @@ int ssl_check_clienthello_tlsext_early(SSL *s);
1327int ssl_check_clienthello_tlsext_late(SSL *s); 1327int ssl_check_clienthello_tlsext_late(SSL *s);
1328int ssl_check_serverhello_tlsext(SSL *s); 1328int ssl_check_serverhello_tlsext(SSL *s);
1329 1329
1330#define tlsext_tick_md EVP_sha256
1331int tls1_process_ticket(SSL *s, const unsigned char *session_id, 1330int tls1_process_ticket(SSL *s, const unsigned char *session_id,
1332 int session_id_len, CBS *ext_block, SSL_SESSION **ret); 1331 int session_id_len, CBS *ext_block, SSL_SESSION **ret);
1333 1332
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c
index 745d0228f3..0a53343058 100644
--- a/src/lib/libssl/ssl_srvr.c
+++ b/src/lib/libssl/ssl_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_srvr.c,v 1.66 2019/03/25 17:21:18 jsing Exp $ */ 1/* $OpenBSD: ssl_srvr.c,v 1.67 2019/04/22 14:49:42 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 *
@@ -2553,7 +2553,7 @@ ssl3_send_newsession_ticket(SSL *s)
2553 EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, 2553 EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL,
2554 tctx->internal->tlsext_tick_aes_key, iv); 2554 tctx->internal->tlsext_tick_aes_key, iv);
2555 HMAC_Init_ex(&hctx, tctx->internal->tlsext_tick_hmac_key, 2555 HMAC_Init_ex(&hctx, tctx->internal->tlsext_tick_hmac_key,
2556 16, tlsext_tick_md(), NULL); 2556 16, EVP_sha256(), NULL);
2557 memcpy(key_name, tctx->internal->tlsext_tick_key_name, 16); 2557 memcpy(key_name, tctx->internal->tlsext_tick_key_name, 16);
2558 } 2558 }
2559 2559
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index 75c936abc7..b8aa989413 100644
--- a/src/lib/libssl/t1_lib.c
+++ b/src/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.157 2019/04/21 14:41:30 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.158 2019/04/22 14:49:42 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 *
@@ -925,7 +925,7 @@ tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
925 goto done; 925 goto done;
926 } 926 }
927 HMAC_Init_ex(&hctx, tctx->internal->tlsext_tick_hmac_key, 927 HMAC_Init_ex(&hctx, tctx->internal->tlsext_tick_hmac_key,
928 16, tlsext_tick_md(), NULL); 928 16, EVP_sha256(), NULL);
929 EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, 929 EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL,
930 tctx->internal->tlsext_tick_aes_key, etick + 16); 930 tctx->internal->tlsext_tick_aes_key, etick + 16);
931 } 931 }