Back to index

lightning-sunbird  0.9+nobinonly
pki.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Netscape security libraries.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corporation.
00018  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 #ifndef PKI_H
00038 #define PKI_H
00039 
00040 #ifdef DEBUG
00041 static const char PKI_CVS_ID[] = "@(#) $RCSfile: pki.h,v $ $Revision: 1.13 $ $Date: 2005/01/20 02:25:49 $";
00042 #endif /* DEBUG */
00043 
00044 #ifndef NSSDEVT_H
00045 #include "nssdevt.h"
00046 #endif /* NSSDEVT_H */
00047 
00048 #ifndef NSSPKI_H
00049 #include "nsspki.h"
00050 #endif /* NSSPKI_H */
00051 
00052 #ifndef PKIT_H
00053 #include "pkit.h"
00054 #endif /* PKIT_H */
00055 
00056 PR_BEGIN_EXTERN_C
00057 
00058 NSS_EXTERN NSSCallback *
00059 nssTrustDomain_GetDefaultCallback
00060 (
00061   NSSTrustDomain *td,
00062   PRStatus *statusOpt
00063 );
00064 
00065 NSS_EXTERN NSSCertificate **
00066 nssTrustDomain_FindCertificatesBySubject
00067 (
00068   NSSTrustDomain *td,
00069   NSSDER *subject,
00070   NSSCertificate *rvOpt[],
00071   PRUint32 maximumOpt,
00072   NSSArena *arenaOpt
00073 );
00074 
00075 NSS_EXTERN NSSTrust *
00076 nssTrustDomain_FindTrustForCertificate
00077 (
00078   NSSTrustDomain *td,
00079   NSSCertificate *c
00080 );
00081 
00082 NSS_EXTERN NSSCertificate *
00083 nssCertificate_AddRef
00084 (
00085   NSSCertificate *c
00086 );
00087 
00088 NSS_EXTERN PRStatus
00089 nssCertificate_Destroy
00090 (
00091   NSSCertificate *c
00092 );
00093 
00094 NSS_EXTERN NSSDER *
00095 nssCertificate_GetEncoding
00096 (
00097   NSSCertificate *c
00098 );
00099 
00100 NSS_EXTERN NSSDER *
00101 nssCertificate_GetIssuer
00102 (
00103   NSSCertificate *c
00104 );
00105 
00106 NSS_EXTERN NSSDER *
00107 nssCertificate_GetSerialNumber
00108 (
00109   NSSCertificate *c
00110 );
00111 
00112 NSS_EXTERN NSSDER *
00113 nssCertificate_GetSubject
00114 (
00115   NSSCertificate *c
00116 );
00117 
00118 NSS_EXTERN NSSUTF8 *
00119 nssCertificate_GetNickname
00120 (
00121   NSSCertificate *c,
00122   NSSToken *tokenOpt
00123 );
00124 
00125 NSS_EXTERN NSSASCII7 *
00126 nssCertificate_GetEmailAddress
00127 (
00128   NSSCertificate *c
00129 );
00130 
00131 NSS_EXTERN PRBool
00132 nssCertificate_IssuerAndSerialEqual
00133 (
00134   NSSCertificate *c1,
00135   NSSCertificate *c2
00136 );
00137 
00138 NSS_EXTERN NSSPrivateKey *
00139 nssPrivateKey_AddRef
00140 (
00141   NSSPrivateKey *vk
00142 );
00143 
00144 NSS_EXTERN PRStatus
00145 nssPrivateKey_Destroy
00146 (
00147   NSSPrivateKey *vk
00148 );
00149 
00150 NSS_EXTERN NSSItem *
00151 nssPrivateKey_GetID
00152 (
00153   NSSPrivateKey *vk
00154 );
00155 
00156 NSS_EXTERN NSSUTF8 *
00157 nssPrivateKey_GetNickname
00158 (
00159   NSSPrivateKey *vk,
00160   NSSToken *tokenOpt
00161 );
00162 
00163 NSS_EXTERN PRStatus
00164 nssPublicKey_Destroy
00165 (
00166   NSSPublicKey *bk
00167 );
00168 
00169 NSS_EXTERN NSSItem *
00170 nssPublicKey_GetID
00171 (
00172   NSSPublicKey *vk
00173 );
00174 
00175 NSS_EXTERN NSSCertificate **
00176 nssCryptoContext_FindCertificatesBySubject
00177 (
00178   NSSCryptoContext *cc,
00179   NSSDER *subject,
00180   NSSCertificate *rvOpt[],
00181   PRUint32 maximumOpt, /* 0 for no max */
00182   NSSArena *arenaOpt
00183 );
00184 
00185 /* putting here for now, needs more thought */
00186 NSS_EXTERN PRStatus
00187 nssCryptoContext_ImportTrust
00188 (
00189   NSSCryptoContext *cc,
00190   NSSTrust *trust
00191 );
00192 
00193 NSS_EXTERN NSSTrust *
00194 nssCryptoContext_FindTrustForCertificate
00195 (
00196   NSSCryptoContext *cc,
00197   NSSCertificate *cert
00198 );
00199 
00200 NSS_EXTERN PRStatus
00201 nssCryptoContext_ImportSMIMEProfile
00202 (
00203   NSSCryptoContext *cc,
00204   nssSMIMEProfile *profile
00205 );
00206 
00207 NSS_EXTERN nssSMIMEProfile *
00208 nssCryptoContext_FindSMIMEProfileForCertificate
00209 (
00210   NSSCryptoContext *cc,
00211   NSSCertificate *cert
00212 );
00213 
00214 NSS_EXTERN NSSTrust *
00215 nssTrust_AddRef
00216 (
00217   NSSTrust *trust
00218 );
00219 
00220 NSS_EXTERN PRStatus
00221 nssTrust_Destroy
00222 (
00223   NSSTrust *trust
00224 );
00225 
00226 NSS_EXTERN nssSMIMEProfile *
00227 nssSMIMEProfile_AddRef
00228 (
00229   nssSMIMEProfile *profile
00230 );
00231 
00232 NSS_EXTERN PRStatus
00233 nssSMIMEProfile_Destroy
00234 (
00235   nssSMIMEProfile *profile
00236 );
00237 
00238 NSS_EXTERN nssSMIMEProfile *
00239 nssSMIMEProfile_Create
00240 (
00241   NSSCertificate *cert,
00242   NSSItem *profileTime,
00243   NSSItem *profileData
00244 );
00245 
00246 PR_END_EXTERN_C
00247 
00248 #endif /* PKI_H */