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: tdcache.c,v $ $Revision: 1.48 $ $Da
te: 2008/11/19 16:08:05 $"; | 38 static const char CVS_ID[] = "@(#) $RCSfile: tdcache.c,v $ $Revision: 1.49 $ $Da
te: 2010/02/10 02:04:32 $"; |
39 #endif /* DEBUG */ | 39 #endif /* DEBUG */ |
40 | 40 |
41 #ifndef PKIM_H | 41 #ifndef PKIM_H |
42 #include "pkim.h" | 42 #include "pkim.h" |
43 #endif /* PKIM_H */ | 43 #endif /* PKIM_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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 nssTrustDomain_UpdateCachedTokenCerts ( | 492 nssTrustDomain_UpdateCachedTokenCerts ( |
493 NSSTrustDomain *td, | 493 NSSTrustDomain *td, |
494 NSSToken *token | 494 NSSToken *token |
495 ) | 495 ) |
496 { | 496 { |
497 NSSCertificate **cp, **cached = NULL; | 497 NSSCertificate **cp, **cached = NULL; |
498 nssList *certList; | 498 nssList *certList; |
499 PRUint32 count; | 499 PRUint32 count; |
500 certList = nssList_Create(NULL, PR_FALSE); | 500 certList = nssList_Create(NULL, PR_FALSE); |
501 if (!certList) return PR_FAILURE; | 501 if (!certList) return PR_FAILURE; |
502 (void *)nssTrustDomain_GetCertsFromCache(td, certList); | 502 (void)nssTrustDomain_GetCertsFromCache(td, certList); |
503 count = nssList_Count(certList); | 503 count = nssList_Count(certList); |
504 if (count > 0) { | 504 if (count > 0) { |
505 cached = nss_ZNEWARRAY(NULL, NSSCertificate *, count + 1); | 505 cached = nss_ZNEWARRAY(NULL, NSSCertificate *, count + 1); |
506 if (!cached) { | 506 if (!cached) { |
507 return PR_FAILURE; | 507 return PR_FAILURE; |
508 } | 508 } |
509 nssList_GetArray(certList, (void **)cached, count); | 509 nssList_GetArray(certList, (void **)cached, count); |
510 nssList_Destroy(certList); | 510 nssList_Destroy(certList); |
511 for (cp = cached; *cp; cp++) { | 511 for (cp = cached; *cp; cp++) { |
512 nssCryptokiObject *instance; | 512 nssCryptokiObject *instance; |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 nssTrustDomain_DumpCacheInfo ( | 1169 nssTrustDomain_DumpCacheInfo ( |
1170 NSSTrustDomain *td, | 1170 NSSTrustDomain *td, |
1171 void (* cert_dump_iter)(const void *, void *, void *), | 1171 void (* cert_dump_iter)(const void *, void *, void *), |
1172 void *arg | 1172 void *arg |
1173 ) | 1173 ) |
1174 { | 1174 { |
1175 PZ_Lock(td->cache->lock); | 1175 PZ_Lock(td->cache->lock); |
1176 nssHash_Iterate(td->cache->issuerAndSN, cert_dump_iter, arg); | 1176 nssHash_Iterate(td->cache->issuerAndSN, cert_dump_iter, arg); |
1177 PZ_Unlock(td->cache->lock); | 1177 PZ_Unlock(td->cache->lock); |
1178 } | 1178 } |
OLD | NEW |