OLD | NEW |
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 #include "prtime.h" | 5 #include "prtime.h" |
6 | 6 |
7 #include "cert.h" | 7 #include "cert.h" |
8 #include "certi.h" | 8 #include "certi.h" |
9 #include "certdb.h" | 9 #include "certdb.h" |
10 #include "secitem.h" | 10 #include "secitem.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 /* get rid of the cache entry */ | 81 /* get rid of the cache entry */ |
82 nssTrustDomain_LockCertCache(td); | 82 nssTrustDomain_LockCertCache(td); |
83 nssTrustDomain_RemoveCertFromCacheLOCKED(td, c); | 83 nssTrustDomain_RemoveCertFromCacheLOCKED(td, c); |
84 nssTrustDomain_UnlockCertCache(td); | 84 nssTrustDomain_UnlockCertCache(td); |
85 | 85 |
86 return (nssrv == PR_SUCCESS) ? SECSuccess : SECFailure; | 86 return (nssrv == PR_SUCCESS) ? SECSuccess : SECFailure; |
87 } | 87 } |
88 | 88 |
89 SECStatus | 89 SECStatus |
90 CERT_GetCertTrust(CERTCertificate *cert, CERTCertTrust *trust) | 90 CERT_GetCertTrust(const CERTCertificate *cert, CERTCertTrust *trust) |
91 { | 91 { |
92 SECStatus rv; | 92 SECStatus rv; |
93 CERT_LockCertTrust(cert); | 93 CERT_LockCertTrust(cert); |
94 if ( cert->trust == NULL ) { | 94 if ( cert->trust == NULL ) { |
95 rv = SECFailure; | 95 rv = SECFailure; |
96 } else { | 96 } else { |
97 *trust = *cert->trust; | 97 *trust = *cert->trust; |
98 rv = SECSuccess; | 98 rv = SECSuccess; |
99 } | 99 } |
100 CERT_UnlockCertTrust(cert); | 100 CERT_UnlockCertTrust(cert); |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 if (secrv != SECSuccess) { | 705 if (secrv != SECSuccess) { |
706 CERT_DestroyCertificate(cert); | 706 CERT_DestroyCertificate(cert); |
707 } | 707 } |
708 } else { | 708 } else { |
709 CERT_DestroyCertificate(cert); | 709 CERT_DestroyCertificate(cert); |
710 } | 710 } |
711 } | 711 } |
712 | 712 |
713 CERTCertList * | 713 CERTCertList * |
714 CERT_CreateSubjectCertList(CERTCertList *certList, CERTCertDBHandle *handle, | 714 CERT_CreateSubjectCertList(CERTCertList *certList, CERTCertDBHandle *handle, |
715 » » » SECItem *name, int64 sorttime, PRBool validOnly) | 715 » » » const SECItem *name, PRTime sorttime, |
| 716 » » » PRBool validOnly) |
716 { | 717 { |
717 NSSCryptoContext *cc; | 718 NSSCryptoContext *cc; |
718 NSSCertificate **tSubjectCerts, **pSubjectCerts; | 719 NSSCertificate **tSubjectCerts, **pSubjectCerts; |
719 NSSCertificate **ci; | 720 NSSCertificate **ci; |
720 CERTCertificate *cert; | 721 CERTCertificate *cert; |
721 NSSDER subject; | 722 NSSDER subject; |
722 PRBool myList = PR_FALSE; | 723 PRBool myList = PR_FALSE; |
723 cc = STAN_GetDefaultCryptoContext(); | 724 cc = STAN_GetDefaultCryptoContext(); |
724 NSSITEM_FROM_SECITEM(&subject, name); | 725 NSSITEM_FROM_SECITEM(&subject, name); |
725 /* Collect both temp and perm certs for the subject */ | 726 /* Collect both temp and perm certs for the subject */ |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 __CERT_TraversePermCertsForNickname(CERTCertDBHandle *handle, char *nickname, | 1063 __CERT_TraversePermCertsForNickname(CERTCertDBHandle *handle, char *nickname, |
1063 void *cb, void *cbarg) | 1064 void *cb, void *cbarg) |
1064 { | 1065 { |
1065 PORT_Assert("CERT_TraversePermCertsForNickname is Deprecated" == NULL); | 1066 PORT_Assert("CERT_TraversePermCertsForNickname is Deprecated" == NULL); |
1066 PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); | 1067 PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); |
1067 return SECFailure; | 1068 return SECFailure; |
1068 } | 1069 } |
1069 | 1070 |
1070 | 1071 |
1071 | 1072 |
OLD | NEW |