Permalink
Browse files

tls: revert accidental API change

socket.authorizationError should always be string. Also make sni test
pass.
  • Loading branch information...
1 parent 0cf2354 commit 93d496a4ec029d13928e19aada428d2ef462e5ae @indutny indutny committed Jul 20, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −1 lib/tls.js
  2. +3 −1 test/simple/test-tls-sni-server-client.js
View
2 lib/tls.js
@@ -1089,7 +1089,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();
View
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();

0 comments on commit 93d496a

Please sign in to comment.