aboutsummaryrefslogtreecommitdiff
path: root/openssl/ssl/ssl_conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/ssl/ssl_conf.c')
-rwxr-xr-xopenssl/ssl/ssl_conf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/openssl/ssl/ssl_conf.c b/openssl/ssl/ssl_conf.c
index 0ee6e4642..5478840de 100755
--- a/openssl/ssl/ssl_conf.c
+++ b/openssl/ssl/ssl_conf.c
@@ -167,6 +167,8 @@ static int ssl_set_option_list(const char *elem, int len, void *usr)
* len == -1 indicates not being called in list context, just for single
* command line switches, so don't allow +, -.
*/
+ if (elem == NULL)
+ return 0;
if (len != -1) {
if (*elem == '+') {
elem++;
@@ -384,6 +386,18 @@ static int cmd_PrivateKey(SSL_CONF_CTX *cctx, const char *value)
return rv > 0;
}
+static int cmd_ServerInfoFile(SSL_CONF_CTX *cctx, const char *value)
+{
+ int rv = 1;
+ if (!(cctx->flags & SSL_CONF_FLAG_CERTIFICATE))
+ return -2;
+ if (!(cctx->flags & SSL_CONF_FLAG_SERVER))
+ return -2;
+ if (cctx->ctx)
+ rv = SSL_CTX_use_serverinfo_file(cctx->ctx, value);
+ return rv > 0;
+}
+
#ifndef OPENSSL_NO_DH
static int cmd_DHParameters(SSL_CONF_CTX *cctx, const char *value)
{
@@ -442,6 +456,7 @@ static const ssl_conf_cmd_tbl ssl_conf_cmds[] = {
SSL_CONF_CMD_STRING(Options, NULL),
SSL_CONF_CMD(Certificate, "cert", SSL_CONF_TYPE_FILE),
SSL_CONF_CMD(PrivateKey, "key", SSL_CONF_TYPE_FILE),
+ SSL_CONF_CMD(ServerInfoFile, NULL, SSL_CONF_TYPE_FILE),
#ifndef OPENSSL_NO_DH
SSL_CONF_CMD(DHParameters, "dhparam", SSL_CONF_TYPE_FILE)
#endif