Browse Source

tls: revert accidental API change

socket.authorizationError should always be string. Also make sni test
pass.
v0.8.7-release
Fedor Indutny 13 years ago
parent
commit
5950db197c
  1. 2
      lib/tls.js
  2. 4
      test/simple/test-tls-sni-server-client.js

2
lib/tls.js

@ -1059,7 +1059,7 @@ function Server(/* [options], listener */) {
} else {
var verifyError = pair.ssl.verifyError();
if (verifyError) {
pair.cleartext.authorizationError = verifyError;
pair.cleartext.authorizationError = verifyError.message;
if (self.rejectUnauthorized) {
socket.destroy();

4
test/simple/test-tls-sni-server-client.js

@ -94,7 +94,9 @@ server.listen(serverPort, startTest);
function startTest() {
function connectClient(options, callback) {
var client = tls.connect(options, function() {
clientResults.push(client.authorized);
clientResults.push(
client.authorizationError &&
/Hostname\/IP doesn't/.test(client.authorizationError));
client.destroy();
callback();

Loading…
Cancel
Save