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>
8 * Copyright (c) 2003 America Online, Inc. All rights reserved.
10 #ifndef __XMLSEC_NSS_APP_H__
11 #define __XMLSEC_NSS_APP_H__
15 #endif /* __cplusplus */
20 #include <xmlsec/xmlsec.h>
21 #include <xmlsec/keys.h>
22 #include <xmlsec/keysmngr.h>
23 #include <xmlsec/transforms.h>
28 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppInit (const char* config);
29 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppShutdown (void);
34 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppDefaultKeysMngrInit (xmlSecKeysMngrPtr mngr);
35 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppDefaultKeysMngrAdoptKey(xmlSecKeysMngrPtr mngr,
37 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppDefaultKeysMngrLoad (xmlSecKeysMngrPtr mngr,
39 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppDefaultKeysMngrSave (xmlSecKeysMngrPtr mngr,
41 xmlSecKeyDataType type);
42 #ifndef XMLSEC_NO_X509
43 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
45 xmlSecKeyDataFormat format,
46 xmlSecKeyDataType type);
47 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeysMngrCertLoadMemory(xmlSecKeysMngrPtr mngr,
48 const xmlSecByte *data,
50 xmlSecKeyDataFormat format,
51 xmlSecKeyDataType type);
52 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeysMngrCertLoadSECItem(xmlSecKeysMngrPtr mngr,
54 xmlSecKeyDataFormat format,
55 xmlSecKeyDataType type);
56 #endif /* XMLSEC_NO_X509 */
62 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppKeyLoad (const char *filename,
63 xmlSecKeyDataFormat format,
66 void* pwdCallbackCtx);
67 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppKeyLoadMemory (const xmlSecByte *data,
69 xmlSecKeyDataFormat format,
72 void* pwdCallbackCtx);
73 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppKeyLoadSECItem (SECItem* secItem,
74 xmlSecKeyDataFormat format,
77 void* pwdCallbackCtx);
78 #ifndef XMLSEC_NO_X509
79 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppPkcs12Load (const char *filename,
82 void* pwdCallbackCtx);
83 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppPkcs12LoadMemory (const xmlSecByte *data,
87 void* pwdCallbackCtx);
88 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppPkcs12LoadSECItem (SECItem* secItem,
91 void* pwdCallbackCtx);
92 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeyCertLoad (xmlSecKeyPtr key,
94 xmlSecKeyDataFormat format);
95 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeyCertLoadMemory (xmlSecKeyPtr key,
96 const xmlSecByte *data,
98 xmlSecKeyDataFormat format);
99 XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeyCertLoadSECItem (xmlSecKeyPtr key,
101 xmlSecKeyDataFormat format);
102 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppKeyFromCertLoadSECItem(SECItem* secItem,
103 xmlSecKeyDataFormat format);
104 #endif /* XMLSEC_NO_X509 */
105 XMLSEC_CRYPTO_EXPORT void* xmlSecNssAppGetDefaultPwdCallback(void);
109 #endif /* __cplusplus */
111 #endif /* __XMLSEC_NSS_APP_H__ */