~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * The contents of this file are subject to the Mozilla Public
 
3
 * License Version 1.1 (the "License"); you may not use this file
 
4
 * except in compliance with the License. You may obtain a copy of
 
5
 * the License at http://www.mozilla.org/MPL/
 
6
 * 
 
7
 * Software distributed under the License is distributed on an "AS
 
8
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
9
 * implied. See the License for the specific language governing
 
10
 * rights and limitations under the License.
 
11
 * 
 
12
 * The Original Code is the Netscape security libraries.
 
13
 * 
 
14
 * The Initial Developer of the Original Code is Netscape
 
15
 * Communications Corporation.  Portions created by Netscape are 
 
16
 * Copyright (C) 1994-2000 Netscape Communications Corporation.  All
 
17
 * Rights Reserved.
 
18
 * 
 
19
 * Contributor(s):
 
20
 * 
 
21
 * Alternatively, the contents of this file may be used under the
 
22
 * terms of the GNU General Public License Version 2 or later (the
 
23
 * "GPL"), in which case the provisions of the GPL are applicable 
 
24
 * instead of those above.  If you wish to allow use of your 
 
25
 * version of this file only under the terms of the GPL and not to
 
26
 * allow others to use your version of this file under the MPL,
 
27
 * indicate your decision by deleting the provisions above and
 
28
 * replace them with the notice and other provisions required by
 
29
 * the GPL.  If you do not delete the provisions above, a recipient
 
30
 * may use your version of this file under either the MPL or the
 
31
 * GPL.
 
32
 */
 
33
 
 
34
#ifndef PKISTORE_H
 
35
#define PKISTORE_H
 
36
 
 
37
#ifdef DEBUG
 
38
static const char PKISTORE_CVS_ID[] = "@(#) $RCSfile: pkistore.h,v $ $Revision: 1.5 $ $Date: 2003/01/08 21:48:45 $ $Name: FIREFOX_1_0_RELEASE $";
 
39
#endif /* DEBUG */
 
40
 
 
41
#ifndef NSSPKIT_H
 
42
#include "nsspkit.h"
 
43
#endif /* NSSPKIT_H */
 
44
 
 
45
#ifndef BASE_H
 
46
#include "base.h"
 
47
#endif /* BASE_H */
 
48
 
 
49
PR_BEGIN_EXTERN_C
 
50
 
 
51
/* 
 
52
 * PKI Stores
 
53
 *
 
54
 * This is a set of routines for managing local stores of PKI objects.
 
55
 * Currently, the only application is in crypto contexts, where the
 
56
 * certificate store is used.  In the future, methods should be added
 
57
 * here for storing local references to keys.
 
58
 */
 
59
 
 
60
/* 
 
61
 * nssCertificateStore
 
62
 *
 
63
 * Manages local store of certificate, trust, and S/MIME profile objects.
 
64
 * Within a crypto context, mappings of cert to trust and cert to S/MIME
 
65
 * profile are always 1-1.  Therefore, it is reasonable to store all objects
 
66
 * in a single collection, indexed by the certificate.
 
67
 */
 
68
 
 
69
NSS_EXTERN nssCertificateStore *
 
70
nssCertificateStore_Create
 
71
(
 
72
  NSSArena *arenaOpt
 
73
);
 
74
 
 
75
NSS_EXTERN PRStatus
 
76
nssCertificateStore_Destroy
 
77
(
 
78
  nssCertificateStore *store
 
79
);
 
80
 
 
81
NSS_EXTERN PRStatus
 
82
nssCertificateStore_Add
 
83
(
 
84
  nssCertificateStore *store,
 
85
  NSSCertificate *cert
 
86
);
 
87
 
 
88
NSS_EXTERN void
 
89
nssCertificateStore_RemoveCertLOCKED
 
90
(
 
91
  nssCertificateStore *store,
 
92
  NSSCertificate *cert
 
93
);
 
94
 
 
95
NSS_EXTERN void
 
96
nssCertificateStore_Lock (
 
97
  nssCertificateStore *store
 
98
);
 
99
 
 
100
NSS_EXTERN void
 
101
nssCertificateStore_Unlock (
 
102
  nssCertificateStore *store
 
103
);
 
104
 
 
105
NSS_EXTERN NSSCertificate **
 
106
nssCertificateStore_FindCertificatesBySubject
 
107
(
 
108
  nssCertificateStore *store,
 
109
  NSSDER *subject,
 
110
  NSSCertificate *rvOpt[],
 
111
  PRUint32 maximumOpt,
 
112
  NSSArena *arenaOpt
 
113
);
 
114
 
 
115
NSS_EXTERN NSSCertificate **
 
116
nssCertificateStore_FindCertificatesByNickname
 
117
(
 
118
  nssCertificateStore *store,
 
119
  NSSUTF8 *nickname,
 
120
  NSSCertificate *rvOpt[],
 
121
  PRUint32 maximumOpt,
 
122
  NSSArena *arenaOpt
 
123
);
 
124
 
 
125
NSS_EXTERN NSSCertificate **
 
126
nssCertificateStore_FindCertificatesByEmail
 
127
(
 
128
  nssCertificateStore *store,
 
129
  NSSASCII7 *email,
 
130
  NSSCertificate *rvOpt[],
 
131
  PRUint32 maximumOpt,
 
132
  NSSArena *arenaOpt
 
133
);
 
134
 
 
135
NSS_EXTERN NSSCertificate *
 
136
nssCertificateStore_FindCertificateByIssuerAndSerialNumber
 
137
(
 
138
  nssCertificateStore *store,
 
139
  NSSDER *issuer,
 
140
  NSSDER *serial
 
141
);
 
142
 
 
143
NSS_EXTERN NSSCertificate *
 
144
nssCertificateStore_FindCertificateByEncodedCertificate
 
145
(
 
146
  nssCertificateStore *store,
 
147
  NSSDER *encoding
 
148
);
 
149
 
 
150
NSS_EXTERN PRStatus
 
151
nssCertificateStore_AddTrust
 
152
(
 
153
  nssCertificateStore *store,
 
154
  NSSTrust *trust
 
155
);
 
156
 
 
157
NSS_EXTERN NSSTrust *
 
158
nssCertificateStore_FindTrustForCertificate
 
159
(
 
160
  nssCertificateStore *store,
 
161
  NSSCertificate *cert
 
162
);
 
163
 
 
164
NSS_EXTERN PRStatus
 
165
nssCertificateStore_AddSMIMEProfile
 
166
(
 
167
  nssCertificateStore *store,
 
168
  nssSMIMEProfile *profile
 
169
);
 
170
 
 
171
NSS_EXTERN nssSMIMEProfile *
 
172
nssCertificateStore_FindSMIMEProfileForCertificate
 
173
(
 
174
  nssCertificateStore *store,
 
175
  NSSCertificate *cert
 
176
);
 
177
 
 
178
NSS_EXTERN void
 
179
nssCertificateStore_DumpStoreInfo
 
180
(
 
181
  nssCertificateStore *store,
 
182
  void (* cert_dump_iter)(const void *, void *, void *),
 
183
  void *arg
 
184
);
 
185
 
 
186
PR_END_EXTERN_C
 
187
 
 
188
#endif /* PKISTORE_H */