summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authorjsing <>2020-10-11 02:22:27 +0000
committerjsing <>2020-10-11 02:22:27 +0000
commitde4705827be90015506e4065c5fcaa759a5eeb2e (patch)
treea536d961ab89e5f295dc904ee7d6fcf5483675c9 /src/lib/libssl/ssl_lib.c
parent4884af0400cb036042f4e33c5f8c58fb076986b4 (diff)
downloadopenbsd-de4705827be90015506e4065c5fcaa759a5eeb2e.tar.gz
openbsd-de4705827be90015506e4065c5fcaa759a5eeb2e.tar.bz2
openbsd-de4705827be90015506e4065c5fcaa759a5eeb2e.zip
Condense and simplify TLS methods.
Historically, OpenSSL has had client and server specific methods - the only difference between these is that the .ssl_connect or .ssl_accept function pointer is set to ssl_undefined_function, with the intention of reducing code size for a statically linked binary that was only a client or server. These days the difference is minimal or non-existant in many cases and we can reduce the amount of code and complexity by having single method. Internally remove all of the client and server specific methods, simplifying code in the process. The external client/server specific API remain, however these now return the same thing as TLS_method() does. ok tb@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r--src/lib/libssl/ssl_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 6e375e1c09..b306137c14 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.234 2020/09/24 18:12:00 jsing Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.235 2020/10/11 02:22: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 *
@@ -345,7 +345,7 @@ SSL_new(SSL_CTX *ctx)
345 goto err; 345 goto err;
346 346
347 s->references = 1; 347 s->references = 1;
348 s->server = (ctx->method->internal->ssl_accept == ssl_undefined_function) ? 0 : 1; 348 s->server = 0;
349 349
350 SSL_clear(s); 350 SSL_clear(s);
351 351