Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: nss/lib/certdb/certi.h

Issue 16132005: Allow NSS to be built with NO_NSPR_10_SUPPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nss/lib/certdb/certdb.c ('k') | nss/lib/certdb/certv3.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef _CERTI_H_ 7 #ifndef _CERTI_H_
8 #define _CERTI_H_ 8 #define _CERTI_H_
9 9
10 #include "certt.h" 10 #include "certt.h"
(...skipping 25 matching lines...) Expand all
36 PRBool heapDER; 36 PRBool heapDER;
37 }; 37 };
38 38
39 typedef struct PreAllocatorStr PreAllocator; 39 typedef struct PreAllocatorStr PreAllocator;
40 40
41 struct PreAllocatorStr 41 struct PreAllocatorStr
42 { 42 {
43 PRSize len; 43 PRSize len;
44 void* data; 44 void* data;
45 PRSize used; 45 PRSize used;
46 PRArenaPool* arena; 46 PLArenaPool* arena;
47 PRSize extra; 47 PRSize extra;
48 }; 48 };
49 49
50 /* CRL entry cache. 50 /* CRL entry cache.
51 This is the same as an entry plus the next/prev pointers for the hash table 51 This is the same as an entry plus the next/prev pointers for the hash table
52 */ 52 */
53 53
54 struct CRLEntryCacheStr { 54 struct CRLEntryCacheStr {
55 CERTCrlEntry entry; 55 CERTCrlEntry entry;
56 CRLEntryCache *prev, *next; 56 CRLEntryCache *prev, *next;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 SECStatus 225 SECStatus
226 cert_DestroySubjectKeyIDHashTable(void); 226 cert_DestroySubjectKeyIDHashTable(void);
227 227
228 SECItem* 228 SECItem*
229 cert_FindDERCertBySubjectKeyID(SECItem *subjKeyID); 229 cert_FindDERCertBySubjectKeyID(SECItem *subjKeyID);
230 230
231 /* return maximum length of AVA value based on its type OID tag. */ 231 /* return maximum length of AVA value based on its type OID tag. */
232 extern int cert_AVAOidTagToMaxLen(SECOidTag tag); 232 extern int cert_AVAOidTagToMaxLen(SECOidTag tag);
233 233
234 /* Make an AVA, allocated from pool, from OID and DER encoded value */ 234 /* Make an AVA, allocated from pool, from OID and DER encoded value */
235 extern CERTAVA * CERT_CreateAVAFromRaw(PRArenaPool *pool, 235 extern CERTAVA * CERT_CreateAVAFromRaw(PLArenaPool *pool,
236 const SECItem * OID, const SECItem * value); 236 const SECItem * OID, const SECItem * value);
237 237
238 /* Make an AVA from binary input specified by SECItem */ 238 /* Make an AVA from binary input specified by SECItem */
239 extern CERTAVA * CERT_CreateAVAFromSECItem(PRArenaPool *arena, SECOidTag kind, 239 extern CERTAVA * CERT_CreateAVAFromSECItem(PLArenaPool *arena, SECOidTag kind,
240 int valueType, SECItem *value); 240 int valueType, SECItem *value);
241 241
242 /* 242 /*
243 * get a DPCache object for the given issuer subject and dp 243 * get a DPCache object for the given issuer subject and dp
244 * Automatically creates the cache object if it doesn't exist yet. 244 * Automatically creates the cache object if it doesn't exist yet.
245 */ 245 */
246 SECStatus AcquireDPCache(CERTCertificate* issuer, const SECItem* subject, 246 SECStatus AcquireDPCache(CERTCertificate* issuer, const SECItem* subject,
247 const SECItem* dp, int64 t, void* wincx, 247 const SECItem* dp, PRTime t, void* wincx,
248 CRLDPCache** dpcache, PRBool* writeLocked); 248 CRLDPCache** dpcache, PRBool* writeLocked);
249 249
250 /* check if a particular SN is in the CRL cache and return its entry */ 250 /* check if a particular SN is in the CRL cache and return its entry */
251 dpcacheStatus DPCache_Lookup(CRLDPCache* cache, const SECItem* sn, 251 dpcacheStatus DPCache_Lookup(CRLDPCache* cache, const SECItem* sn,
252 CERTCrlEntry** returned); 252 CERTCrlEntry** returned);
253 253
254 /* release a DPCache object that was previously acquired */ 254 /* release a DPCache object that was previously acquired */
255 void ReleaseDPCache(CRLDPCache* dpcache, PRBool writeLocked); 255 void ReleaseDPCache(CRLDPCache* dpcache, PRBool writeLocked);
256 256
257 /* 257 /*
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 * acquired, and the entry is only valid until cache is released. 350 * acquired, and the entry is only valid until cache is released.
351 */ 351 */
352 SECStatus cert_FindCRLByGeneralName(NamedCRLCache* ncc, 352 SECStatus cert_FindCRLByGeneralName(NamedCRLCache* ncc,
353 const SECItem* canonicalizedName, 353 const SECItem* canonicalizedName,
354 NamedCRLCacheEntry** retEntry); 354 NamedCRLCacheEntry** retEntry);
355 355
356 SECStatus cert_ReleaseNamedCRLCache(NamedCRLCache* ncc); 356 SECStatus cert_ReleaseNamedCRLCache(NamedCRLCache* ncc);
357 357
358 /* This is private for now. Maybe shoule be public. */ 358 /* This is private for now. Maybe shoule be public. */
359 CERTGeneralName * 359 CERTGeneralName *
360 cert_GetSubjectAltNameList(const CERTCertificate *cert, PRArenaPool *arena); 360 cert_GetSubjectAltNameList(const CERTCertificate *cert, PLArenaPool *arena);
361 361
362 /* Count DNS names and IP addresses in a list of GeneralNames */ 362 /* Count DNS names and IP addresses in a list of GeneralNames */
363 PRUint32 363 PRUint32
364 cert_CountDNSPatterns(CERTGeneralName *firstName); 364 cert_CountDNSPatterns(CERTGeneralName *firstName);
365 365
366 /* 366 /*
367 * returns the trust status of the leaf certificate based on usage. 367 * returns the trust status of the leaf certificate based on usage.
368 * If the leaf is explicitly untrusted, this function will fail and 368 * If the leaf is explicitly untrusted, this function will fail and
369 * failedFlags will be set to the trust bit value that lead to the failure. 369 * failedFlags will be set to the trust bit value that lead to the failure.
370 * If the leaf is trusted, isTrusted is set to true and the function returns 370 * If the leaf is trusted, isTrusted is set to true and the function returns
371 * SECSuccess. This function does not check if the cert is fit for a 371 * SECSuccess. This function does not check if the cert is fit for a
372 * particular usage. 372 * particular usage.
373 */ 373 */
374 SECStatus 374 SECStatus
375 cert_CheckLeafTrust(CERTCertificate *cert, 375 cert_CheckLeafTrust(CERTCertificate *cert,
376 SECCertUsage usage, 376 SECCertUsage usage,
377 unsigned int *failedFlags, 377 unsigned int *failedFlags,
378 PRBool *isTrusted); 378 PRBool *isTrusted);
379 379
380 #endif /* _CERTI_H_ */ 380 #endif /* _CERTI_H_ */
381 381
OLDNEW
« no previous file with comments | « nss/lib/certdb/certdb.c ('k') | nss/lib/certdb/certv3.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698