diff options
author | tb <> | 2018-08-24 20:30:21 +0000 |
---|---|---|
committer | tb <> | 2018-08-24 20:30:21 +0000 |
commit | f6faa42a2e718b5331e22139845d05acd06ceb7e (patch) | |
tree | 178f87a146a07d41a49712b685a292a7bd8a6362 /src/lib/libssl/bio_ssl.c | |
parent | acbbcd39d35326b275f28f6a108e12506a819b8e (diff) | |
download | openbsd-f6faa42a2e718b5331e22139845d05acd06ceb7e.tar.gz openbsd-f6faa42a2e718b5331e22139845d05acd06ceb7e.tar.bz2 openbsd-f6faa42a2e718b5331e22139845d05acd06ceb7e.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.c | 6 |
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 | ||