| OLD | NEW |
| 1 /* ***** BEGIN LICENSE BLOCK ***** | 1 /* ***** BEGIN LICENSE BLOCK ***** |
| 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 3 * | 3 * |
| 4 * The contents of this file are subject to the Mozilla Public License Version | 4 * The contents of this file are subject to the Mozilla Public License Version |
| 5 * 1.1 (the "License"); you may not use this file except in compliance with | 5 * 1.1 (the "License"); you may not use this file except in compliance with |
| 6 * the License. You may obtain a copy of the License at | 6 * the License. You may obtain a copy of the License at |
| 7 * http://www.mozilla.org/MPL/ | 7 * http://www.mozilla.org/MPL/ |
| 8 * | 8 * |
| 9 * Software distributed under the License is distributed on an "AS IS" basis, | 9 * Software distributed under the License is distributed on an "AS IS" basis, |
| 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * under the terms of either the GPL or the LGPL, and not to allow others to | 28 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 29 * use your version of this file under the terms of the MPL, indicate your | 29 * use your version of this file under the terms of the MPL, indicate your |
| 30 * decision by deleting the provisions above and replace them with the notice | 30 * decision by deleting the provisions above and replace them with the notice |
| 31 * and other provisions required by the GPL or the LGPL. If you do not delete | 31 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 32 * the provisions above, a recipient may use your version of this file under | 32 * the provisions above, a recipient may use your version of this file under |
| 33 * the terms of any one of the MPL, the GPL or the LGPL. | 33 * the terms of any one of the MPL, the GPL or the LGPL. |
| 34 * | 34 * |
| 35 * ***** END LICENSE BLOCK ***** */ | 35 * ***** END LICENSE BLOCK ***** */ |
| 36 | 36 |
| 37 #ifdef DEBUG | 37 #ifdef DEBUG |
| 38 static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.66 $
$Date: 2009/02/09 07:51:27 $"; | 38 static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.67 $
$Date: 2010/04/03 18:27:32 $"; |
| 39 #endif /* DEBUG */ | 39 #endif /* DEBUG */ |
| 40 | 40 |
| 41 #ifndef NSSPKI_H | 41 #ifndef NSSPKI_H |
| 42 #include "nsspki.h" | 42 #include "nsspki.h" |
| 43 #endif /* NSSPKI_H */ | 43 #endif /* NSSPKI_H */ |
| 44 | 44 |
| 45 #ifndef PKIT_H | 45 #ifndef PKIT_H |
| 46 #include "pkit.h" | 46 #include "pkit.h" |
| 47 #endif /* PKIT_H */ | 47 #endif /* PKIT_H */ |
| 48 | 48 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 NSSCryptoContext *cc = c->object.cryptoContext; | 136 NSSCryptoContext *cc = c->object.cryptoContext; |
| 137 | 137 |
| 138 PR_ASSERT(c->object.refCount > 0); | 138 PR_ASSERT(c->object.refCount > 0); |
| 139 | 139 |
| 140 /* --- LOCK storage --- */ | 140 /* --- LOCK storage --- */ |
| 141 if (cc) { | 141 if (cc) { |
| 142 nssCertificateStore_Lock(cc->certStore, &lockTrace); | 142 nssCertificateStore_Lock(cc->certStore, &lockTrace); |
| 143 } else { | 143 } else { |
| 144 nssTrustDomain_LockCertCache(td); | 144 nssTrustDomain_LockCertCache(td); |
| 145 } | 145 } |
| 146 » if (PR_AtomicDecrement(&c->object.refCount) == 0) { | 146 » if (PR_ATOMIC_DECREMENT(&c->object.refCount) == 0) { |
| 147 /* --- remove cert and UNLOCK storage --- */ | 147 /* --- remove cert and UNLOCK storage --- */ |
| 148 if (cc) { | 148 if (cc) { |
| 149 nssCertificateStore_RemoveCertLOCKED(cc->certStore, c); | 149 nssCertificateStore_RemoveCertLOCKED(cc->certStore, c); |
| 150 nssCertificateStore_Unlock(cc->certStore, &lockTrace, | 150 nssCertificateStore_Unlock(cc->certStore, &lockTrace, |
| 151 &unlockTrace); | 151 &unlockTrace); |
| 152 } else { | 152 } else { |
| 153 nssTrustDomain_RemoveCertFromCacheLOCKED(td, c); | 153 nssTrustDomain_RemoveCertFromCacheLOCKED(td, c); |
| 154 nssTrustDomain_UnlockCertCache(td); | 154 nssTrustDomain_UnlockCertCache(td); |
| 155 } | 155 } |
| 156 /* free cert data */ | 156 /* free cert data */ |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 nssCRL_GetEncoding ( | 1148 nssCRL_GetEncoding ( |
| 1149 NSSCRL *crl | 1149 NSSCRL *crl |
| 1150 ) | 1150 ) |
| 1151 { | 1151 { |
| 1152 if (crl && crl->encoding.data != NULL && crl->encoding.size > 0) { | 1152 if (crl && crl->encoding.data != NULL && crl->encoding.size > 0) { |
| 1153 return &crl->encoding; | 1153 return &crl->encoding; |
| 1154 } else { | 1154 } else { |
| 1155 return (NSSDER *)NULL; | 1155 return (NSSDER *)NULL; |
| 1156 } | 1156 } |
| 1157 } | 1157 } |
| OLD | NEW |