aboutsummaryrefslogtreecommitdiff
path: root/lib/_tls_wrap.js
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2015-07-22 13:52:23 -0700
committerFedor Indutny <fedor@indutny.com>2015-07-23 11:13:26 -0700
commite11fc67225821c76d35a483690b952b01f1f7c67 (patch)
treee0125d54f9e0b46ef22f1ff2ab69ef0f23bcebe2 /lib/_tls_wrap.js
parent4ef2b5fbfbdb2bcabd7791c4143f57c2bced5b0d (diff)
downloadandroid-node-v8-e11fc67225821c76d35a483690b952b01f1f7c67.tar.gz
android-node-v8-e11fc67225821c76d35a483690b952b01f1f7c67.tar.bz2
android-node-v8-e11fc67225821c76d35a483690b952b01f1f7c67.zip
tls: add `getTicketKeys()`/`setTicketKeys()`
Introduce two new APIs for getting/settings the TLS Server Ticket Keys. Fix: #1465 PR-URL: https://github.com/nodejs/io.js/pull/2227 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/_tls_wrap.js')
-rw-r--r--lib/_tls_wrap.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index b96e577a76..f42da43ddd 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -812,13 +812,23 @@ exports.createServer = function(options, listener) {
Server.prototype._getServerData = function() {
return {
- ticketKeys: this._sharedCreds.context.getTicketKeys().toString('hex')
+ ticketKeys: this.getTicketKeys().toString('hex')
};
};
Server.prototype._setServerData = function(data) {
- this._sharedCreds.context.setTicketKeys(new Buffer(data.ticketKeys, 'hex'));
+ this.setTicketKeys(new Buffer(data.ticketKeys, 'hex'));
+};
+
+
+Server.prototype.getTicketKeys = function getTicketKeys(keys) {
+ return this._sharedCreds.context.getTicketKeys(keys);
+};
+
+
+Server.prototype.setTicketKeys = function setTicketKeys(keys) {
+ this._sharedCreds.context.setTicketKeys(keys);
};