| OLD | NEW |
| (Empty) |
| 1 Index: net/third_party/nss/ssl/sslcon.c | |
| 2 =================================================================== | |
| 3 --- net/third_party/nss/ssl/sslcon.c (revision 166543) | |
| 4 +++ net/third_party/nss/ssl/sslcon.c (working copy) | |
| 5 @@ -658,7 +658,8 @@ | |
| 6 | |
| 7 if (sent < 0) { | |
| 8 /* If send failed, it is now a bogus session-id */ | |
| 9 - (*ss->sec.uncache)(sid); | |
| 10 + if (ss->sec.uncache) | |
| 11 + (*ss->sec.uncache)(sid); | |
| 12 rv = (SECStatus)sent; | |
| 13 } else if (!ss->opt.noCache) { | |
| 14 /* Put the sid in session-id cache, (may already be there) */ | |
| 15 @@ -2891,7 +2892,8 @@ | |
| 16 /* Forget our session-id - server didn't like it */ | |
| 17 SSL_TRC(7, ("%d: SSL[%d]: server forgot me, uncaching session-id", | |
| 18 SSL_GETPID(), ss->fd)); | |
| 19 - (*ss->sec.uncache)(sid); | |
| 20 + if (ss->sec.uncache) | |
| 21 + (*ss->sec.uncache)(sid); | |
| 22 ssl_FreeSID(sid); | |
| 23 ss->sec.ci.sid = sid = (sslSessionID*) PORT_ZAlloc(sizeof(sslSession
ID)); | |
| 24 if (!sid) { | |
| 25 @@ -3065,7 +3067,8 @@ | |
| 26 | |
| 27 /* if we're not doing this SID's protocol any more, drop it. */ | |
| 28 if (!sidVersionEnabled) { | |
| 29 - ss->sec.uncache(sid); | |
| 30 + if (ss->sec.uncache) | |
| 31 + ss->sec.uncache(sid); | |
| 32 ssl_FreeSID(sid); | |
| 33 sid = NULL; | |
| 34 break; | |
| 35 @@ -3077,7 +3080,8 @@ | |
| 36 break; | |
| 37 } | |
| 38 if (i >= ss->sizeCipherSpecs) { | |
| 39 - ss->sec.uncache(sid); | |
| 40 + if (ss->sec.uncache) | |
| 41 + ss->sec.uncache(sid); | |
| 42 ssl_FreeSID(sid); | |
| 43 sid = NULL; | |
| 44 break; | |
| 45 Index: net/third_party/nss/ssl/ssl3ext.c | |
| 46 =================================================================== | |
| 47 --- net/third_party/nss/ssl/ssl3ext.c (revision 166543) | |
| 48 +++ net/third_party/nss/ssl/ssl3ext.c (working copy) | |
| 49 @@ -1204,7 +1204,8 @@ | |
| 50 * renegotiation.) | |
| 51 */ | |
| 52 if (ss->sec.ci.sid != NULL) { | |
| 53 - ss->sec.uncache(ss->sec.ci.sid); | |
| 54 + if (ss->sec.uncache) | |
| 55 + ss->sec.uncache(ss->sec.ci.sid); | |
| 56 ssl_FreeSID(ss->sec.ci.sid); | |
| 57 ss->sec.ci.sid = NULL; | |
| 58 } | |
| 59 Index: net/third_party/nss/ssl/ssl3con.c | |
| 60 =================================================================== | |
| 61 --- net/third_party/nss/ssl/ssl3con.c (revision 166543) | |
| 62 +++ net/third_party/nss/ssl/ssl3con.c (working copy) | |
| 63 @@ -2666,7 +2666,8 @@ | |
| 64 (ss->opt.requireCertificate == SSL_REQUIRE_FIRST_HANDSHAKE))) { | |
| 65 PRFileDesc * lower; | |
| 66 | |
| 67 - ss->sec.uncache(ss->sec.ci.sid); | |
| 68 + if (ss->sec.uncache) | |
| 69 + ss->sec.uncache(ss->sec.ci.sid); | |
| 70 SSL3_SendAlert(ss, alert_fatal, bad_certificate); | |
| 71 | |
| 72 lower = ss->fd->lower; | |
| 73 @@ -2721,7 +2722,7 @@ | |
| 74 | |
| 75 ssl_GetSSL3HandshakeLock(ss); | |
| 76 if (level == alert_fatal) { | |
| 77 - if (ss->sec.ci.sid) { | |
| 78 + if (!ss->opt.noCache && ss->sec.ci.sid && ss->sec.uncache) { | |
| 79 ss->sec.uncache(ss->sec.ci.sid); | |
| 80 } | |
| 81 } | |
| 82 @@ -2891,8 +2892,10 @@ | |
| 83 default: error = SSL_ERROR_RX_UNKNOWN_ALERT; break; | |
| 84 } | |
| 85 if (level == alert_fatal) { | |
| 86 - if (!ss->opt.noCache) | |
| 87 - ss->sec.uncache(ss->sec.ci.sid); | |
| 88 + if (!ss->opt.noCache) { | |
| 89 + if (ss->sec.uncache) | |
| 90 + ss->sec.uncache(ss->sec.ci.sid); | |
| 91 + } | |
| 92 if ((ss->ssl3.hs.ws == wait_server_hello) && | |
| 93 (desc == handshake_failure)) { | |
| 94 /* XXX This is a hack. We're assuming that any handshake failure | |
| 95 @@ -4152,7 +4155,8 @@ | |
| 96 | |
| 97 if (!sidOK) { | |
| 98 SSL_AtomicIncrementLong(& ssl3stats.sch_sid_cache_not_ok ); | |
| 99 - (*ss->sec.uncache)(sid); | |
| 100 + if (ss->sec.uncache) | |
| 101 + (*ss->sec.uncache)(sid); | |
| 102 ssl_FreeSID(sid); | |
| 103 sid = NULL; | |
| 104 } | |
| 105 @@ -4457,7 +4461,8 @@ | |
| 106 } | |
| 107 | |
| 108 if (sid) { | |
| 109 - ss->sec.uncache(sid); | |
| 110 + if (ss->sec.uncache) | |
| 111 + ss->sec.uncache(sid); | |
| 112 ssl_FreeSID(sid); | |
| 113 ss->sec.ci.sid = NULL; | |
| 114 } | |
| 115 @@ -5588,7 +5593,8 @@ | |
| 116 | |
| 117 /* throw the old one away */ | |
| 118 sid->u.ssl3.keys.resumable = PR_FALSE; | |
| 119 - (*ss->sec.uncache)(sid); | |
| 120 + if (ss->sec.uncache) | |
| 121 + (*ss->sec.uncache)(sid); | |
| 122 ssl_FreeSID(sid); | |
| 123 | |
| 124 /* get a new sid */ | |
| 125 @@ -6851,7 +6857,8 @@ | |
| 126 && !ss->firstHsDone))) { | |
| 127 | |
| 128 SSL_AtomicIncrementLong(& ssl3stats.hch_sid_cache_not_ok ); | |
| 129 - ss->sec.uncache(sid); | |
| 130 + if (ss->sec.uncache) | |
| 131 + ss->sec.uncache(sid); | |
| 132 ssl_FreeSID(sid); | |
| 133 sid = NULL; | |
| 134 } | |
| 135 @@ -6998,7 +7005,8 @@ | |
| 136 } | |
| 137 | |
| 138 if (ss->sec.ci.sid) { | |
| 139 - ss->sec.uncache(ss->sec.ci.sid); | |
| 140 + if (ss->sec.uncache) | |
| 141 + ss->sec.uncache(ss->sec.ci.sid); | |
| 142 PORT_Assert(ss->sec.ci.sid != sid); /* should be impossible, but ..
. */ | |
| 143 if (ss->sec.ci.sid != sid) { | |
| 144 ssl_FreeSID(ss->sec.ci.sid); | |
| 145 @@ -7167,7 +7175,8 @@ | |
| 146 | |
| 147 if (sid) { /* we had a sid, but it's no longer valid, free it */ | |
| 148 SSL_AtomicIncrementLong(& ssl3stats.hch_sid_cache_not_ok ); | |
| 149 - ss->sec.uncache(sid); | |
| 150 + if (ss->sec.uncache) | |
| 151 + ss->sec.uncache(sid); | |
| 152 ssl_FreeSID(sid); | |
| 153 sid = NULL; | |
| 154 } | |
| 155 @@ -10782,7 +10791,8 @@ | |
| 156 return SECFailure; | |
| 157 } | |
| 158 if (sid && flushCache) { | |
| 159 - ss->sec.uncache(sid); /* remove it from whichever cache it's in. */ | |
| 160 + if (ss->sec.uncache) | |
| 161 + ss->sec.uncache(sid); /* remove it from whichever cache it's in. */ | |
| 162 ssl_FreeSID(sid); /* dec ref count and free if zero. */ | |
| 163 ss->sec.ci.sid = NULL; | |
| 164 } | |
| OLD | NEW |