xmlsecurityengine/xmlseccrypto/inc/xmlsecc_x509.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_X509_H__
       
    11 #define __XMLSEC_SYMBIANCRYPTO_X509_H__    
       
    12 
       
    13 #ifdef __cplusplus
       
    14 extern "C" {
       
    15 #endif /* __cplusplus */ 
       
    16 
       
    17 #include "xmlsecc_config.h"
       
    18 #ifndef XMLSEC_NO_X509
       
    19 
       
    20 //#include <openssl/x509.h>
       
    21 
       
    22 #include "xmlsec_xmlsec.h"
       
    23 #include "xmlsec_keys.h"
       
    24 #include "xmlsec_transforms.h"
       
    25 
       
    26 #include "xmlsecc_x509wrapper.h"
       
    27 
       
    28 /**
       
    29  * XMLSEC_STACK_OF_X509:
       
    30  *
       
    31  * Macro. To make docbook happy.
       
    32  */
       
    33 #define XMLSEC_STACK_OF_X509		STACK_OF(X509)
       
    34 
       
    35 /**
       
    36  * XMLSEC_STACK_OF_X509_CRL:
       
    37  *
       
    38  * Macro. To make docbook happy.
       
    39  */
       
    40 #define XMLSEC_STACK_OF_X509_CRL	STACK_OF(X509_CRL)
       
    41 
       
    42 
       
    43 /**
       
    44  * xmlSecSymbianCryptoKeyDataX509Id:
       
    45  * 
       
    46  * The SymbianCrypto X509 data klass.
       
    47  */
       
    48 #define xmlSecSymbianCryptoKeyDataX509Id \
       
    49 	xmlSecSymbianCryptoKeyDataX509GetKlass()
       
    50 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId 	xmlSecSymbianCryptoKeyDataX509GetKlass(void);
       
    51 XMLSEC_CRYPTO_EXPORT X509* 		xmlSecSymbianCryptoKeyDataX509GetKeyCert(xmlSecKeyDataPtr data);
       
    52 XMLSEC_CRYPTO_EXPORT int         xmlSecSymbianCryptoKeyDataX509AdoptKeyCert(xmlSecKeyDataPtr data, 
       
    53                                                                                 X509* cert);
       
    54 
       
    55 XMLSEC_CRYPTO_EXPORT int 		xmlSecSymbianCryptoKeyDataX509AdoptCert(xmlSecKeyDataPtr data,
       
    56 									 X509* cert);
       
    57 XMLSEC_CRYPTO_EXPORT X509* 		xmlSecSymbianCryptoKeyDataX509GetCert	(xmlSecKeyDataPtr data,
       
    58 									 xmlSecSize pos);
       
    59 XMLSEC_CRYPTO_EXPORT xmlSecSize		xmlSecSymbianCryptoKeyDataX509GetCertsSize(xmlSecKeyDataPtr data);
       
    60 
       
    61 XMLSEC_CRYPTO_EXPORT int 		xmlSecSymbianCryptoKeyDataX509AdoptCrl(xmlSecKeyDataPtr data,
       
    62 									 X509_CRL* crl);
       
    63 XMLSEC_CRYPTO_EXPORT X509_CRL*		xmlSecSymbianCryptoKeyDataX509GetCrl	(xmlSecKeyDataPtr data,
       
    64 									 xmlSecSize pos);
       
    65 XMLSEC_CRYPTO_EXPORT xmlSecSize		xmlSecSymbianCryptoKeyDataX509GetCrlsSize(xmlSecKeyDataPtr data);
       
    66 
       
    67 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr	xmlSecSymbianCryptoX509CertGetKey	(X509* cert);
       
    68 
       
    69 /**
       
    70  * xmlSecSymbianCryptoKeyDataRawX509CertId:
       
    71  * 
       
    72  * The SymbianCrypto raw X509 certificate klass.
       
    73  */
       
    74 #define xmlSecSymbianCryptoKeyDataRawX509CertId \
       
    75 	xmlSecSymbianCryptoKeyDataRawX509CertGetKlass()
       
    76 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId 	xmlSecSymbianCryptoKeyDataRawX509CertGetKlass(void);
       
    77 
       
    78 /**
       
    79  * xmlSecSymbianCryptoX509StoreId:
       
    80  * 
       
    81  * The SymbianCrypto X509 store klass.
       
    82  */
       
    83 #define xmlSecSymbianCryptoX509StoreId \
       
    84 	xmlSecSymbianCryptoX509StoreGetKlass()
       
    85 XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecSymbianCryptoX509StoreGetKlass(void);
       
    86 XMLSEC_CRYPTO_EXPORT X509* 		xmlSecSymbianCryptoX509StoreFindCert	(xmlSecKeyDataStorePtr store,
       
    87 									 xmlChar *subjectName,
       
    88 									 xmlChar *issuerName, 
       
    89 									 xmlChar *issuerSerial,
       
    90 									 xmlChar *ski,
       
    91 									 xmlSecKeyInfoCtx* keyInfoCtx);
       
    92 XMLSEC_CRYPTO_EXPORT int 		xmlSecSymbianCryptoX509StoreKeyCertVerify(xmlSecKeyDataStorePtr store, 
       
    93 									 X509* cert);									 
       
    94 XMLSEC_CRYPTO_EXPORT X509* 		xmlSecSymbianCryptoX509StoreVerify	(xmlSecKeyDataStorePtr store,
       
    95 									 XMLSEC_STACK_OF_X509* certs,
       
    96 									 XMLSEC_STACK_OF_X509_CRL* crls,
       
    97 									 xmlSecKeyInfoCtx* keyInfoCtx);
       
    98 XMLSEC_CRYPTO_EXPORT int		xmlSecSymbianCryptoX509StoreAdoptCert	(xmlSecKeyDataStorePtr store,
       
    99 									 X509* cert,
       
   100 									 xmlSecKeyDataType type);
       
   101 XMLSEC_CRYPTO_EXPORT int		xmlSecSymbianCryptoX509StoreAddCertsPath(xmlSecKeyDataStorePtr store,
       
   102 									 const char* path);
       
   103 									 
       
   104 
       
   105 
       
   106 XMLSEC_CRYPTO_EXPORT void xmlSecSetCertStoreFlag();
       
   107 XMLSEC_CRYPTO_EXPORT void xmlSecResetCertStoreFlag();	
       
   108 XMLSEC_CRYPTO_EXPORT int xmlSecCheckCertStoreFlag();								 
       
   109 									 
       
   110 #endif /* XMLSEC_NO_X509 */
       
   111 
       
   112 #ifdef __cplusplus
       
   113 }
       
   114 #endif /* __cplusplus */
       
   115 
       
   116 #endif /* __XMLSEC_XMLSEC_SYMBIANCRYPTO_X509_H__ */