summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bio_ssl.c
diff options
context:
space:
mode:
authortb <>2018-08-24 20:30:21 +0000
committertb <>2018-08-24 20:30:21 +0000
commit24d8534c6d28231884edd9cd4f92d3c159d7529d (patch)
tree178f87a146a07d41a49712b685a292a7bd8a6362 /src/lib/libssl/bio_ssl.c
parent2e9cc12db341d66727099e500ca968482802fde1 (diff)
downloadopenbsd-24d8534c6d28231884edd9cd4f92d3c159d7529d.tar.gz
openbsd-24d8534c6d28231884edd9cd4f92d3c159d7529d.tar.bz2
openbsd-24d8534c6d28231884edd9cd4f92d3c159d7529d.zip
Let SSL_copy_session_id() return an int for error checking.
Accordingly, add some error checking to SSL_copy_session_id(), BIO_ssl_copy_session_id(), and SSL_dup(). Prompted by OpenSSL commit 17dd65e6e1f Tested in a bulk build by sthen ok jsing
Diffstat (limited to 'src/lib/libssl/bio_ssl.c')
-rw-r--r--src/lib/libssl/bio_ssl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c
index d68e011c62..93cfa0d2a4 100644
--- a/src/lib/libssl/bio_ssl.c
+++ b/src/lib/libssl/bio_ssl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_ssl.c,v 1.28 2018/05/01 13:30:24 tb Exp $ */ 1/* $OpenBSD: bio_ssl.c,v 1.29 2018/08/24 20:30:21 tb 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 *
@@ -568,7 +568,9 @@ BIO_ssl_copy_session_id(BIO *t, BIO *f)
568 if ((((BIO_SSL *)t->ptr)->ssl == NULL) || 568 if ((((BIO_SSL *)t->ptr)->ssl == NULL) ||
569 (((BIO_SSL *)f->ptr)->ssl == NULL)) 569 (((BIO_SSL *)f->ptr)->ssl == NULL))
570 return (0); 570 return (0);
571 SSL_copy_session_id(((BIO_SSL *)t->ptr)->ssl, ((BIO_SSL *)f->ptr)->ssl); 571 if (!SSL_copy_session_id(((BIO_SSL *)t->ptr)->ssl,
572 ((BIO_SSL *)f->ptr)->ssl))
573 return (0);
572 return (1); 574 return (1);
573} 575}
574 576