aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cds-ui/server/.enc1
-rw-r--r--cds-ui/server/aaf.p12bin0 -> 4279 bytes
-rw-r--r--cds-ui/server/index.js18
-rw-r--r--cds-ui/server/server.cert23
-rw-r--r--cds-ui/server/server.key28
5 files changed, 17 insertions, 53 deletions
diff --git a/cds-ui/server/.enc b/cds-ui/server/.enc
new file mode 100644
index 000000000..bae9625a2
--- /dev/null
+++ b/cds-ui/server/.enc
@@ -0,0 +1 @@
+cadi_keystore_password_p12=&jN+zBy,tcHfsh3$EFv5w7n{
diff --git a/cds-ui/server/aaf.p12 b/cds-ui/server/aaf.p12
new file mode 100644
index 000000000..c0f21b54c
--- /dev/null
+++ b/cds-ui/server/aaf.p12
Binary files differ
diff --git a/cds-ui/server/index.js b/cds-ui/server/index.js
index 161a18be7..be6a3b77f 100644
--- a/cds-ui/server/index.js
+++ b/cds-ui/server/index.js
@@ -25,12 +25,26 @@ const fs = require('fs')
module.exports = application;
if (require.main === module) {
+
+ try {
+ var p12File = process.env.KEYSTORE || "aaf.p12"
+ var passwdFile = process.env.PASSPHRASE || ".enc"
+
+ var data = fs.readFileSync(passwdFile, 'utf8')
+ var elements = data.match(/cadi_keystore_password_p12=(.*)\n/)
+ var passphrase = elements[1]
+ var p12 = fs.readFileSync(p12File)
+ } catch(e){
+ console.error('Reading keystore error :', e)
+ process.exit(11)
+ }
+
// Run the application
const config = {
rest: {
protocol: 'https',
- key: fs.readFileSync('server.key'),
- cert: fs.readFileSync('server.cert'),
+ pfx: p12,
+ passphrase: passphrase,
port: +process.env.PORT || 3000,
host: process.env.HOST || 'localhost',
openApiSpec: {
diff --git a/cds-ui/server/server.cert b/cds-ui/server/server.cert
deleted file mode 100644
index a5b2eca4f..000000000
--- a/cds-ui/server/server.cert
+++ /dev/null
@@ -1,23 +0,0 @@
------BEGIN CERTIFICATE-----
-MIID6zCCAtOgAwIBAgIUKOL8h9cYkcHjt/7+3zsOUZGBEggwD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wuQQHiYV+W2BlW0tEiQ6vtmRJ7/CvCDKM9LN/FPWWN0abZ78NXruQSZox
-RJ9z6osrQv5sEkZ9cQ9m7/TW1fG0aysAtHqDccDIOpNEmOCxlLBdnI1IeQjqcCHO
-K1+5mYhf9TiRFmnVulwzPDB1VyXsM17Q2AcwfvP+9A/c9aDBkuzkGuC5hEEgyH1z
-3G/y2KKaZ/L3/cCaB0X0YcY0bvLVHdaKehTpbYn8BzA78zJTQJ27Q1MLl1PX8BY=
------END CERTIFICATE-----
diff --git a/cds-ui/server/server.key b/cds-ui/server/server.key
deleted file mode 100644
index c73a1b9d8..000000000
--- a/cds-ui/server/server.key
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC7mp5J0SZPMl6G
-n8a3G1dSQVOe0RLeEKXrL+I1reWMm0PhL3aHTgpeuUY7H3t/KoVc1Ff+EVnLREV7
-rRNKaHwxiuUNvVLt1utu3jLkmIrW1b7h3FQglUYI2FY2Q4ed48tvSK80oldlukqe
-IZFGaU3Ii1zRRaEgvGSCs+5Nbhe0qJK5OHoZt/LyHERbG5MbbmuNT9P2k9Vyv/na
-+btis8nwv9YI97eKNN70rgVqKXEcWm5yoNrsoFmBwI878lKn48t0ruecI5d6cNv9
-Kir2mArw1eA0C8bNMiK1daGMnJKB3ltBlBETqxhUCM5PCshDklnZaqSXKOkaJxp9
-XhKxH94FAgMBAAECggEAdSXMChRMc8/kLvS+xcCQ+pBIgzfTLFABC6fO/e4lFXQv
-IwLcZQlaeGQBcxHpsDMBLEJ83+49wCxVpzEghqpQQy+UcMv0aQh347dk2FJZAGZg
-1/EZp28PWJ6e1yu8F+ATPN6KabemE6QMzEnxyaIgLEa6IwPz5dk+ek+ZU0iYDPrT
-1b7co+ompuOF34huHLks8U65CGlflatsgmPf+iXIOh0qLMJCAxavncbCPIH2BzpK
-T9YLPWHc3g0NVx/uPJi2/AI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