4 * This is free software; see Copyright file in the source
5 * distribution for preciese wording.
7 * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
9 #ifndef __XMLSEC_OPENSSL_APP_H__
10 #define __XMLSEC_OPENSSL_APP_H__
14 #endif /* __cplusplus */
16 #include <openssl/pem.h>
17 #include <openssl/bio.h>
19 #include <xmlsec/xmlsec.h>
20 #include <xmlsec/keys.h>
21 #include <xmlsec/keysmngr.h>
22 #include <xmlsec/transforms.h>
27 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppInit (const char* config);
28 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppShutdown (void);
33 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppDefaultKeysMngrInit(xmlSecKeysMngrPtr mngr);
34 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppDefaultKeysMngrAdoptKey(xmlSecKeysMngrPtr mngr,
36 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppDefaultKeysMngrLoad(xmlSecKeysMngrPtr mngr,
38 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppDefaultKeysMngrSave(xmlSecKeysMngrPtr mngr,
40 xmlSecKeyDataType type);
41 #ifndef XMLSEC_NO_X509
42 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrCertLoad(xmlSecKeysMngrPtr mngr,
44 xmlSecKeyDataFormat format,
45 xmlSecKeyDataType type);
46 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrCertLoadMemory(xmlSecKeysMngrPtr mngr,
47 const xmlSecByte* data,
49 xmlSecKeyDataFormat format,
50 xmlSecKeyDataType type);
51 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrCertLoadBIO(xmlSecKeysMngrPtr mngr,
53 xmlSecKeyDataFormat format,
54 xmlSecKeyDataType type);
56 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrAddCertsPath(xmlSecKeysMngrPtr mngr,
58 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrAddCertsFile(xmlSecKeysMngrPtr mngr,
61 #endif /* XMLSEC_NO_X509 */
67 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppKeyLoad (const char *filename,
68 xmlSecKeyDataFormat format,
71 void* pwdCallbackCtx);
72 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppKeyLoadMemory (const xmlSecByte* data,
74 xmlSecKeyDataFormat format,
77 void* pwdCallbackCtx);
78 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppKeyLoadBIO (BIO* bio,
79 xmlSecKeyDataFormat format,
82 void* pwdCallbackCtx);
84 #ifndef XMLSEC_NO_X509
85 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppPkcs12Load (const char* filename,
88 void* pwdCallbackCtx);
89 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppPkcs12LoadMemory(const xmlSecByte* data,
93 void* pwdCallbackCtx);
94 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppPkcs12LoadBIO (BIO* bio,
97 void* pwdCallbackCtx);
99 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeyCertLoad (xmlSecKeyPtr key,
100 const char* filename,
101 xmlSecKeyDataFormat format);
102 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeyCertLoadMemory(xmlSecKeyPtr key,
103 const xmlSecByte* data,
105 xmlSecKeyDataFormat format);
106 XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeyCertLoadBIO (xmlSecKeyPtr key,
108 xmlSecKeyDataFormat format);
109 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppKeyFromCertLoadBIO(BIO* bio,
110 xmlSecKeyDataFormat format);
111 #endif /* XMLSEC_NO_X509 */
113 XMLSEC_CRYPTO_EXPORT void* xmlSecOpenSSLAppGetDefaultPwdCallback(void);
118 #endif /* __cplusplus */
120 #endif /* __XMLSEC_OPENSSL_APP_H__ */