Git init
[external/xmlsec1.git] / include / xmlsec / skeleton / app.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) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
8  */
9 #ifndef __XMLSEC_SKELETON_APP_H__
10 #define __XMLSEC_SKELETON_APP_H__    
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif /* __cplusplus */ 
15
16 #include <xmlsec/xmlsec.h>
17 #include <xmlsec/keys.h>
18 #include <xmlsec/keysmngr.h>
19 #include <xmlsec/transforms.h>
20
21 /**
22  * Init/shutdown
23  */
24 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppInit                   (const char* config);
25 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppShutdown               (void);
26
27 /** 
28  * Keys Manager
29  */
30 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppDefaultKeysMngrInit    (xmlSecKeysMngrPtr mngr);
31 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppDefaultKeysMngrAdoptKey(xmlSecKeysMngrPtr mngr,
32                                                                          xmlSecKeyPtr key);
33 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppDefaultKeysMngrLoad    (xmlSecKeysMngrPtr mngr,
34                                                                          const char* uri);
35 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppDefaultKeysMngrSave    (xmlSecKeysMngrPtr mngr,
36                                                                          const char* filename,
37                                                                          xmlSecKeyDataType type);
38 #ifndef XMLSEC_NO_X509
39 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppKeysMngrCertLoad       (xmlSecKeysMngrPtr mngr, 
40                                                                          const char *filename, 
41                                                                          xmlSecKeyDataFormat format, 
42                                                                          xmlSecKeyDataType type);
43 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppKeysMngrCertLoadMemory (xmlSecKeysMngrPtr mngr, 
44                                                                          const xmlSecByte *data, 
45                                                                          xmlSecSize dataSize,
46                                                                          xmlSecKeyDataFormat format, 
47                                                                          xmlSecKeyDataType type);
48 #endif /* XMLSEC_NO_X509 */
49
50
51 /** 
52  * Keys
53  */
54 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSkeletonAppKeyLoad              (const char *filename, 
55                                                                          xmlSecKeyDataFormat format,
56                                                                          const char *pwd,
57                                                                          void *pwdCallback,
58                                                                          void* pwdCallbackCtx);
59 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSkeletonAppKeyLoadMemory        (const xmlSecByte *data, 
60                                                                          xmlSecSize dataSize,
61                                                                          xmlSecKeyDataFormat format,
62                                                                          const char *pwd,
63                                                                          void *pwdCallback,
64                                                                          void* pwdCallbackCtx);
65 #ifndef XMLSEC_NO_X509
66 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSkeletonAppPkcs12Load           (const char *filename, 
67                                                                          const char *pwd,
68                                                                          void* pwdCallback, 
69                                                                          void* pwdCallbackCtx);
70 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSkeletonAppPkcs12LoadMemory     (const xmlSecByte *data, 
71                                                                          xmlSecSize dataSize,
72                                                                          const char *pwd,
73                                                                          void* pwdCallback, 
74                                                                          void* pwdCallbackCtx);
75 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppKeyCertLoad            (xmlSecKeyPtr key,
76                                                                          const char* filename,
77                                                                          xmlSecKeyDataFormat format);
78 XMLSEC_CRYPTO_EXPORT int        xmlSecSkeletonAppKeyCertLoadMemory      (xmlSecKeyPtr key,
79                                                                          const xmlSecByte *data, 
80                                                                          xmlSecSize dataSize,
81                                                                          xmlSecKeyDataFormat format);
82 #endif /* XMLSEC_NO_X509 */
83
84 XMLSEC_CRYPTO_EXPORT void*      xmlSecSkeletonAppGetDefaultPwdCallback  (void);
85
86 #ifdef __cplusplus
87 }
88 #endif /* __cplusplus */
89
90 #endif /* __XMLSEC_SKELETON_APP_H__ */
91