| 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 * certi.h - private data structures for the certificate library | 5 * certi.h - private data structures for the certificate library |
| 6 * | 6 * |
| 7 * $Id$ | 7 * $Id$ |
| 8 */ | 8 */ |
| 9 #ifndef _CERTI_H_ | 9 #ifndef _CERTI_H_ |
| 10 #define _CERTI_H_ | 10 #define _CERTI_H_ |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 /* | 244 /* |
| 245 * get a DPCache object for the given issuer subject and dp | 245 * get a DPCache object for the given issuer subject and dp |
| 246 * Automatically creates the cache object if it doesn't exist yet. | 246 * Automatically creates the cache object if it doesn't exist yet. |
| 247 */ | 247 */ |
| 248 SECStatus AcquireDPCache(CERTCertificate* issuer, const SECItem* subject, | 248 SECStatus AcquireDPCache(CERTCertificate* issuer, const SECItem* subject, |
| 249 const SECItem* dp, int64 t, void* wincx, | 249 const SECItem* dp, int64 t, void* wincx, |
| 250 CRLDPCache** dpcache, PRBool* writeLocked); | 250 CRLDPCache** dpcache, PRBool* writeLocked); |
| 251 | 251 |
| 252 /* check if a particular SN is in the CRL cache and return its entry */ | 252 /* check if a particular SN is in the CRL cache and return its entry */ |
| 253 dpcacheStatus DPCache_Lookup(CRLDPCache* cache, SECItem* sn, | 253 dpcacheStatus DPCache_Lookup(CRLDPCache* cache, const SECItem* sn, |
| 254 CERTCrlEntry** returned); | 254 CERTCrlEntry** returned); |
| 255 | 255 |
| 256 /* release a DPCache object that was previously acquired */ | 256 /* release a DPCache object that was previously acquired */ |
| 257 void ReleaseDPCache(CRLDPCache* dpcache, PRBool writeLocked); | 257 void ReleaseDPCache(CRLDPCache* dpcache, PRBool writeLocked); |
| 258 | 258 |
| 259 /* | 259 /* |
| 260 * map Stan errors into NSS errors | 260 * map Stan errors into NSS errors |
| 261 * This function examines the stan error stack and automatically sets | 261 * This function examines the stan error stack and automatically sets |
| 262 * PORT_SetError(); to the appropriate SEC_ERROR value. | 262 * PORT_SetError(); to the appropriate SEC_ERROR value. |
| 263 */ | 263 */ |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 * acquired, and the entry is only valid until cache is released. | 352 * acquired, and the entry is only valid until cache is released. |
| 353 */ | 353 */ |
| 354 SECStatus cert_FindCRLByGeneralName(NamedCRLCache* ncc, | 354 SECStatus cert_FindCRLByGeneralName(NamedCRLCache* ncc, |
| 355 const SECItem* canonicalizedName, | 355 const SECItem* canonicalizedName, |
| 356 NamedCRLCacheEntry** retEntry); | 356 NamedCRLCacheEntry** retEntry); |
| 357 | 357 |
| 358 SECStatus cert_ReleaseNamedCRLCache(NamedCRLCache* ncc); | 358 SECStatus cert_ReleaseNamedCRLCache(NamedCRLCache* ncc); |
| 359 | 359 |
| 360 /* This is private for now. Maybe shoule be public. */ | 360 /* This is private for now. Maybe shoule be public. */ |
| 361 CERTGeneralName * | 361 CERTGeneralName * |
| 362 cert_GetSubjectAltNameList(CERTCertificate *cert, PRArenaPool *arena); | 362 cert_GetSubjectAltNameList(const CERTCertificate *cert, PRArenaPool *arena); |
| 363 | 363 |
| 364 /* Count DNS names and IP addresses in a list of GeneralNames */ | 364 /* Count DNS names and IP addresses in a list of GeneralNames */ |
| 365 PRUint32 | 365 PRUint32 |
| 366 cert_CountDNSPatterns(CERTGeneralName *firstName); | 366 cert_CountDNSPatterns(CERTGeneralName *firstName); |
| 367 | 367 |
| 368 /* | 368 /* |
| 369 * returns the trust status of the leaf certificate based on usage. | 369 * returns the trust status of the leaf certificate based on usage. |
| 370 * If the leaf is explicitly untrusted, this function will fail and | 370 * If the leaf is explicitly untrusted, this function will fail and |
| 371 * failedFlags will be set to the trust bit value that lead to the failure. | 371 * failedFlags will be set to the trust bit value that lead to the failure. |
| 372 * If the leaf is trusted, isTrusted is set to true and the function returns | 372 * If the leaf is trusted, isTrusted is set to true and the function returns |
| 373 * SECSuccess. This function does not check if the cert is fit for a | 373 * SECSuccess. This function does not check if the cert is fit for a |
| 374 * particular usage. | 374 * particular usage. |
| 375 */ | 375 */ |
| 376 SECStatus | 376 SECStatus |
| 377 cert_CheckLeafTrust(CERTCertificate *cert, | 377 cert_CheckLeafTrust(CERTCertificate *cert, |
| 378 SECCertUsage usage, | 378 SECCertUsage usage, |
| 379 unsigned int *failedFlags, | 379 unsigned int *failedFlags, |
| 380 PRBool *isTrusted); | 380 PRBool *isTrusted); |
| 381 | 381 |
| 382 #endif /* _CERTI_H_ */ | 382 #endif /* _CERTI_H_ */ |
| 383 | 383 |
| OLD | NEW |