summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2020-10-03 17:54:27 +0000
committerjsing <>2020-10-03 17:54:27 +0000
commit7ec834bc3417b066072208fd7b33985994ff8ec2 (patch)
tree6c76eeaf72b5b0ed9834b97029e929a63797308b
parent3058247715ff89d092334e9137126e12b7220589 (diff)
downloadopenbsd-7ec834bc3417b066072208fd7b33985994ff8ec2.tar.gz
openbsd-7ec834bc3417b066072208fd7b33985994ff8ec2.tar.bz2
openbsd-7ec834bc3417b066072208fd7b33985994ff8ec2.zip
Use TLSv1_1_enc_data instead of DTLSv1_enc_data.
DTLSv1 is TLSv1.1 over datagrams - there is no need for a separate SSL3_ENC_METHOD struct, just use TLSv1_1_enc_data and remove DTLSv1_enc_data entirely. ok tb@
-rw-r--r--src/lib/libssl/d1_lib.c6
-rw-r--r--src/lib/libssl/ssl_locl.h3
-rw-r--r--src/lib/libssl/ssl_methods.c8
3 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c
index b7d23ef4ca..b4ce2c0722 100644
--- a/src/lib/libssl/d1_lib.c
+++ b/src/lib/libssl/d1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_lib.c,v 1.50 2020/09/26 14:43:17 jsing Exp $ */ 1/* $OpenBSD: d1_lib.c,v 1.51 2020/10/03 17:54:27 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -74,10 +74,6 @@ void dtls1_hm_fragment_free(hm_fragment *frag);
74 74
75static int dtls1_listen(SSL *s, struct sockaddr *client); 75static int dtls1_listen(SSL *s, struct sockaddr *client);
76 76
77SSL3_ENC_METHOD DTLSv1_enc_data = {
78 .enc_flags = SSL_ENC_FLAG_EXPLICIT_IV,
79};
80
81int 77int
82dtls1_new(SSL *s) 78dtls1_new(SSL *s)
83{ 79{
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 0dda3ecd01..22f9760225 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.296 2020/10/03 17:35:16 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.297 2020/10/03 17:54:27 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 *
@@ -1140,7 +1140,6 @@ const SSL_METHOD *tls_legacy_server_method(void);
1140const SSL_METHOD *ssl_get_client_method(uint16_t version); 1140const SSL_METHOD *ssl_get_client_method(uint16_t version);
1141const SSL_METHOD *ssl_get_server_method(uint16_t version); 1141const SSL_METHOD *ssl_get_server_method(uint16_t version);
1142 1142
1143extern SSL3_ENC_METHOD DTLSv1_enc_data;
1144extern SSL3_ENC_METHOD TLSv1_enc_data; 1143extern SSL3_ENC_METHOD TLSv1_enc_data;
1145extern SSL3_ENC_METHOD TLSv1_1_enc_data; 1144extern SSL3_ENC_METHOD TLSv1_1_enc_data;
1146extern SSL3_ENC_METHOD TLSv1_2_enc_data; 1145extern SSL3_ENC_METHOD TLSv1_2_enc_data;
diff --git a/src/lib/libssl/ssl_methods.c b/src/lib/libssl/ssl_methods.c
index ff8d17af06..ddfb8dfdba 100644
--- a/src/lib/libssl/ssl_methods.c
+++ b/src/lib/libssl/ssl_methods.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_methods.c,v 1.16 2020/09/17 15:23:29 jsing Exp $ */ 1/* $OpenBSD: ssl_methods.c,v 1.17 2020/10/03 17:54:27 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 *
@@ -74,7 +74,7 @@ static const SSL_METHOD_INTERNAL DTLSv1_client_method_internal_data = {
74 .ssl_pending = ssl3_pending, 74 .ssl_pending = ssl3_pending,
75 .ssl_read_bytes = dtls1_read_bytes, 75 .ssl_read_bytes = dtls1_read_bytes,
76 .ssl_write_bytes = dtls1_write_app_data_bytes, 76 .ssl_write_bytes = dtls1_write_app_data_bytes,
77 .ssl3_enc = &DTLSv1_enc_data, 77 .ssl3_enc = &TLSv1_1_enc_data,
78}; 78};
79 79
80static const SSL_METHOD DTLSv1_client_method_data = { 80static const SSL_METHOD DTLSv1_client_method_data = {
@@ -113,7 +113,7 @@ static const SSL_METHOD_INTERNAL DTLSv1_method_internal_data = {
113 .ssl_pending = ssl3_pending, 113 .ssl_pending = ssl3_pending,
114 .ssl_read_bytes = dtls1_read_bytes, 114 .ssl_read_bytes = dtls1_read_bytes,
115 .ssl_write_bytes = dtls1_write_app_data_bytes, 115 .ssl_write_bytes = dtls1_write_app_data_bytes,
116 .ssl3_enc = &DTLSv1_enc_data, 116 .ssl3_enc = &TLSv1_1_enc_data,
117}; 117};
118 118
119static const SSL_METHOD DTLSv1_method_data = { 119static const SSL_METHOD DTLSv1_method_data = {
@@ -152,7 +152,7 @@ static const SSL_METHOD_INTERNAL DTLSv1_server_method_internal_data = {
152 .ssl_pending = ssl3_pending, 152 .ssl_pending = ssl3_pending,
153 .ssl_read_bytes = dtls1_read_bytes, 153 .ssl_read_bytes = dtls1_read_bytes,
154 .ssl_write_bytes = dtls1_write_app_data_bytes, 154 .ssl_write_bytes = dtls1_write_app_data_bytes,
155 .ssl3_enc = &DTLSv1_enc_data, 155 .ssl3_enc = &TLSv1_1_enc_data,
156}; 156};
157 157
158static const SSL_METHOD DTLSv1_server_method_data = { 158static const SSL_METHOD DTLSv1_server_method_data = {