Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! crypto: add ticketKeys option in createSecureContext
  • Loading branch information
ryzokuken committed May 26, 2018
commit 3964032488c96d36a9fc82bb91cd4329bd504638
8 changes: 5 additions & 3 deletions test/parallel/test-tls-securecontext-ticketkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ const otherKeys = crypto.randomBytes(48);
const context = tls.createSecureContext({
key: fixtures.readKey('agent1-key.pem'),
cert: fixtures.readKey('agent1-cert.pem'),
ticketKeys: keys
ticketKeys: keys,
sessionTimeout: 1,
});

assert.strictEqual(context.getTicketKeys(), keys);
assert.deepStrictEqual(context.getTicketKeys(), keys);
context.setTicketKeys(otherKeys);
assert.strictEqual(context.getTicketKeys(), otherKeys);
assert.deepStrictEqual(context.getTicketKeys(), otherKeys);
setTimeout(() => assert.deepStrictEqual(context.getTicketKeys(), otherKeys), 5000);