4 * This is free software; see Copyright file in the source
5 * distribution for preciese wording.
7 * Copyrigth (C) 2003 Cordys R&D BV, All rights reserved.
9 #ifndef __XMLSEC_MSCRYPTO_APP_H__
10 #define __XMLSEC_MSCRYPTO_APP_H__
14 #endif /* __cplusplus */
16 #include <xmlsec/xmlsec.h>
17 #include <xmlsec/keys.h>
18 #include <xmlsec/keysmngr.h>
19 #include <xmlsec/transforms.h>
27 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppInit (const char* config);
28 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppShutdown (void);
29 XMLSEC_CRYPTO_EXPORT const char*xmlSecMSCryptoAppGetCertStoreName (void);
34 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrInit(
35 xmlSecKeysMngrPtr mngr);
36 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrAdoptKey(
37 xmlSecKeysMngrPtr mngr,
39 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrLoad(
40 xmlSecKeysMngrPtr mngr,
42 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrSave(
43 xmlSecKeysMngrPtr mngr,
45 xmlSecKeyDataType type);
46 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrPrivateKeyLoad(
\r
47 xmlSecKeysMngrPtr mngr,
\r
49 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrPublicKeyLoad(
\r
50 xmlSecKeysMngrPtr mngr,
\r
52 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrSymKeyLoad(
\r
53 xmlSecKeysMngrPtr mngr,
\r
55 #ifndef XMLSEC_NO_X509
56 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrAdoptKeyStore(
\r
57 xmlSecKeysMngrPtr mngr,
\r
58 HCERTSTORE keyStore);
\r
60 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrAdoptTrustedStore(
\r
61 xmlSecKeysMngrPtr mngr,
\r
62 HCERTSTORE trustedStore);
\r
64 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrAdoptUntrustedStore(
\r
65 xmlSecKeysMngrPtr mngr,
\r
66 HCERTSTORE untrustedStore);
\r
68 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppKeysMngrCertLoad(
69 xmlSecKeysMngrPtr mngr,
71 xmlSecKeyDataFormat format,
72 xmlSecKeyDataType type);
73 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppKeysMngrCertLoadMemory(
74 xmlSecKeysMngrPtr mngr,
75 const xmlSecByte* data,
77 xmlSecKeyDataFormat format,
78 xmlSecKeyDataType type);
80 #endif /* XMLSEC_NO_X509 */
86 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecMSCryptoAppKeyLoad (const char *filename,
87 xmlSecKeyDataFormat format,
90 void* pwdCallbackCtx);
91 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecMSCryptoAppKeyLoadMemory (const xmlSecByte* data,
93 xmlSecKeyDataFormat format,
96 void* pwdCallbackCtx);
97 #ifndef XMLSEC_NO_X509
98 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecMSCryptoAppPkcs12Load (const char *filename,
101 void* pwdCallbackCtx);
102 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecMSCryptoAppPkcs12LoadMemory (const xmlSecByte* data,
106 void* pwdCallbackCtx);
107 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppKeyCertLoad (xmlSecKeyPtr key,
108 const char* filename,
109 xmlSecKeyDataFormat format);
110 XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppKeyCertLoadMemory (xmlSecKeyPtr key,
111 const xmlSecByte* data,
113 xmlSecKeyDataFormat format);
114 #endif /* XMLSEC_NO_X509 */
115 XMLSEC_CRYPTO_EXPORT void* xmlSecMSCryptoAppGetDefaultPwdCallback (void);
119 #endif /* __cplusplus */
121 #endif /* __XMLSEC_MSCRYPTO_APP_H__ */