diff options
author | panda <daniel.phan36@gmail.com> | 2021-03-08 13:12:42 -0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-03-12 10:14:13 +0100 |
commit | 081a7061f3da07318c4b0f5de67b82285630bf6b (patch) | |
tree | 2909a483423b0ff3b61bca47e0f1a269b6996bfe /apps | |
parent | 01b9e18fb20ae158a056223fc62772887040d85f (diff) |
Check SSL_set1_chain error in set_cert_cb
CLA: trivial
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14469)
(cherry picked from commit 1aa7ecd0d3f6d9c3739cf2e2d87673a3be03b352)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/s_cb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c index 6406ddfb9e..7241df4978 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -934,7 +934,8 @@ static int set_cert_cb(SSL *ssl, void *arg) if (!SSL_build_cert_chain(ssl, 0)) return 0; } else if (exc->chain != NULL) { - SSL_set1_chain(ssl, exc->chain); + if (!SSL_set1_chain(ssl, exc->chain)) + return 0; } } exc = exc->prev; |