Skip to content

Commit

Permalink
Bug 1320695 - Allow use of session tickets when there is no ticket wr…
Browse files Browse the repository at this point in the history
…apping key, r=ttaubert

Differential Revision: https://nss-review.dev.mozaws.net/D176

--HG--
extra : rebase_source : 94d1406e4bbac015ddc656e29e2c9cfafdd8d980
  • Loading branch information
martinthomson committed Jan 29, 2017
1 parent d9b8a08 commit 741fd40
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/ssl/sslsnce.c
Expand Up @@ -2041,15 +2041,11 @@ ssl_GenerateSessionTicketKeys(void *pwArg, unsigned char *keyName,
SECStatus rv;
cacheDesc *cache = &globalCache;

if (!cache->cacheMem) {
/* cache is uninitialized. Generate keys and return them
* without caching. */
return GenerateTicketKeys(pwArg, keyName, encKey, macKey);
}

rv = ssl_GetSessionTicketKeyPair(&svrPubKey, &svrPrivKey);
if (rv != SECSuccess) {
return SECFailure;
if (rv != SECSuccess || !cache->cacheMem) {
/* No key pair for wrapping, or the cache is uninitialized. Generate
* keys and return them without caching. */
return GenerateTicketKeys(pwArg, keyName, encKey, macKey);
}

now = LockSidCacheLock(cache->keyCacheLock, 0);
Expand Down

0 comments on commit 741fd40

Please sign in to comment.