00001 #ifndef __ARC_XMLSEC_H__
00002 #define __ARC_XMLSEC_H__
00003
00004 #include <string>
00005
00006 #include <arc/XMLNode.h>
00007
00008 namespace Arc {
00010
00012 class XMLSecNode: public XMLNode {
00013 public:
00014 typedef enum {
00015 RSA_SHA1,
00016 DSA_SHA1
00017 } SignatureMethod;
00018 typedef enum {
00019 TRIPLEDES,
00020 AES_128,
00021 AES_256,
00022 DEFAULT
00023 } SymEncryptionType;
00025 XMLSecNode(XMLNode& node);
00026 ~XMLSecNode(void);
00032 void AddSignatureTemplate(const std::string& id_name, const SignatureMethod sign_method,
00033 const std::string& incl_namespaces = "");
00041 bool SignNode(const std::string& privkey_file, const std::string& cert_file);
00048 bool VerifyNode(const std::string& id_name, const std::string& ca_file, const std::string& ca_path,
00049 bool verify_trusted = true);
00057 bool EncryptNode(const std::string& cert_file, const SymEncryptionType encrpt_type);
00064 bool DecryptNode(const std::string& privkey_file, XMLNode& decrypted_node);
00065 };
00066
00067 }
00068
00069 #endif
00070