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 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1938 } | 1938 } |
1939 collection = nssCertificateCollection_Create(td, NULL); | 1939 collection = nssCertificateCollection_Create(td, NULL); |
1940 if (!collection) { | 1940 if (!collection) { |
1941 return SECFailure; | 1941 return SECFailure; |
1942 } | 1942 } |
1943 certList = nssList_Create(NULL, PR_FALSE); | 1943 certList = nssList_Create(NULL, PR_FALSE); |
1944 if (!certList) { | 1944 if (!certList) { |
1945 nssPKIObjectCollection_Destroy(collection); | 1945 nssPKIObjectCollection_Destroy(collection); |
1946 return SECFailure; | 1946 return SECFailure; |
1947 } | 1947 } |
1948 (void *)nssTrustDomain_GetCertsFromCache(td, certList); | 1948 (void)nssTrustDomain_GetCertsFromCache(td, certList); |
1949 transfer_token_certs_to_collection(certList, tok, collection); | 1949 transfer_token_certs_to_collection(certList, tok, collection); |
1950 instances = nssToken_FindObjects(tok, NULL, CKO_CERTIFICATE, | 1950 instances = nssToken_FindObjects(tok, NULL, CKO_CERTIFICATE, |
1951 tokenOnly, 0, &nssrv); | 1951 tokenOnly, 0, &nssrv); |
1952 nssPKIObjectCollection_AddInstances(collection, instances, 0); | 1952 nssPKIObjectCollection_AddInstances(collection, instances, 0); |
1953 nss_ZFreeIf(instances); | 1953 nss_ZFreeIf(instances); |
1954 nssList_Destroy(certList); | 1954 nssList_Destroy(certList); |
1955 certs = nssPKIObjectCollection_GetCertificates(collection, | 1955 certs = nssPKIObjectCollection_GetCertificates(collection, |
1956 NULL, 0, NULL); | 1956 NULL, 0, NULL); |
1957 nssPKIObjectCollection_Destroy(collection); | 1957 nssPKIObjectCollection_Destroy(collection); |
1958 if (certs) { | 1958 if (certs) { |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 } | 2510 } |
2511 if (!found) { | 2511 if (!found) { |
2512 PK11_FreeSlotList(slotList); | 2512 PK11_FreeSlotList(slotList); |
2513 PORT_SetError(SEC_ERROR_NO_TOKEN); | 2513 PORT_SetError(SEC_ERROR_NO_TOKEN); |
2514 slotList = NULL; | 2514 slotList = NULL; |
2515 } | 2515 } |
2516 | 2516 |
2517 nssCryptokiObjectArray_Destroy(instances); | 2517 nssCryptokiObjectArray_Destroy(instances); |
2518 return slotList; | 2518 return slotList; |
2519 } | 2519 } |
OLD | NEW |