Recent systems require a higher level of security
Https+usbkey Certificate
The operation of HTTPS is simple
OpenSSL generates CAs and certificates, and configuration starts
After the build succeeds, it looks like this.
Like this
var options =+ '/server.key '), Cert:fs.readFileSync (__dirname+ '/server.pem '), CA: Fs.readfilesync (__dirname+ '/ca.crt '), auth:"1CUI"};
function () { console.log (' Express server listening on port ' + server.address (). Port); }); function (callback) { server.close (callback); }
But verify the client certificate, the Internet cannot find out the ready
No way, check the official documentation.
Https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
Https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener
Additional parameters were found to configure the client certificate
Requestcert:true//Request client Certificate
Rejectunauthorized:true//Deny client connections if there is no request to the client from a trusted CA-issued certificate
Add a re-Web service. I can't connect decisively.
Chrome Error
SSL Connection Error
Err_ssl_protocol_errorHide DetailsUnable to establish a secure connection to the server. There may be a problem with the server, or you may not have a client authentication certificate that your server requires. but this means that the purpose is reached, and then, just install the client certificate. After the client certificate has been added, the final step is to "migrate" the certificate to Usbkey within the validationnot finished, encountered other problems
Nodejs client certificate settings.