aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkoichik <koichik@improvement.jp>2011-09-21 13:19:22 +0900
committerkoichik <koichik@improvement.jp>2011-10-15 00:54:46 +0900
commit19a855382c5c0b2e8db569e5fbb03ea52570dc64 (patch)
treed327a008f5f4a918fed6af79ef2eb2a1c3daa39c /lib
parenta09b747f30284b058b78ae71cf04380abc8d2a93 (diff)
downloadandroid-node-v8-19a855382c5c0b2e8db569e5fbb03ea52570dc64.tar.gz
android-node-v8-19a855382c5c0b2e8db569e5fbb03ea52570dc64.tar.bz2
android-node-v8-19a855382c5c0b2e8db569e5fbb03ea52570dc64.zip
tls: requestCert unusable with Firefox and Chrome
Fixes #1516.
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto.js4
-rw-r--r--lib/tls.js10
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index cea601bd65..85bbbcd65c 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -104,6 +104,10 @@ exports.createCredentials = function(options, context) {
}
}
+ if (options.sessionIdContext) {
+ c.context.setSessionIdContext(options.sessionIdContext);
+ }
+
return c;
};
diff --git a/lib/tls.js b/lib/tls.js
index 6f26ffb455..7e6c5b1d97 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -803,7 +803,8 @@ function Server(/* [options], listener */) {
ciphers: self.ciphers,
secureProtocol: self.secureProtocol,
secureOptions: self.secureOptions,
- crl: self.crl
+ crl: self.crl,
+ sessionIdContext: self.sessionIdContext
});
sharedCreds.context.setCiphers('RC4-SHA:AES128-SHA:AES256-SHA');
@@ -892,6 +893,13 @@ Server.prototype.setOptions = function(options) {
} else {
this.SNICallback = this.SNICallback.bind(this);
}
+ if (options.sessionIdContext) {
+ this.sessionIdContext = options.sessionIdContext;
+ } else if (this.requestCert) {
+ this.sessionIdContext = crypto.createHash('md5')
+ .update(process.argv.join(' '))
+ .digest('hex');
+ }
};
// SNI Contexts High-Level API