Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: nss/lib/pki/trustdomain.c

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 #ifndef DEV_H 5 #ifndef DEV_H
6 #include "dev.h" 6 #include "dev.h"
7 #endif /* DEV_H */ 7 #endif /* DEV_H */
8 8
9 #ifndef PKIM_H 9 #ifndef PKIM_H
10 #include "pkim.h" 10 #include "pkim.h"
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 return nssPKIObjectCollection_AddInstanceAsObject(collection, instance); 984 return nssPKIObjectCollection_AddInstanceAsObject(collection, instance);
985 } 985 }
986 986
987 NSS_IMPLEMENT PRStatus * 987 NSS_IMPLEMENT PRStatus *
988 NSSTrustDomain_TraverseCertificates ( 988 NSSTrustDomain_TraverseCertificates (
989 NSSTrustDomain *td, 989 NSSTrustDomain *td,
990 PRStatus (*callback)(NSSCertificate *c, void *arg), 990 PRStatus (*callback)(NSSCertificate *c, void *arg),
991 void *arg 991 void *arg
992 ) 992 )
993 { 993 {
994 PRStatus status = PR_FAILURE;
995 NSSToken *token = NULL; 994 NSSToken *token = NULL;
996 NSSSlot **slots = NULL; 995 NSSSlot **slots = NULL;
997 NSSSlot **slotp; 996 NSSSlot **slotp;
998 nssPKIObjectCollection *collection = NULL; 997 nssPKIObjectCollection *collection = NULL;
999 nssPKIObjectCallback pkiCallback; 998 nssPKIObjectCallback pkiCallback;
1000 nssUpdateLevel updateLevel; 999 nssUpdateLevel updateLevel;
1001 NSSCertificate **cached = NULL; 1000 NSSCertificate **cached = NULL;
1002 nssList *certList; 1001 nssList *certList;
1003 1002
1004 certList = nssList_Create(NULL, PR_FALSE); 1003 certList = nssList_Create(NULL, PR_FALSE);
(...skipping 16 matching lines...) Expand all
1021 for (slotp = slots; *slotp; slotp++) { 1020 for (slotp = slots; *slotp; slotp++) {
1022 /* get the token for the slot, if present */ 1021 /* get the token for the slot, if present */
1023 token = nssSlot_GetToken(*slotp); 1022 token = nssSlot_GetToken(*slotp);
1024 if (token) { 1023 if (token) {
1025 nssSession *session; 1024 nssSession *session;
1026 nssTokenSearchType tokenOnly = nssTokenSearchType_TokenOnly; 1025 nssTokenSearchType tokenOnly = nssTokenSearchType_TokenOnly;
1027 /* get a session for the token */ 1026 /* get a session for the token */
1028 session = nssTrustDomain_GetSessionForToken(td, token); 1027 session = nssTrustDomain_GetSessionForToken(td, token);
1029 if (session) { 1028 if (session) {
1030 /* perform the traversal */ 1029 /* perform the traversal */
1031 » » status = nssToken_TraverseCertificates(token, 1030 » » (void)nssToken_TraverseCertificates(token,
1032 session, 1031 session,
1033 tokenOnly, 1032 tokenOnly,
1034 collector, 1033 collector,
1035 collection); 1034 collection);
1036 } 1035 }
1037 nssToken_Destroy(token); 1036 nssToken_Destroy(token);
1038 } 1037 }
1039 } 1038 }
1040 1039
1041 /* Traverse the collection */ 1040 /* Traverse the collection */
1042 pkiCallback.func.cert = callback; 1041 pkiCallback.func.cert = callback;
1043 pkiCallback.arg = arg; 1042 pkiCallback.arg = arg;
1044 status = nssPKIObjectCollection_Traverse(collection, &pkiCallback); 1043 (void)nssPKIObjectCollection_Traverse(collection, &pkiCallback);
1045 loser: 1044 loser:
1046 if (slots) { 1045 if (slots) {
1047 nssSlotArray_Destroy(slots); 1046 nssSlotArray_Destroy(slots);
1048 } 1047 }
1049 if (collection) { 1048 if (collection) {
1050 nssPKIObjectCollection_Destroy(collection); 1049 nssPKIObjectCollection_Destroy(collection);
1051 } 1050 }
1052 return NULL; 1051 return NULL;
1053 } 1052 }
1054 1053
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 NSS_IMPLEMENT NSSCryptoContext * 1240 NSS_IMPLEMENT NSSCryptoContext *
1242 NSSTrustDomain_CreateCryptoContextForAlgorithmAndParameters ( 1241 NSSTrustDomain_CreateCryptoContextForAlgorithmAndParameters (
1243 NSSTrustDomain *td, 1242 NSSTrustDomain *td,
1244 NSSAlgorithmAndParameters *ap 1243 NSSAlgorithmAndParameters *ap
1245 ) 1244 )
1246 { 1245 {
1247 nss_SetError(NSS_ERROR_NOT_FOUND); 1246 nss_SetError(NSS_ERROR_NOT_FOUND);
1248 return NULL; 1247 return NULL;
1249 } 1248 }
1250 1249
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698