summaryrefslogtreecommitdiff
path: root/lib/ssl/sslnonce.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssl/sslnonce.c')
-rw-r--r--lib/ssl/sslnonce.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c
index c2493cdc6..2e861f157 100644
--- a/lib/ssl/sslnonce.c
+++ b/lib/ssl/sslnonce.c
@@ -483,6 +483,8 @@ ssl3_SetSIDSessionTicket(sslSessionID *sid,
{
PORT_Assert(sid);
PORT_Assert(newSessionTicket);
+ PORT_Assert(newSessionTicket->ticket.data);
+ PORT_Assert(newSessionTicket->ticket.len != 0);
/* if sid->u.ssl3.lock, we are updating an existing entry that is already
* cached or was once cached, so we need to acquire and release the write
@@ -491,10 +493,6 @@ ssl3_SetSIDSessionTicket(sslSessionID *sid,
*/
if (sid->u.ssl3.lock) {
PR_RWLock_Wlock(sid->u.ssl3.lock);
-
- /* A server might have sent us an empty ticket, which has the
- * effect of clearing the previously known ticket.
- */
if (sid->u.ssl3.locked.sessionTicket.ticket.data) {
SECITEM_FreeItem(&sid->u.ssl3.locked.sessionTicket.ticket,
PR_FALSE);