diff --git a/nodes/core/io/05-tls.html b/nodes/core/io/05-tls.html
index 704564c0e..1f68d497f 100644
--- a/nodes/core/io/05-tls.html
+++ b/nodes/core/io/05-tls.html
@@ -63,6 +63,11 @@
+
+
+
+
+
@@ -96,6 +101,7 @@
certname: {value:""},
keyname: {value:""},
caname: {value:""},
+ servername: {value:""},
verifyservercert: {value: true}
},
credentials: {
diff --git a/nodes/core/io/05-tls.js b/nodes/core/io/05-tls.js
index c4370257e..f5dca7beb 100644
--- a/nodes/core/io/05-tls.js
+++ b/nodes/core/io/05-tls.js
@@ -25,6 +25,7 @@ module.exports = function(RED) {
var certPath = n.cert.trim();
var keyPath = n.key.trim();
var caPath = n.ca.trim();
+ this.servername = (n.servername||"").trim();
if ((certPath.length > 0) || (keyPath.length > 0)) {
@@ -102,6 +103,9 @@ module.exports = function(RED) {
if (this.credentials && this.credentials.passphrase) {
opts.passphrase = this.credentials.passphrase;
}
+ if (this.servername) {
+ opts.servername = this.servername;
+ }
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 6e4828439..4640ac012 100644
--- a/nodes/core/locales/en-US/messages.json
+++ b/nodes/core/locales/en-US/messages.json
@@ -153,13 +153,15 @@
"key": "Private Key",
"passphrase": "Passphrase",
"ca": "CA Certificate",
- "verify-server-cert":"Verify server certificate"
+ "verify-server-cert":"Verify server certificate",
+ "servername": "Server Name"
},
"placeholder": {
"cert":"path to certificate (PEM format)",
"key":"path to private key (PEM format)",
"ca":"path to CA certificate (PEM format)",
- "passphrase":"private key passphrase (optional)"
+ "passphrase":"private key passphrase (optional)",
+ "servername":"for use with SNI"
},
"error": {
"missing-file": "No certificate/key file provided"