summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2012-07-20 22:07:16 +0400
committerFedor Indutny <fedor.indutny@gmail.com>2012-07-20 22:07:39 +0400
commit42c6952edb5cfccd708bea8a9a6c02c67641a314 (patch)
treecbfa3e2bc1bd85ce3469e8e182d250aa6b40b357 /lib
parent50122fed8ae29c982fa4c806136c4b24dd2de382 (diff)
downloadandroid-node-v8-42c6952edb5cfccd708bea8a9a6c02c67641a314.tar.gz
android-node-v8-42c6952edb5cfccd708bea8a9a6c02c67641a314.tar.bz2
android-node-v8-42c6952edb5cfccd708bea8a9a6c02c67641a314.zip
tls: pass linting
Diffstat (limited to 'lib')
-rw-r--r--lib/tls.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/tls.js b/lib/tls.js
index 089ad9bab9..05e48d03a9 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -97,12 +97,11 @@ function checkServerIdentity(host, cert) {
// escape all characters that have special meaning in regexps
// (i.e. '.', '[', '{', '*', and others)
var re = host.replace(
- /\*([a-z0-9\\-_\.])|[\.,\-\\\^\$+?*\[\]\(\):!\|{}]/g,
- function(all, sub) {
- if (sub) return '[a-z0-9\\-_]*' + (sub === '-' ? '\\-' : sub);
- return '\\' + all;
- }
- );
+ /\*([a-z0-9\\-_\.])|[\.,\-\\\^\$+?*\[\]\(\):!\|{}]/g,
+ function(all, sub) {
+ if (sub) return '[a-z0-9\\-_]*' + (sub === '-' ? '\\-' : sub);
+ return '\\' + all;
+ });
return new RegExp('^' + re + '$', 'i');
}
@@ -163,7 +162,7 @@ function checkServerIdentity(host, cert) {
}
return valid;
-};
+}
exports.checkServerIdentity = checkServerIdentity;