Fix the return value for SSL_get0_chain_certs()

This function was always returning 0. It should return 1 on success.

Fixes #9374

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/9395)
This commit is contained in:
Matt Caswell 2019-07-16 15:32:35 +01:00
parent 3c93fbacf6
commit 7bc82358ae

View file

@ -3552,6 +3552,7 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
case SSL_CTRL_GET_CHAIN_CERTS: case SSL_CTRL_GET_CHAIN_CERTS:
*(STACK_OF(X509) **)parg = s->cert->key->chain; *(STACK_OF(X509) **)parg = s->cert->key->chain;
ret = 1;
break; break;
case SSL_CTRL_SELECT_CURRENT_CERT: case SSL_CTRL_SELECT_CURRENT_CERT: