summaryrefslogtreecommitdiffstats
path: root/dgbuilder
diff options
context:
space:
mode:
Diffstat (limited to 'dgbuilder')
-rw-r--r--dgbuilder/certs/node-cert.cerbin0 -> 818 bytes
-rw-r--r--dgbuilder/certs/node-cert.pem20
-rw-r--r--dgbuilder/certs/node-csr.pem17
-rw-r--r--dgbuilder/certs/node-key.pem27
-rwxr-xr-xdgbuilder/createReleaseDir.sh3
-rw-r--r--dgbuilder/red.js12
-rw-r--r--dgbuilder/releases/sdnc1.0/customSettings.js3
-rw-r--r--dgbuilder/src/assembly/assemble_zip.xml4
8 files changed, 80 insertions, 6 deletions
diff --git a/dgbuilder/certs/node-cert.cer b/dgbuilder/certs/node-cert.cer
new file mode 100644
index 00000000..d944fc70
--- /dev/null
+++ b/dgbuilder/certs/node-cert.cer
Binary files differ
diff --git a/dgbuilder/certs/node-cert.pem b/dgbuilder/certs/node-cert.pem
new file mode 100644
index 00000000..5e9ddcf7
--- /dev/null
+++ b/dgbuilder/certs/node-cert.pem
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDLjCCAhYCCQDiVieH5hDi5zANBgkqhkiG9w0BAQsFADBZMQswCQYDVQQGEwJV
+UzETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
+cyBQdHkgTHRkMRIwEAYDVQQDDAlkZ2J1aWxkZXIwHhcNMTkwODAyMTQyNjI0WhcN
+MTkwOTAxMTQyNjI0WjBZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKU29tZS1TdGF0
+ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRIwEAYDVQQDDAlk
+Z2J1aWxkZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8p5VLFX+k
+neXJEwcO1fTy2AThZyhzjxGCllEKx5WVRc7vLBVdmFQr8jTbnGGIgPcXOFHzGyO8
+dYRra0tz+sIeBdkNDNRcmDyRVD0ThjDLTCbZ3KZJp8LKDE0iOO4NZVAm6lb8ZNLz
+8hX6rtw9YBOKQXW/WZ0kWIzC0/qnVQUPbtS6kvDcaWIacpGwUkLq0NcNCo9qb14A
+DChMpVtfBj7RRpqEVS9QVQ8VTK9kKT26GPSj4se2jN4Zu7m5ReVO1GcdxmyKAAaB
+0w/bmIfploRehuNFhPVkFJJD5BGjF/YiGhrvJCgqrmrueIwgu3sLXyMXakeJ7sPz
+kg/iLzt5ee93AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAHgvDJvLHRywy157+6o9
+IphXVD0nTpVbEUu+U/16LYo738jMSZzuYIQ1Ud4jVhGBzJj7Rmm18eSbEspSpVwu
+wEy+qI6OVQKatXnEaM7XNv665PuyOMYVplUTyrBapSmJ4EwADos1jBhQj41WnppV
+mE9UuOXmkJefefI+hloyP8JDaRKsfxz7+0QlgPvOQ6WC8GSle6oV89680c7pVINO
+kYwzd0dT/jVtAGDtJxyK37r56dABTde7cBHyxiwhXS1zL8l7aa4XYYUUjbBDvHUp
+2Oab7osfd0k9xK1JyCda1PPBWeKfG1RqSKAsm6WPNiys6pfAhD1H0l7wT2kN+EV5
+RiM=
+-----END CERTIFICATE-----
diff --git a/dgbuilder/certs/node-csr.pem b/dgbuilder/certs/node-csr.pem
new file mode 100644
index 00000000..33d81f9c
--- /dev/null
+++ b/dgbuilder/certs/node-csr.pem
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICnjCCAYYCAQAwWTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUx
+ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDESMBAGA1UEAwwJZGdi
+dWlsZGVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvKeVSxV/pJ3l
+yRMHDtX08tgE4Wcoc48RgpZRCseVlUXO7ywVXZhUK/I025xhiID3FzhR8xsjvHWE
+a2tLc/rCHgXZDQzUXJg8kVQ9E4Ywy0wm2dymSafCygxNIjjuDWVQJupW/GTS8/IV
++q7cPWATikF1v1mdJFiMwtP6p1UFD27UupLw3GliGnKRsFJC6tDXDQqPam9eAAwo
+TKVbXwY+0UaahFUvUFUPFUyvZCk9uhj0o+LHtozeGbu5uUXlTtRnHcZsigAGgdMP
+25iH6ZaEXobjRYT1ZBSSQ+QRoxf2Ihoa7yQoKq5q7niMILt7C18jF2pHie7D85IP
+4i87eXnvdwIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAAgI8wg4ocSH4tKAtFRH
+3GSajOxeBKb5rMwTQ5Hgf/ixYplSfCcDE96gdDvDP23BmUGlb/5Kv9KHLbFpMHoO
+tj72ADB+cej2QKjnCwUeG1dmFOLswO0X8u2FjEEG6m+hiHxfdrVk+yKWrcSt89MI
+bIavr8Kmz5vTLYOav2e3c7zLda00tokFELi/Gb76dJMSgPuOhLsoBXfKeSFlAzWE
+Fkv3GDyoXMd32wecrqJ/KqB30vRCZLMcipTvydTwSVL6VB2m6fKqLjF2Qjw0g/H1
+oNQacpOlVUI/QMPkv68vnESOzoIn5fCrsY7ivXaW6EtLfBUJR5+UVokQk/GSwrn7
+Q7I=
+-----END CERTIFICATE REQUEST-----
diff --git a/dgbuilder/certs/node-key.pem b/dgbuilder/certs/node-key.pem
new file mode 100644
index 00000000..c6f44914
--- /dev/null
+++ b/dgbuilder/certs/node-key.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAvKeVSxV/pJ3lyRMHDtX08tgE4Wcoc48RgpZRCseVlUXO7ywV
+XZhUK/I025xhiID3FzhR8xsjvHWEa2tLc/rCHgXZDQzUXJg8kVQ9E4Ywy0wm2dym
+SafCygxNIjjuDWVQJupW/GTS8/IV+q7cPWATikF1v1mdJFiMwtP6p1UFD27UupLw
+3GliGnKRsFJC6tDXDQqPam9eAAwoTKVbXwY+0UaahFUvUFUPFUyvZCk9uhj0o+LH
+tozeGbu5uUXl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gqqAPIlRHVzsXezUqg2F0/FRAzSxvUrb/Bw
+oN8W139QkMBoZOgJPknZBZNbQXOgUupbP5LK+un2DcK1WTFpTSTV6E/OxIvZrAWC
+uZ9xAoGBAJufbS/h8Yo1sQMuIZEZhC6jFiPqA5fnIyQgaZu+zgpy3zjYXHpJ0THE
+wYZMEMKKxRFgZ7XXTWDkgdEfoJXMtnq/bN4BFxJ5Ns0FkitXmIc96+UYaKjC2KJK
+9TXMGe4bMJtFDhHZ0lzBqs0U88Yy/7AIupusuBnyupU5vLDUujh3
+-----END RSA PRIVATE KEY-----
diff --git a/dgbuilder/createReleaseDir.sh b/dgbuilder/createReleaseDir.sh
index eff8485a..fddb1a6f 100755
--- a/dgbuilder/createReleaseDir.sh
+++ b/dgbuilder/createReleaseDir.sh
@@ -81,7 +81,8 @@ then
echo " 'restConfUser': '$restConfUser'," >>$customSettingsFile
echo " 'restConfPassword': '$restConfPassword'," >>$customSettingsFile
echo " 'formatXML': '$formatXML'," >>$customSettingsFile
- echo " 'formatJSON': '$formatJSON'" >>$customSettingsFile
+ echo " 'formatJSON': '$formatJSON'," >>$customSettingsFile
+ echo " 'enableHttps': true" >>$customSettingsFile
echo " }" >>$customSettingsFile
fi
#echo "Created custom settings file $customSettingsFile"
diff --git a/dgbuilder/red.js b/dgbuilder/red.js
index 14f6d38c..460b2efd 100644
--- a/dgbuilder/red.js
+++ b/dgbuilder/red.js
@@ -21,7 +21,7 @@ var crypto = require("crypto");
var nopt = require("nopt");
var path = require("path");
var RED = require("./red/red.js");
-
+var fs = require('fs')
var server;
var app = express();
@@ -77,8 +77,12 @@ if (parsedArgs.v) {
settings.verbose = true;
}
-if (settings.https) {
- server = https.createServer(settings.https,function(req,res){app(req,res);});
+if (settings.enableHttps) {
+ //server = https.createServer(settings.https,function(req,res){app(req,res);});
+ server = https.createServer({
+ key: fs.readFileSync('certs/node-key.pem'),
+ cert: fs.readFileSync('certs/node-cert.pem'),
+ requireHttps : true},function(req,res){app(req,res);});
} else {
server = http.createServer(function(req,res){app(req,res);});
}
@@ -159,7 +163,7 @@ if (settings.httpStatic) {
}
function getListenPath() {
- var listenPath = 'http'+(settings.https?'s':'')+'://'+
+ var listenPath = 'http'+(settings.enableHttps?'s':'')+'://'+
(settings.uiHost == '0.0.0.0'?'127.0.0.1':settings.uiHost)+
':'+settings.uiPort;
if (settings.httpAdminRoot !== false) {
diff --git a/dgbuilder/releases/sdnc1.0/customSettings.js b/dgbuilder/releases/sdnc1.0/customSettings.js
index 6fb04f01..a16a0ebc 100644
--- a/dgbuilder/releases/sdnc1.0/customSettings.js
+++ b/dgbuilder/releases/sdnc1.0/customSettings.js
@@ -40,5 +40,6 @@ module.exports={
},
"uiHost": "0.0.0.0",
"version": "0.9.1",
- "performGitPull": "N"
+ "performGitPull": "N",
+ "enableHttps" : true
}
diff --git a/dgbuilder/src/assembly/assemble_zip.xml b/dgbuilder/src/assembly/assemble_zip.xml
index f13efa01..bf2bd5bf 100644
--- a/dgbuilder/src/assembly/assemble_zip.xml
+++ b/dgbuilder/src/assembly/assemble_zip.xml
@@ -74,6 +74,10 @@
<outputDirectory>dgbuilder/tools</outputDirectory>
</fileSet>
<fileSet>
+ <directory>certs</directory>
+ <outputDirectory>dgbuilder/certs</outputDirectory>
+ </fileSet>
+ <fileSet>
<directory>yangFiles</directory>
<outputDirectory>dgbuilder/yangFiles</outputDirectory>
</fileSet>