Skip to content

Commit fddc7f5

Browse files
committed
reverte test
1 parent 268f160 commit fddc7f5

4 files changed

Lines changed: 22 additions & 25 deletions

File tree

OpenFlowNodeRED/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"gulp-shell": "^0.7.0",
2323
"jsonwebtoken": "^8.5.1",
2424
"node-red": "^0.20.5",
25-
"node-red-contrib-auth-saml": "^1.0.7",
25+
"node-red-contrib-auth-saml": "^1.0.8",
2626
"passport-google-oauth20": "^2.0.0",
2727
"passport-openid-connect": "^0.1.0",
2828
"passport-saml": "^1.0.0",

OpenFlowNodeRED/src/Config.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,14 @@ export class Config {
6060

6161

6262
try {
63-
console.log("ssl-root-cas SKIPPED!!!!!!");
64-
// rootCas.addFile(path.join(__dirname, '../config/ssl/gd_bundle-g2-g1.crt'));
65-
//if (Config.tls_ca !== "") {
66-
// var tls_ca: string = Buffer.from(Config.tls_ca, 'base64').toString('ascii')
67-
// var rootCas = require('ssl-root-cas/latest').create();
68-
// rootCas.push(tls_ca);
69-
// // rootCas.addFile( tls_ca );
70-
// https.globalAgent.options.ca = rootCas;
71-
// require('https').globalAgent.options.ca = rootCas;
72-
//}
63+
if (Config.tls_ca !== "") {
64+
var tls_ca: string = Buffer.from(Config.tls_ca, 'base64').toString('ascii')
65+
var rootCas = require('ssl-root-cas/latest').create();
66+
rootCas.push(tls_ca);
67+
// rootCas.addFile( tls_ca );
68+
https.globalAgent.options.ca = rootCas;
69+
require('https').globalAgent.options.ca = rootCas;
70+
}
7371
} catch (error) {
7472
console.log(error);
7573
}

OpenFlowNodeRED/src/WebServer.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,17 @@ export class WebServer {
5151
key: Buffer.from(Config.tls_key, 'base64').toString('ascii')
5252
};
5353
}
54-
console.log("Config.tls_ca SKIPPED!!!!!!");
55-
// var ca:string = Config.tls_ca;
56-
// if (ca!== "") {
57-
// if(ca.indexOf("---") === -1) {
58-
// ca = Buffer.from(ca, 'base64').toString('ascii');
59-
// }
60-
// // if(ca.indexOf("---") > -1) {
61-
// // console.log(ca);
62-
// // options.ca = ca;
63-
// // }
64-
// // options.cert += "\n" + ca;
65-
// }
54+
var ca:string = Config.tls_ca;
55+
if (ca!== "") {
56+
if(ca.indexOf("---") === -1) {
57+
ca = Buffer.from(ca, 'base64').toString('ascii');
58+
}
59+
if(ca.indexOf("---") > -1) {
60+
console.log(ca);
61+
options.ca = ca;
62+
}
63+
// options.cert += "\n" + ca;
64+
}
6665
if(Config.tls_passphrase!=="") {
6766
options.passphrase = Config.tls_passphrase;
6867
}
@@ -90,7 +89,7 @@ export class WebServer {
9089
(profile:string | any, done:any)=> {
9190
// profile.permissions = "*";
9291
done(profile);
93-
});
92+
}, "");
9493
// this.settings.adminAuth = await noderedcontribauthsaml.configure(this._logger, Config.baseurl());clear
9594

9695
// settings.adminAuth = new noderedcontribauthopenid(this._logger, Config.baseurl());

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.69
1+
0.0.70

0 commit comments

Comments
 (0)