~ubuntu-branches/ubuntu/quantal/nss/quantal-updates

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/pki/pkistore.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-11-14 14:58:07 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20131114145807-vj6v4erz8xj6kwz3
Tags: 3.15.3-0ubuntu0.12.10.1
* SECURITY UPDATE: New upstream release to fix multiple security issues
  and add TLSv1.2 support.
  - CVE-2013-1739
  - CVE-2013-1741
  - CVE-2013-5605
  - CVE-2013-5606
* Adjusted packaging for 3.15.3:
  - debian/patches/*: refreshed.
  - debian/patches/lower-dhe-priority.patch: removed, no longer needed,
    was a workaround for an old version of firefox.
  - debian/libnss3.symbols: added new symbols.
  - debian/rules: updated for new source layout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
3
 
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
 
 
5
 
#ifndef PKISTORE_H
6
 
#define PKISTORE_H
7
 
 
8
 
#ifdef DEBUG
9
 
static const char PKISTORE_CVS_ID[] = "@(#) $RCSfile: pkistore.h,v $ $Revision: 1.13 $ $Date: 2012/04/25 14:50:07 $";
10
 
#endif /* DEBUG */
11
 
 
12
 
#ifndef NSSPKIT_H
13
 
#include "nsspkit.h"
14
 
#endif /* NSSPKIT_H */
15
 
 
16
 
#ifndef BASE_H
17
 
#include "base.h"
18
 
#endif /* BASE_H */
19
 
 
20
 
PR_BEGIN_EXTERN_C
21
 
 
22
 
/* 
23
 
 * PKI Stores
24
 
 *
25
 
 * This is a set of routines for managing local stores of PKI objects.
26
 
 * Currently, the only application is in crypto contexts, where the
27
 
 * certificate store is used.  In the future, methods should be added
28
 
 * here for storing local references to keys.
29
 
 */
30
 
 
31
 
/* 
32
 
 * nssCertificateStore
33
 
 *
34
 
 * Manages local store of certificate, trust, and S/MIME profile objects.
35
 
 * Within a crypto context, mappings of cert to trust and cert to S/MIME
36
 
 * profile are always 1-1.  Therefore, it is reasonable to store all objects
37
 
 * in a single collection, indexed by the certificate.
38
 
 */
39
 
 
40
 
NSS_EXTERN nssCertificateStore *
41
 
nssCertificateStore_Create
42
 
(
43
 
  NSSArena *arenaOpt
44
 
);
45
 
 
46
 
NSS_EXTERN PRStatus
47
 
nssCertificateStore_Destroy
48
 
(
49
 
  nssCertificateStore *store
50
 
);
51
 
 
52
 
/* Atomic Find cert in store, or add this cert to the store.
53
 
** Ref counts properly maintained.
54
 
*/
55
 
NSS_EXTERN NSSCertificate *
56
 
nssCertificateStore_FindOrAdd 
57
 
(
58
 
  nssCertificateStore *store,
59
 
  NSSCertificate *c
60
 
);
61
 
 
62
 
NSS_EXTERN void
63
 
nssCertificateStore_RemoveCertLOCKED
64
 
(
65
 
  nssCertificateStore *store,
66
 
  NSSCertificate *cert
67
 
);
68
 
 
69
 
struct nssCertificateStoreTraceStr {
70
 
    nssCertificateStore* store;
71
 
    PZLock* lock;
72
 
    PRBool locked;
73
 
    PRBool unlocked;
74
 
};
75
 
 
76
 
typedef struct nssCertificateStoreTraceStr nssCertificateStoreTrace;
77
 
 
78
 
NSS_EXTERN void
79
 
nssCertificateStore_Lock (
80
 
  nssCertificateStore *store, nssCertificateStoreTrace* out
81
 
);
82
 
 
83
 
NSS_EXTERN void
84
 
nssCertificateStore_Unlock (
85
 
  nssCertificateStore *store, const nssCertificateStoreTrace* in,
86
 
  nssCertificateStoreTrace* out
87
 
);
88
 
 
89
 
NSS_EXTERN NSSCertificate **
90
 
nssCertificateStore_FindCertificatesBySubject
91
 
(
92
 
  nssCertificateStore *store,
93
 
  NSSDER *subject,
94
 
  NSSCertificate *rvOpt[],
95
 
  PRUint32 maximumOpt,
96
 
  NSSArena *arenaOpt
97
 
);
98
 
 
99
 
NSS_EXTERN NSSCertificate **
100
 
nssCertificateStore_FindCertificatesByNickname
101
 
(
102
 
  nssCertificateStore *store,
103
 
  const NSSUTF8 *nickname,
104
 
  NSSCertificate *rvOpt[],
105
 
  PRUint32 maximumOpt,
106
 
  NSSArena *arenaOpt
107
 
);
108
 
 
109
 
NSS_EXTERN NSSCertificate **
110
 
nssCertificateStore_FindCertificatesByEmail
111
 
(
112
 
  nssCertificateStore *store,
113
 
  NSSASCII7 *email,
114
 
  NSSCertificate *rvOpt[],
115
 
  PRUint32 maximumOpt,
116
 
  NSSArena *arenaOpt
117
 
);
118
 
 
119
 
NSS_EXTERN NSSCertificate *
120
 
nssCertificateStore_FindCertificateByIssuerAndSerialNumber
121
 
(
122
 
  nssCertificateStore *store,
123
 
  NSSDER *issuer,
124
 
  NSSDER *serial
125
 
);
126
 
 
127
 
NSS_EXTERN NSSCertificate *
128
 
nssCertificateStore_FindCertificateByEncodedCertificate
129
 
(
130
 
  nssCertificateStore *store,
131
 
  NSSDER *encoding
132
 
);
133
 
 
134
 
NSS_EXTERN PRStatus
135
 
nssCertificateStore_AddTrust
136
 
(
137
 
  nssCertificateStore *store,
138
 
  NSSTrust *trust
139
 
);
140
 
 
141
 
NSS_EXTERN NSSTrust *
142
 
nssCertificateStore_FindTrustForCertificate
143
 
(
144
 
  nssCertificateStore *store,
145
 
  NSSCertificate *cert
146
 
);
147
 
 
148
 
NSS_EXTERN PRStatus
149
 
nssCertificateStore_AddSMIMEProfile
150
 
(
151
 
  nssCertificateStore *store,
152
 
  nssSMIMEProfile *profile
153
 
);
154
 
 
155
 
NSS_EXTERN nssSMIMEProfile *
156
 
nssCertificateStore_FindSMIMEProfileForCertificate
157
 
(
158
 
  nssCertificateStore *store,
159
 
  NSSCertificate *cert
160
 
);
161
 
 
162
 
NSS_EXTERN void
163
 
nssCertificateStore_DumpStoreInfo
164
 
(
165
 
  nssCertificateStore *store,
166
 
  void (* cert_dump_iter)(const void *, void *, void *),
167
 
  void *arg
168
 
);
169
 
 
170
 
PR_END_EXTERN_C
171
 
 
172
 
#endif /* PKISTORE_H */