seek chain cert from wss.pem just cat together the cert, the key and the chain cert into wss.pem

This commit is contained in:
Anthony Minessale 2014-05-20 23:18:33 +05:00
parent 77bddb9f9c
commit f0aa0fc1d8
2 changed files with 7 additions and 1 deletions

View File

@ -1 +1 @@
Tue May 20 20:29:10 CDT 2014
Tue May 20 23:17:55 CDT 2014

View File

@ -361,11 +361,17 @@ static int tport_ws_init_primary_secure(tport_primary_t *pri,
if (path) {
key = su_sprintf(autohome, "%s/%s", path, "wss.key");
if (access(key, R_OK) != 0) key = NULL;
cert = su_sprintf(autohome, "%s/%s", path, "wss.crt");
if (access(cert, R_OK) != 0) cert = NULL;
chain = su_sprintf(autohome, "%s/%s", path, "ca-bundle.crt");
if (access(chain, R_OK) != 0) chain = NULL;
if (access(cert, R_OK) != 0) cert = NULL;
if ( !key ) key = su_sprintf(autohome, "%s/%s", path, "wss.pem");
if ( !cert ) cert = su_sprintf(autohome, "%s/%s", path, "wss.pem");
if ( !chain ) chain = su_sprintf(autohome, "%s/%s", path, "wss.pem");
if (access(key, R_OK) != 0) key = NULL;
if (access(cert, R_OK) != 0) cert = NULL;
if (access(chain, R_OK) != 0) chain = NULL;