Git init
[external/xmlsec1.git] / include / xmlsec / nss / x509.h
1 /** 
2  * XMLSec library
3  *
4  * This is free software; see Copyright file in the source
5  * distribution for preciese wording.
6  * 
7  * Copyright (c) 2003 America Online, Inc.  All rights reserved.
8  */
9 #ifndef __XMLSEC_NSS_X509_H__
10 #define __XMLSEC_NSS_X509_H__    
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif /* __cplusplus */ 
15
16 #ifndef XMLSEC_NO_X509
17
18 #include <nspr.h>
19 #include <nss.h>
20 #include <cert.h>
21
22 #include <xmlsec/xmlsec.h>
23 #include <xmlsec/keys.h>
24 #include <xmlsec/transforms.h>
25
26 /**
27  * xmlSecNssKeyDataX509Id:
28  * 
29  * The NSS X509 data klass.
30  */
31 #define xmlSecNssKeyDataX509Id \
32         xmlSecNssKeyDataX509GetKlass()
33 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId    xmlSecNssKeyDataX509GetKlass(void);
34
35 XMLSEC_CRYPTO_EXPORT CERTCertificate*   xmlSecNssKeyDataX509GetKeyCert(xmlSecKeyDataPtr data);
36 XMLSEC_CRYPTO_EXPORT int                xmlSecNssKeyDataX509AdoptKeyCert(xmlSecKeyDataPtr data, 
37                                                                          CERTCertificate* cert);
38
39 XMLSEC_CRYPTO_EXPORT int                xmlSecNssKeyDataX509AdoptCert(xmlSecKeyDataPtr data,
40                                                                          CERTCertificate* cert);
41 XMLSEC_CRYPTO_EXPORT CERTCertificate*   xmlSecNssKeyDataX509GetCert     (xmlSecKeyDataPtr data,
42                                                                          xmlSecSize pos);
43 XMLSEC_CRYPTO_EXPORT xmlSecSize         xmlSecNssKeyDataX509GetCertsSize(xmlSecKeyDataPtr data);
44
45 XMLSEC_CRYPTO_EXPORT int                xmlSecNssKeyDataX509AdoptCrl(xmlSecKeyDataPtr data,
46                                                                          CERTSignedCrl* crl);
47 XMLSEC_CRYPTO_EXPORT CERTSignedCrl*     xmlSecNssKeyDataX509GetCrl      (xmlSecKeyDataPtr data,
48                                                                          xmlSecSize pos);
49 XMLSEC_CRYPTO_EXPORT xmlSecSize         xmlSecNssKeyDataX509GetCrlsSize(xmlSecKeyDataPtr data);
50 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr   xmlSecNssX509CertGetKey         (CERTCertificate* cert);
51
52
53 /**
54  * xmlSecNssKeyDataRawX509CertId:
55  * 
56  * The NSS raw X509 certificate klass.
57  */
58 #define xmlSecNssKeyDataRawX509CertId \
59         xmlSecNssKeyDataRawX509CertGetKlass()
60 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId    xmlSecNssKeyDataRawX509CertGetKlass(void);
61
62 /**
63  * xmlSecNssX509StoreId:
64  * 
65  * The NSS X509 store klass.
66  */
67 #define xmlSecNssX509StoreId \
68         xmlSecNssX509StoreGetKlass()
69 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecNssX509StoreGetKlass(void);
70 XMLSEC_CRYPTO_EXPORT CERTCertificate*           xmlSecNssX509StoreFindCert      (xmlSecKeyDataStorePtr store,
71                                                                                  xmlChar *subjectName,
72                                                                                  xmlChar *issuerName, 
73                                                                                  xmlChar *issuerSerial,
74                                                                                  xmlChar *ski,
75                                                                                  xmlSecKeyInfoCtx* keyInfoCtx);
76
77 XMLSEC_CRYPTO_EXPORT CERTCertificate*           xmlSecNssX509StoreVerify        (xmlSecKeyDataStorePtr store,
78                                                                                  CERTCertList* certs,
79                                                                                  xmlSecKeyInfoCtx* keyInfoCtx);
80 XMLSEC_CRYPTO_EXPORT int                        xmlSecNssX509StoreAdoptCert (xmlSecKeyDataStorePtr store,
81                                                                              CERTCertificate* cert,
82                                                                              xmlSecKeyDataType type);
83
84
85 #endif /* XMLSEC_NO_X509 */
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90
91 #endif /* __XMLSEC_NSS_X509_H__ */