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 /* | 5 /* |
6 * Interface to the PKCS7 implementation. | 6 * Interface to the PKCS7 implementation. |
7 * | 7 * |
8 * $Id$ | 8 * $Id$ |
9 */ | 9 */ |
10 | 10 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 * In addition, if "keepcerts" is true, add any new certificates found | 127 * In addition, if "keepcerts" is true, add any new certificates found |
128 * into our local database. | 128 * into our local database. |
129 */ | 129 */ |
130 extern PRBool SEC_PKCS7VerifyDetachedSignature(SEC_PKCS7ContentInfo *cinfo, | 130 extern PRBool SEC_PKCS7VerifyDetachedSignature(SEC_PKCS7ContentInfo *cinfo, |
131 SECCertUsage certusage, | 131 SECCertUsage certusage, |
132 const SECItem *detached_digest, | 132 const SECItem *detached_digest, |
133 HASH_HashType digest_type, | 133 HASH_HashType digest_type, |
134 PRBool keepcerts); | 134 PRBool keepcerts); |
135 | 135 |
136 /* | 136 /* |
| 137 * SEC_PKCS7VerifyDetachedSignatureAtTime |
| 138 * Look at a PKCS7 contentInfo and check if the signature matches |
| 139 * a passed-in digest (calculated, supposedly, from detached contents). |
| 140 * The verification checks that the signing cert is valid and trusted |
| 141 * for the purpose specified by "certusage" at time "atTime". |
| 142 * |
| 143 * In addition, if "keepcerts" is true, add any new certificates found |
| 144 * into our local database. |
| 145 */ |
| 146 extern PRBool |
| 147 SEC_PKCS7VerifyDetachedSignatureAtTime(SEC_PKCS7ContentInfo *cinfo, |
| 148 SECCertUsage certusage, |
| 149 const SECItem *detached_digest, |
| 150 HASH_HashType digest_type, |
| 151 PRBool keepcerts, |
| 152 PRTime atTime); |
| 153 |
| 154 /* |
137 * SEC_PKCS7GetSignerCommonName, SEC_PKCS7GetSignerEmailAddress | 155 * SEC_PKCS7GetSignerCommonName, SEC_PKCS7GetSignerEmailAddress |
138 * The passed-in contentInfo is espected to be Signed, and these | 156 * The passed-in contentInfo is espected to be Signed, and these |
139 * functions return the specified portion of the full signer name. | 157 * functions return the specified portion of the full signer name. |
140 * | 158 * |
141 * Returns a pointer to allocated memory, which must be freed. | 159 * Returns a pointer to allocated memory, which must be freed. |
142 * A NULL return value is an error. | 160 * A NULL return value is an error. |
143 */ | 161 */ |
144 extern char *SEC_PKCS7GetSignerCommonName(SEC_PKCS7ContentInfo *cinfo); | 162 extern char *SEC_PKCS7GetSignerCommonName(SEC_PKCS7ContentInfo *cinfo); |
145 extern char *SEC_PKCS7GetSignerEmailAddress(SEC_PKCS7ContentInfo *cinfo); | 163 extern char *SEC_PKCS7GetSignerEmailAddress(SEC_PKCS7ContentInfo *cinfo); |
146 | 164 |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 this object. Returns 0 if it's not encrypted, or the key length is | 603 this object. Returns 0 if it's not encrypted, or the key length is |
586 irrelevant. */ | 604 irrelevant. */ |
587 extern int | 605 extern int |
588 SEC_PKCS7GetKeyLength(SEC_PKCS7ContentInfo *cinfo); | 606 SEC_PKCS7GetKeyLength(SEC_PKCS7ContentInfo *cinfo); |
589 | 607 |
590 | 608 |
591 /************************************************************************/ | 609 /************************************************************************/ |
592 SEC_END_PROTOS | 610 SEC_END_PROTOS |
593 | 611 |
594 #endif /* _SECPKCS7_H_ */ | 612 #endif /* _SECPKCS7_H_ */ |
OLD | NEW |