summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2017-01-26 00:42:44 +0000
committerjsing <>2017-01-26 00:42:44 +0000
commit343d327fc13befa69643d8929e2c9e176e532b9d (patch)
tree32974d9a5d142477eb7229916f98dc9d11938d24 /src
parentd3fd96f3fbff7bd85db9b591fd51b5a19fda0113 (diff)
downloadopenbsd-343d327fc13befa69643d8929e2c9e176e532b9d.tar.gz
openbsd-343d327fc13befa69643d8929e2c9e176e532b9d.tar.bz2
openbsd-343d327fc13befa69643d8929e2c9e176e532b9d.zip
Remove ssl3_undef_enc_method - if we have internal bugs we want to segfault
so that we can debug it, rather than adding a "should not be called" error to the stack. Discussed with beck@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_lib.c29
-rw-r--r--src/lib/libssl/ssl_locl.h3
-rw-r--r--src/lib/libssl/t1_clnt.c4
-rw-r--r--src/lib/libssl/t1_meth.c4
-rw-r--r--src/lib/libssl/t1_srvr.c4
5 files changed, 8 insertions, 36 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 8afb4909c3..649b238bd9 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.150 2017/01/25 10:54:23 jsing Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.151 2017/01/26 00:42: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 *
@@ -159,33 +159,6 @@
159 159
160const char *SSL_version_str = OPENSSL_VERSION_TEXT; 160const char *SSL_version_str = OPENSSL_VERSION_TEXT;
161 161
162SSL3_ENC_METHOD ssl3_undef_enc_method = {
163 /*
164 * Evil casts, but these functions are only called if there's a
165 * library bug.
166 */
167 .enc = (int (*)(SSL *, int))ssl_undefined_function,
168 .mac = (int (*)(SSL *, unsigned char *, int))ssl_undefined_function,
169 .setup_key_block = ssl_undefined_function,
170 .generate_master_secret = (int (*)(SSL *, unsigned char *,
171 unsigned char *, int))ssl_undefined_function,
172 .change_cipher_state = (int (*)(SSL*, int))ssl_undefined_function,
173 .final_finish_mac = (int (*)(SSL *, const char*, int,
174 unsigned char *))ssl_undefined_function,
175 .finish_mac_length = 0,
176 .cert_verify_mac = (int (*)(SSL *, int,
177 unsigned char *))ssl_undefined_function,
178 .client_finished_label = NULL,
179 .client_finished_label_len = 0,
180 .server_finished_label = NULL,
181 .server_finished_label_len = 0,
182 .alert_value = (int (*)(int))ssl_undefined_function,
183 .export_keying_material = (int (*)(SSL *, unsigned char *, size_t,
184 const char *, size_t, const unsigned char *, size_t,
185 int use_context))ssl_undefined_function,
186 .enc_flags = 0,
187};
188
189int 162int
190SSL_clear(SSL *s) 163SSL_clear(SSL *s)
191{ 164{
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 7c3fb4f5e4..b682fc062e 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.167 2017/01/25 10:54:23 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.168 2017/01/26 00:42: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 *
@@ -1074,7 +1074,6 @@ struct ssl_aead_ctx_st {
1074 char variable_nonce_in_record; 1074 char variable_nonce_in_record;
1075}; 1075};
1076 1076
1077extern SSL3_ENC_METHOD ssl3_undef_enc_method;
1078extern SSL_CIPHER ssl3_ciphers[]; 1077extern SSL_CIPHER ssl3_ciphers[];
1079 1078
1080const char *ssl_version_string(int ver); 1079const char *ssl_version_string(int ver);
diff --git a/src/lib/libssl/t1_clnt.c b/src/lib/libssl/t1_clnt.c
index 5b8f7cd412..d185df3c79 100644
--- a/src/lib/libssl/t1_clnt.c
+++ b/src/lib/libssl/t1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_clnt.c,v 1.22 2017/01/23 13:36:13 jsing Exp $ */ 1/* $OpenBSD: t1_clnt.c,v 1.23 2017/01/26 00:42: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 *
@@ -88,7 +88,7 @@ static const SSL_METHOD_INTERNAL TLS_client_method_internal_data = {
88 .ssl_get_message = ssl3_get_message, 88 .ssl_get_message = ssl3_get_message,
89 .ssl_read_bytes = ssl3_read_bytes, 89 .ssl_read_bytes = ssl3_read_bytes,
90 .ssl_write_bytes = ssl3_write_bytes, 90 .ssl_write_bytes = ssl3_write_bytes,
91 .ssl3_enc = &ssl3_undef_enc_method, 91 .ssl3_enc = NULL,
92}; 92};
93 93
94static const SSL_METHOD TLS_client_method_data = { 94static const SSL_METHOD TLS_client_method_data = {
diff --git a/src/lib/libssl/t1_meth.c b/src/lib/libssl/t1_meth.c
index 51c129b2c9..d6262e48cd 100644
--- a/src/lib/libssl/t1_meth.c
+++ b/src/lib/libssl/t1_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_meth.c,v 1.21 2017/01/23 13:36:13 jsing Exp $ */ 1/* $OpenBSD: t1_meth.c,v 1.22 2017/01/26 00:42: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 *
@@ -86,7 +86,7 @@ static const SSL_METHOD_INTERNAL TLS_method_internal_data = {
86 .ssl_get_message = ssl3_get_message, 86 .ssl_get_message = ssl3_get_message,
87 .ssl_read_bytes = ssl3_read_bytes, 87 .ssl_read_bytes = ssl3_read_bytes,
88 .ssl_write_bytes = ssl3_write_bytes, 88 .ssl_write_bytes = ssl3_write_bytes,
89 .ssl3_enc = &ssl3_undef_enc_method, 89 .ssl3_enc = NULL,
90}; 90};
91 91
92static const SSL_METHOD TLS_method_data = { 92static const SSL_METHOD TLS_method_data = {
diff --git a/src/lib/libssl/t1_srvr.c b/src/lib/libssl/t1_srvr.c
index 3083ed65a4..69da5cbb67 100644
--- a/src/lib/libssl/t1_srvr.c
+++ b/src/lib/libssl/t1_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_srvr.c,v 1.23 2017/01/23 13:36:13 jsing Exp $ */ 1/* $OpenBSD: t1_srvr.c,v 1.24 2017/01/26 00:42: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 *
@@ -89,7 +89,7 @@ static const SSL_METHOD_INTERNAL TLS_server_method_internal_data = {
89 .ssl_get_message = ssl3_get_message, 89 .ssl_get_message = ssl3_get_message,
90 .ssl_read_bytes = ssl3_read_bytes, 90 .ssl_read_bytes = ssl3_read_bytes,
91 .ssl_write_bytes = ssl3_write_bytes, 91 .ssl_write_bytes = ssl3_write_bytes,
92 .ssl3_enc = &ssl3_undef_enc_method, 92 .ssl3_enc = NULL,
93}; 93};
94 94
95static const SSL_METHOD TLS_server_method_data = { 95static const SSL_METHOD TLS_server_method_data = {