Commit 1addc385 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Cleanup: Renamed ca_certificate to ca_file.

This commit updates code and docs to the rename of libshout
function names. See commit b8869ac507eca12f75bd2ee028230ddaf5d879eb
of libshout for more details.
parent 3c40ec18
......@@ -140,7 +140,7 @@
mount
tls-mode
ca-directory
ca-certificate
ca-file
allowed-ciphers
client-certificate
yp
......@@ -187,10 +187,12 @@
to verify the server. Default is to use operating system's defaults.
<b>This requires TLS support compiled into libshout.</b>
</div>
<h4>ca-certificate</h4>
<h4>ca-file</h4>
<div class=indentedbox>
In contrast to the ca-directory option this allows to set a single certificate used
to verify the server. Default is to use operating system's defaults.
In contrast to the ca-directory option this allows to set a single file with
certificate(s) used to verify the server. You can use this option to pass IceS
the certificate if you are using a self-signed one on the server also.
Default is to use operating system's defaults.
<b>This requires TLS support compiled into libshout.</b>
</div>
<h4>allowed-ciphers</h4>
......
......@@ -140,7 +140,7 @@ void config_free_instance(instance_t *instance)
if (instance->mount) xmlFree(instance->mount);
#if SHOUT_TLS
if (instance->ca_directory) xmlFree(instance->ca_directory);
if (instance->ca_certificate) xmlFree(instance->ca_certificate);
if (instance->ca_file) xmlFree(instance->ca_file);
if (instance->allowed_ciphers) xmlFree(instance->allowed_ciphers);
if (instance->client_certificate) xmlFree(instance->client_certificate);
#endif
......@@ -158,7 +158,7 @@ static void _set_instance_defaults(instance_t *instance)
#if SHOUT_TLS
instance->tls = DEFAULT_TLS;
instance->ca_directory = DEFAULT_CA_DIRECTORY;
instance->ca_certificate = DEFAULT_CA_CERTIFICATE;
instance->ca_file = DEFAULT_CA_CERTIFICATE;
instance->allowed_ciphers = DEFAULT_ALLOWED_CIPHERS;
instance->client_certificate = DEFAULT_CLIENT_CERTIFICATE;
#endif
......@@ -285,8 +285,8 @@ static void _parse_instance(config_t *config, xmlDocPtr doc, xmlNodePtr node)
SET_TLSMODE(instance->tls);
else if (strcmp(node->name, "ca-directory") == 0)
SET_STRING(instance->ca_directory);
else if (strcmp(node->name, "ca-certificate") == 0)
SET_STRING(instance->ca_certificate);
else if (strcmp(node->name, "ca-file") == 0)
SET_STRING(instance->ca_file);
else if (strcmp(node->name, "allowed-ciphers") == 0)
SET_STRING(instance->allowed_ciphers);
else if (strcmp(node->name, "client-certificate") == 0)
......
......@@ -36,7 +36,7 @@ typedef struct _instance_tag
#if SHOUT_TLS
int tls;
char *ca_directory;
char *ca_certificate;
char *ca_file;
char *allowed_ciphers;
char *client_certificate;
#endif
......
......@@ -95,8 +95,8 @@ void *ices_instance_stream(void *arg)
return NULL;
}
if (stream->ca_certificate)
if (!(shout_set_ca_certificate(sdsc->shout, stream->ca_certificate)) == SHOUTERR_SUCCESS) {
if (stream->ca_file)
if (!(shout_set_ca_file(sdsc->shout, stream->ca_file)) == SHOUTERR_SUCCESS) {
LOG_ERROR1("libshout error: %s\n", shout_get_error(sdsc->shout));
stream->died = 1;
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment