xmlsecurityengine/xmlseccrypto/inc/xmlsecc_app.h
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     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  * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
       
     9  */
       
    10 #ifndef __XMLSEC_SYMBIANCRYPTO_APP_H__
       
    11 #define __XMLSEC_SYMBIANCRYPTO_APP_H__    
       
    12 
       
    13 #ifdef __cplusplus
       
    14 extern "C" {
       
    15 #endif /* __cplusplus */ 
       
    16 #include "xmlsecc_config.h"
       
    17 #include "xmlsec_xmlsec.h"
       
    18 #include "xmlsec_keys.h"
       
    19 #include "xmlsec_keysmngr.h"
       
    20 #include "xmlsec_transforms.h"
       
    21 
       
    22 #include "xmlsecc_bio.h"
       
    23 
       
    24 /**
       
    25  * Init/shutdown
       
    26  */
       
    27 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppInit			(const char* config);
       
    28 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppShutdown			(void);
       
    29 
       
    30 /** 
       
    31  * Keys Manager
       
    32  */
       
    33 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppDefaultKeysMngrInit	(xmlSecKeysMngrPtr mngr);
       
    34 XMLSEC_CRYPTO_EXPORT int 	xmlSecSymbianCryptoAppDefaultKeysMngrAdoptKey	(xmlSecKeysMngrPtr mngr,
       
    35 									 xmlSecKeyPtr key);
       
    36 XMLSEC_CRYPTO_EXPORT int 	xmlSecSymbianCryptoAppDefaultKeysMngrLoad	(xmlSecKeysMngrPtr mngr,
       
    37 									 const char* uri);
       
    38 XMLSEC_CRYPTO_EXPORT int 	xmlSecSymbianCryptoAppDefaultKeysMngrSave	(xmlSecKeysMngrPtr mngr,
       
    39 									 const char* filename,
       
    40 									 xmlSecKeyDataType type);
       
    41 #ifndef XMLSEC_NO_X509
       
    42 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppKeysMngrCertLoad		(xmlSecKeysMngrPtr mngr, 
       
    43 									 const char *filename, 
       
    44 									 xmlSecKeyDataFormat format, 
       
    45 									 xmlSecKeyDataType type);
       
    46 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppKeysMngrCertLoadMemory	(xmlSecKeysMngrPtr mngr,
       
    47 									 const xmlSecByte* data,
       
    48 									 xmlSecSize dataSize,
       
    49 									 xmlSecKeyDataFormat format,
       
    50 									 xmlSecKeyDataType type);
       
    51 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppKeysMngrCertLoadBIO (xmlSecKeysMngrPtr mngr, 
       
    52                                                                     BIO* bio, 
       
    53                                                                     xmlSecKeyDataFormat format,
       
    54                                                                     xmlSecKeyDataType type);									 
       
    55 #endif /* XMLSEC_NO_X509 */
       
    56 
       
    57 
       
    58 /** 
       
    59  * Keys
       
    60  */
       
    61 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSymbianCryptoAppKeyLoadWithName		(const char *filename, 
       
    62 									 xmlSecKeyDataFormat format,
       
    63 									 const char *keyname,
       
    64 									 const char *pwd,
       
    65 									 void *pwdCallback,
       
    66 									 void* pwdCallbackCtx);									 
       
    67 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSymbianCryptoAppKeyLoadMemoryWithName (
       
    68                                                             const xmlSecByte* data,
       
    69 									 xmlSecSize dataSize,
       
    70 									 xmlSecKeyDataFormat format,
       
    71 									 const char *keyname,
       
    72 									 const char *pwd,
       
    73 									 void* pwdCallback,
       
    74 									 void* pwdCallbackCtx);		
       
    75 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSymbianCryptoAppKeyLoadBIO		(BIO* bio, 
       
    76 									 xmlSecKeyDataFormat format,
       
    77 									 const char *pwd,
       
    78 									 void* pwdCallback,
       
    79 									 void* pwdCallbackCtx);											 						 
       
    80 #ifndef XMLSEC_NO_X509
       
    81 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSymbianCryptoAppPkcs12Load		(const char *filename, 
       
    82 									 const char *pwd,
       
    83 		    							 void* pwdCallback, 
       
    84 									 void* pwdCallbackCtx);
       
    85 XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSymbianCryptoAppPkcs12LoadMemory	(const xmlSecByte* data,
       
    86 									 xmlSecSize dataSize,
       
    87 									 const char *pwd,
       
    88 									 void* pwdCallback,
       
    89 									 void* pwdCallbackCtx);
       
    90 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppKeyCertLoad		(xmlSecKeyPtr key,
       
    91 									 const char* filename,
       
    92 									 xmlSecKeyDataFormat format);
       
    93 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppKeyCertLoadMemory	(xmlSecKeyPtr key,
       
    94 									 const xmlSecByte* data,
       
    95 									 xmlSecSize dataSize,
       
    96 									 xmlSecKeyDataFormat format);
       
    97 XMLSEC_CRYPTO_EXPORT int	xmlSecSymbianCryptoAppKeyCertLoadBIO		(xmlSecKeyPtr key,
       
    98 									 BIO* bio,
       
    99 									 xmlSecKeyDataFormat format);
       
   100 #endif /* XMLSEC_NO_X509 */
       
   101 XMLSEC_CRYPTO_EXPORT void*	xmlSecSymbianCryptoAppGetDefaultPwdCallback	(void);
       
   102 
       
   103 #ifdef __cplusplus
       
   104 }
       
   105 #endif /* __cplusplus */
       
   106 
       
   107 #endif /* __XMLSEC_SYMBIANCRYPTO_APP_H__ */
       
   108