From f0aa0fc1d88305773a301f5717998450d142a5e2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 20 May 2014 23:18:33 +0500 Subject: [PATCH] seek chain cert from wss.pem just cat together the cert, the key and the chain cert into wss.pem --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/tport/tport_type_ws.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index bad47b2a18..caa693566d 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Tue May 20 20:29:10 CDT 2014 +Tue May 20 23:17:55 CDT 2014 diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_ws.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_ws.c index 464e8a56d6..5dddccdf0e 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_ws.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_ws.c @@ -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;