mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Add ALPN support to TLS node
This commit is contained in:
		| @@ -67,6 +67,10 @@ | ||||
|         <label style="width: 120px;" for="node-config-input-servername"><i class="fa fa-server"></i> <span data-i18n="tls.label.servername"></span></label> | ||||
|         <input style="width: calc(100% - 170px);" type="text" id="node-config-input-servername" data-i18n="[placeholder]tls.placeholder.servername"> | ||||
|     </div> | ||||
|     <div class="form-row"> | ||||
|         <label style="width: 120px;" for="node-config-input-alpnprotocol"><i class=""></i> <span data-i18n="tls.label.alpnprotocol"></span></label> | ||||
|         <input style="width: calc(100% - 170px);" type="text" id="node-config-input-alpnprotocol" data-i18n="[placeholder]tls.placeholder.alpnprotocol"> | ||||
|     </div> | ||||
|     <hr> | ||||
|     <div class="form-row"> | ||||
|         <label style="width: 120px;" for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
| @@ -98,7 +102,8 @@ | ||||
|             keyname: {value:""}, | ||||
|             caname: {value:""}, | ||||
|             servername: {value:""}, | ||||
|             verifyservercert: {value: true} | ||||
|             verifyservercert: {value: true}, | ||||
|             alpnprotocol: {value: ""} | ||||
|         }, | ||||
|         credentials: { | ||||
|             certdata: {type:"text"}, | ||||
|   | ||||
| @@ -106,6 +106,9 @@ module.exports = function(RED) { | ||||
|             if (this.servername) { | ||||
|                 opts.servername = this.servername; | ||||
|             } | ||||
|             if (this.alpnprotocol) { | ||||
|                 opts.ALPNProtocols = [this.alpnprotocol]; | ||||
|             } | ||||
|             opts.rejectUnauthorized = this.verifyservercert; | ||||
|         } | ||||
|         return opts; | ||||
|   | ||||
| @@ -170,14 +170,16 @@ | ||||
|             "passphrase": "Passphrase", | ||||
|             "ca": "CA Certificate", | ||||
|             "verify-server-cert":"Verify server certificate", | ||||
|             "servername": "Server Name" | ||||
|             "servername": "Server Name", | ||||
|             "alpnprotocol": "ALPN Protocol" | ||||
|         }, | ||||
|         "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)", | ||||
|             "servername":"for use with SNI" | ||||
|             "servername":"for use with SNI", | ||||
|             "alpnprotocol":"for use with ALPN" | ||||
|         }, | ||||
|         "error": { | ||||
|             "missing-file": "No certificate/key file provided" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user