Handle case where sslcert file is not specified 18/85218/2
authorTimoney, Dan (dt5972) <dtimoney@att.com>
Fri, 12 Apr 2019 14:00:20 +0000 (10:00 -0400)
committerTimoney, Dan (dt5972) <dtimoney@att.com>
Fri, 12 Apr 2019 14:13:41 +0000 (10:13 -0400)
If ssl cert file is not specified, do not enable SSL.  Current script
does not explicitly check and so crashes if https port is specified
and ssl cert file is not.

Change-Id: I3e72444302e1c499e1efd6ad6938c8d7b9aaa9c1
Issue-ID: SDNC-727
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Former-commit-id: 43d2b9ad3edc462b79213faac4ab32f448ebf75c

admportal/shell/www
version.properties

index 5c639e8..ef5dcae 100755 (executable)
@@ -12,6 +12,7 @@ var https = require('https');
 var http_port = properties.nonSslPort;
 var https_port = properties.ConexusNetworkPort;
 var cert_pswd = process.env.CERT_PSWD;
+var sslCert = properties.ConexusNetwork_sslCert;
 
 if (typeof http_port != 'undefined' && http_port.length > 0)
 {
@@ -23,10 +24,10 @@ if (typeof http_port != 'undefined' && http_port.length > 0)
        });
 }
 
-if (typeof https_port != 'undefined' && https_port.length > 0)
+if (typeof https_port != 'undefined' && https_port.length > 0 && sslCert.length > 0)
 {
        var sslOptions = {
-               pfx: fs.readFileSync(properties.ConexusNetwork_sslCert),
+               pfx: fs.readFileSync(sslCert),
                passphrase: properties.ConexusNetwork_sslKey,
                secureOptions: constants.SSL_OP_NO_TLSv1|constants.SSL_OP_NO_SSLv2|constants.SSL_OP_NO_SSLv3,
                ciphers: [ "AES128-GCM-SHA256","!RC4","HIGH","!MD5","!aNULL","!EDH","!3DES" ].join(':'),
index 2488058..423a329 100644 (file)
@@ -5,7 +5,7 @@
 
 release_name=1
 sprint_number=5
-feature_revision=0
+feature_revision=1
 
 base_version=${release_name}.${sprint_number}.${feature_revision}