LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
logicalaccess::IKSStorage Class Reference

#include <IKSStorage.hpp>

Inheritance diagram for logicalaccess::IKSStorage:
logicalaccess::KeyStorage logicalaccess::XmlSerializable

Public Member Functions

 IKSStorage (const std::string &key_identity)
 
 IKSStorage ()
 
virtual ~IKSStorage ()=default
 
KeyStorageType getType () const override
 Get the key storage type.
 
void serialize (boost::property_tree::ptree &parentNode) override
 Serialize object to Xml Node.
 
void unSerialize (boost::property_tree::ptree &node) override
 UnSerialize object from a Xml Node.
 
std::string getDefaultXmlNodeName () const override
 Get the default Xml Node name for this object.
 
const std::string & getKeyIdentity () const
 
void setKeyIdentity (const std::string &idt)
 
void setSerializeIKSConfig (bool v)
 
bool getSerializeIKSConfig () const
 
void setIKSConfig (const std::string &ip, uint16_t port, const std::string &client_cert, const std::string &client_key, const std::string &root_ca)
 
const iks::IslogKeyServer::IKSConfiggetIKSConfig () const
 
- Public Member Functions inherited from logicalaccess::KeyStorage
virtual ~KeyStorage ()=default
 
virtual KeyStorageType getType () const =0
 Get the key storage type.
 
void serialize (boost::property_tree::ptree &parentNode) override
 Serialize object to Xml Node.
 
void unSerialize (boost::property_tree::ptree &node) override
 UnSerialize object from a Xml Node.
 
std::string getMetadata (const std::string &key)
 
bool hasMetadata (const std::string &key) const
 
void addMetadata (const std::string &key, const std::string &value)
 
virtual std::string serialize ()
 Serialize object to Xml Node string.
 
virtual void serialize (boost::property_tree::ptree &parentNode)=0
 Serialize object to Xml Node.
 
virtual void unSerialize (boost::property_tree::ptree &node)=0
 UnSerialize object from a Xml Node.
 
virtual void unSerialize (const std::string &xmlstring, const std::string &rootNode)
 UnSerialize object from a Xml Node string.
 
virtual void unSerialize (std::istream &is, const std::string &rootNode)
 UnSerialize object from a Xml node.
 
virtual void unSerialize (boost::property_tree::ptree &node, const std::string &rootNode)
 UnSerialize object from a Xml node.
 
- Public Member Functions inherited from logicalaccess::XmlSerializable
virtual ~XmlSerializable ()=default
 
virtual std::string serialize ()
 Serialize object to Xml Node string.
 
virtual std::string serializeWithHeaders ()
 Serialize object to Xml Node string, with xml headers.
 
virtual void serialize (boost::property_tree::ptree &parentNode)=0
 Serialize object to Xml Node.
 
virtual void serializeToFile (const std::string &filename)
 Serialize object to a Xml file.
 
virtual void unSerialize (boost::property_tree::ptree &node)=0
 UnSerialize object from a Xml Node.
 
virtual void unSerialize (const std::string &xmlstring, const std::string &rootNode)
 UnSerialize object from a Xml Node string.
 
virtual void unSerialize (std::istream &is, const std::string &rootNode)
 UnSerialize object from a Xml node.
 
virtual void unSerialize (boost::property_tree::ptree &node, const std::string &rootNode)
 UnSerialize object from a Xml node.
 
virtual void unSerializeFromFile (const std::string &filename)
 UnSerialize object from a Xml file.
 
virtual std::string getDefaultXmlNodeName () const =0
 Get the default Xml Node name for this object.
 

Protected Attributes

std::string key_identity_
 
bool saveIKSConfig_
 
iks::IslogKeyServer::IKSConfig config_
 
- Protected Attributes inherited from logicalaccess::KeyStorage
std::map< std::string, std::string > metadata_
 

Additional Inherited Members

- Static Public Member Functions inherited from logicalaccess::KeyStorage
static std::shared_ptr< KeyStoragegetKeyStorageFromType (KeyStorageType kst)
 Get the key storage instance from a key storage type.
 
- Static Public Member Functions inherited from logicalaccess::XmlSerializable
static std::string removeXmlDeclaration (const std::string &xmlstring)
 Remove Xml declaration from a xml string.
 
static ByteVector formatHexString (std::string hexstr)
 Format hex string to hex string with space.
 
- Static Protected Member Functions inherited from logicalaccess::XmlSerializable
static unsigned long long atoull (const std::string &str)
 

Detailed Description

The client side of a remote key storage.

IKSStorage is backed by IKS (Islog Key Server).

Constructor & Destructor Documentation

◆ IKSStorage() [1/2]

IKSStorage::IKSStorage ( const std::string &  key_identity)
explicit

Create an IKSStorage, specifying the identity of the remote key represented by this storage.

◆ IKSStorage() [2/2]

logicalaccess::IKSStorage::IKSStorage ( )
inline

Default construction. Key identity will be empty.

This storage will fail when used.

◆ ~IKSStorage()

virtual logicalaccess::IKSStorage::~IKSStorage ( )
virtualdefault

Member Function Documentation

◆ getDefaultXmlNodeName()

std::string IKSStorage::getDefaultXmlNodeName ( ) const
overridevirtual

Get the default Xml Node name for this object.

Returns
The Xml node name.

Implements logicalaccess::XmlSerializable.

◆ getIKSConfig()

const iks::IslogKeyServer::IKSConfig & IKSStorage::getIKSConfig ( ) const

◆ getKeyIdentity()

const std::string & IKSStorage::getKeyIdentity ( ) const

Returns the key identity represents by the key/storage combination.

The "key identity" is what uniquely represents a key living on the IKS.

◆ getSerializeIKSConfig()

bool IKSStorage::getSerializeIKSConfig ( ) const

◆ getType()

KeyStorageType IKSStorage::getType ( ) const
overridevirtual

Get the key storage type.

Returns
The key storage type.

Implements logicalaccess::KeyStorage.

◆ serialize()

void IKSStorage::serialize ( boost::property_tree::ptree &  parentNode)
overridevirtual

Serialize object to Xml Node.

Parameters
osThe XML stream.

Implements logicalaccess::XmlSerializable.

◆ setIKSConfig()

void IKSStorage::setIKSConfig ( const std::string &  ip,
uint16_t  port,
const std::string &  client_cert,
const std::string &  client_key,
const std::string &  root_ca 
)

◆ setKeyIdentity()

void IKSStorage::setKeyIdentity ( const std::string &  idt)

◆ setSerializeIKSConfig()

void IKSStorage::setSerializeIKSConfig ( bool  v)

Control the value of the saveIKSConfig_ flag.

◆ unSerialize()

void IKSStorage::unSerialize ( boost::property_tree::ptree &  node)
overridevirtual

UnSerialize object from a Xml Node.

Parameters
nodeThe Xml node.

Implements logicalaccess::XmlSerializable.

Member Data Documentation

◆ config_

iks::IslogKeyServer::IKSConfig logicalaccess::IKSStorage::config_
protected

We store the IKS configuration in most IKSStorage object in order to ease the loading of configuration from a serialized object.

◆ key_identity_

std::string logicalaccess::IKSStorage::key_identity_
protected

◆ saveIKSConfig_

bool logicalaccess::IKSStorage::saveIKSConfig_
protected

Do we save IKS when serializing the object, or do we clear it instead?


The documentation for this class was generated from the following files: