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 #include "nspr.h" | 4 #include "nspr.h" |
5 #include "secerr.h" | 5 #include "secerr.h" |
6 #include "secport.h" | 6 #include "secport.h" |
7 #include "seccomon.h" | 7 #include "seccomon.h" |
8 #include "secoid.h" | 8 #include "secoid.h" |
9 #include "sslerr.h" | 9 #include "sslerr.h" |
10 #include "genname.h" | 10 #include "genname.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 CERT_CertTimesValid(CERTCertificate *c) | 74 CERT_CertTimesValid(CERTCertificate *c) |
75 { | 75 { |
76 SECCertTimeValidity valid = CERT_CheckCertValidTimes(c, PR_Now(), PR_TRUE); | 76 SECCertTimeValidity valid = CERT_CheckCertValidTimes(c, PR_Now(), PR_TRUE); |
77 return (valid == secCertTimeValid) ? SECSuccess : SECFailure; | 77 return (valid == secCertTimeValid) ? SECSuccess : SECFailure; |
78 } | 78 } |
79 | 79 |
80 /* | 80 /* |
81 * verify the signature of a signed data object with the given DER publickey | 81 * verify the signature of a signed data object with the given DER publickey |
82 */ | 82 */ |
83 SECStatus | 83 SECStatus |
84 CERT_VerifySignedDataWithPublicKey(CERTSignedData *sd, | 84 CERT_VerifySignedDataWithPublicKey(const CERTSignedData *sd, |
85 SECKEYPublicKey *pubKey, | 85 SECKEYPublicKey *pubKey, |
86 void *wincx) | 86 void *wincx) |
87 { | 87 { |
88 SECStatus rv; | 88 SECStatus rv; |
89 SECItem sig; | 89 SECItem sig; |
90 SECOidTag hashAlg = SEC_OID_UNKNOWN; | 90 SECOidTag hashAlg = SEC_OID_UNKNOWN; |
91 | 91 |
92 if ( !pubKey || !sd ) { | 92 if ( !pubKey || !sd ) { |
93 PORT_SetError(PR_INVALID_ARGUMENT_ERROR); | 93 PORT_SetError(PR_INVALID_ARGUMENT_ERROR); |
94 return SECFailure; | 94 return SECFailure; |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 return chain; | 1863 return chain; |
1864 } | 1864 } |
1865 | 1865 |
1866 cert = CERT_FindCertIssuer(cert, time, usage); | 1866 cert = CERT_FindCertIssuer(cert, time, usage); |
1867 } | 1867 } |
1868 | 1868 |
1869 /* return partial chain */ | 1869 /* return partial chain */ |
1870 PORT_SetError(SEC_ERROR_UNKNOWN_ISSUER); | 1870 PORT_SetError(SEC_ERROR_UNKNOWN_ISSUER); |
1871 return chain; | 1871 return chain; |
1872 } | 1872 } |
OLD | NEW |