mirror of https://github.com/nodejs/node.git
tls: revert accidental API change
socket.authorizationError should always be string. Also make sni test pass.pull/24503/head
parent
0cf235410d
commit
93d496a4ec
|
@ -1089,7 +1089,7 @@ function Server(/* [options], listener */) {
|
||||||
} else {
|
} else {
|
||||||
var verifyError = pair.ssl.verifyError();
|
var verifyError = pair.ssl.verifyError();
|
||||||
if (verifyError) {
|
if (verifyError) {
|
||||||
pair.cleartext.authorizationError = verifyError;
|
pair.cleartext.authorizationError = verifyError.message;
|
||||||
|
|
||||||
if (self.rejectUnauthorized) {
|
if (self.rejectUnauthorized) {
|
||||||
socket.destroy();
|
socket.destroy();
|
||||||
|
|
|
@ -94,7 +94,9 @@ server.listen(serverPort, startTest);
|
||||||
function startTest() {
|
function startTest() {
|
||||||
function connectClient(options, callback) {
|
function connectClient(options, callback) {
|
||||||
var client = tls.connect(options, function() {
|
var client = tls.connect(options, function() {
|
||||||
clientResults.push(client.authorized);
|
clientResults.push(
|
||||||
|
client.authorizationError &&
|
||||||
|
/Hostname\/IP doesn't/.test(client.authorizationError));
|
||||||
client.destroy();
|
client.destroy();
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
|
|
Loading…
Reference in New Issue