diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-11-21 16:59:33 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-11-21 16:59:33 +0000 |
commit | 878b5d07efb0168a519273f77f5bad292c9c39b7 (patch) | |
tree | 9d899b479c875d8e1d66fabcd4b9e69be9dea4d7 /ssl/ssl_conf.c | |
parent | 191b3f0ba9d574809b8e18e6238f54525c87b8d3 (diff) |
use correct return values when callin cmd
Diffstat (limited to 'ssl/ssl_conf.c')
-rw-r--r-- | ssl/ssl_conf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index 5948756883..dc0a3f04e5 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -319,7 +319,7 @@ static int cmd_cipher_list(SSL_CONF_CTX *cctx, const char *value) rv = SSL_CTX_set_cipher_list(cctx->ctx, value); if (cctx->ssl) rv = SSL_set_cipher_list(cctx->ssl, value); - return rv; + return rv > 0; } static int cmd_protocol(SSL_CONF_CTX *cctx, const char *value) @@ -434,16 +434,20 @@ int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value) if (runcmd) { + int rv; if (value == NULL) return -3; - if (t->cmd(cctx, value)) + rv = t->cmd(cctx, value); + if (rv > 0) return 2; + if (rv == -2) + return -2; if (cctx->flags & SSL_CONF_FLAG_SHOW_ERRORS) { SSLerr(SSL_F_SSL_CONF_CTX_CMD, SSL_R_BAD_VALUE); ERR_add_error_data(4, "cmd=", cmd, ", value=", value); } - return -1; + return 0; } if (cctx->flags & SSL_CONF_FLAG_CMDLINE) |