diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-01-03 23:13:40 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-01-03 23:14:23 +0000 |
commit | 5b7f36e85792faaf0f9a4e3e7fddc90f15021da2 (patch) | |
tree | 92e4ea441b543a865c6174540a5495f6889fa106 /ssl/ssl_conf.c | |
parent | a4339ea3ba045b7da038148f0d48ce25f2996971 (diff) | |
download | openssl-5b7f36e85792faaf0f9a4e3e7fddc90f15021da2.tar.gz |
Add ServerInfoFile to SSL_CONF, update docs.
Diffstat (limited to 'ssl/ssl_conf.c')
-rw-r--r-- | ssl/ssl_conf.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index fc6caa9b6c..419400aa24 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -391,6 +391,19 @@ static int cmd_PrivateKey(SSL_CONF_CTX *cctx, const char *value) rv = SSL_use_PrivateKey_file(cctx->ssl, value, SSL_FILETYPE_PEM); 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) { @@ -452,6 +465,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 |