diff --git a/nodes/core/io/05-tls.html b/nodes/core/io/05-tls.html
index 2ba0acc91..704564c0e 100644
--- a/nodes/core/io/05-tls.html
+++ b/nodes/core/io/05-tls.html
@@ -24,44 +24,48 @@
-
+
-
+
-
+
-
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -97,7 +101,8 @@
credentials: {
certdata: {type:"text"},
keydata: {type:"text"},
- cadata: {type:"text"}
+ cadata: {type:"text"},
+ passphrase: {type:"password"}
},
label: function() {
return this.name || this._("tls.tls");
diff --git a/nodes/core/io/05-tls.js b/nodes/core/io/05-tls.js
index 4d9e7374e..c4370257e 100644
--- a/nodes/core/io/05-tls.js
+++ b/nodes/core/io/05-tls.js
@@ -77,7 +77,8 @@ module.exports = function(RED) {
credentials: {
certdata: {type:"text"},
keydata: {type:"text"},
- cadata: {type:"text"}
+ cadata: {type:"text"},
+ passphrase: {type:"password"}
},
settings: {
tlsConfigDisableLocalFiles: {
@@ -98,6 +99,9 @@ module.exports = function(RED) {
if (this.ca) {
opts.ca = this.ca;
}
+ if (this.credentials && this.credentials.passphrase) {
+ opts.passphrase = this.credentials.passphrase;
+ }
opts.rejectUnauthorized = this.verifyservercert;
}
return opts;
diff --git a/nodes/core/locales/en-US/messages.json b/nodes/core/locales/en-US/messages.json
index 07bbe174b..53cc00d11 100644
--- a/nodes/core/locales/en-US/messages.json
+++ b/nodes/core/locales/en-US/messages.json
@@ -149,13 +149,15 @@
"upload": "Upload",
"cert": "Certificate",
"key": "Private Key",
+ "passphrase": "Passphrase",
"ca": "CA Certificate",
"verify-server-cert":"Verify server certificate"
},
"placeholder": {
"cert":"path to certificate (PEM format)",
"key":"path to private key (PEM format)",
- "ca":"path to CA certificate (PEM format)"
+ "ca":"path to CA certificate (PEM format)",
+ "passphrase":"private key passphrase (optional)"
},
"error": {
"missing-file": "No certificate/key file provided"