summaryrefslogtreecommitdiff
path: root/apps/crypto.h
blob: 1ce2c3e9e15181c98e653dadc0f53b69adfe9b6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/** 
 * XMLSec library
 *
 *
 * See Copyright for the status of this software.
 * 
 * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
 */
#ifndef __XMLSEC_APPS_CRYPTO_H__
#define __XMLSEC_APPS_CRYPTO_H__    

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */ 

#include <libxml/tree.h>
#include <xmlsec/xmlsec.h>
#include <xmlsec/keys.h>
#include <xmlsec/keyinfo.h>
#include <xmlsec/keysmngr.h>
#include <xmlsec/crypto.h>

int	xmlSecAppCryptoInit					(const char* config);
int	xmlSecAppCryptoShutdown					(void);

xmlSecKeyPtr xmlSecAppCryptoKeyGenerate				(const char* keyKlassAndSize,
								 const char* name,
								 xmlSecKeyDataType type);

/*****************************************************************************
 *
 * Simple keys manager
 *
 ****************************************************************************/
int	xmlSecAppCryptoSimpleKeysMngrInit			(xmlSecKeysMngrPtr mngr);
int	xmlSecAppCryptoSimpleKeysMngrLoad			(xmlSecKeysMngrPtr mngr, 
								 const char *filename);
int	xmlSecAppCryptoSimpleKeysMngrSave			(xmlSecKeysMngrPtr mngr, 
								 const char *filename,
								 xmlSecKeyDataType type);
int 	xmlSecAppCryptoSimpleKeysMngrCertLoad			(xmlSecKeysMngrPtr mngr, 
								 const char *filename, 
								 xmlSecKeyDataFormat format,
								 xmlSecKeyDataType type);
int 	xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad		(xmlSecKeysMngrPtr mngr, 
								 const char *files, 
								 const char* pwd, 
								 const char* name,
								 xmlSecKeyDataFormat format);
int 	xmlSecAppCryptoSimpleKeysMngrPkcs12KeyLoad		(xmlSecKeysMngrPtr mngr, 
								 const char *filename, 
								 const char* pwd, 
								 const char *name);
int 	xmlSecAppCryptoSimpleKeysMngrBinaryKeyLoad		(xmlSecKeysMngrPtr mngr, 
								 const char* keyKlass, 
								 const char* filename, 
								 const char *name);
int	xmlSecAppCryptoSimpleKeysMngrKeyGenerate		(xmlSecKeysMngrPtr mngr, 
								 const char* keyKlassAndSize,
								 const char* name);


#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __XMLSEC_APPS_CRYPTO_H__ */