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

#include <PKCSkeystorage.hpp>

Inheritance diagram for logicalaccess::PKCSKeyStorage:
logicalaccess::KeyStorage logicalaccess::XmlSerializable

Public Member Functions

KeyStorageType getType () const override
 Get the key storage type.
 
std::string getDefaultXmlNodeName () const override
 Get the default Xml Node name for this object.
 
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.
 
const ByteVectorget_key_id () const
 
void set_key_id (const ByteVector &keyid)
 
size_t get_slot_id () const
 
void set_slot_id (size_t slot_id)
 
const std::string & get_pkcs_session_password () const
 
void set_pkcs_session_password (const std::string &pwd)
 
const std::string & get_proteccio_conf_dir () const
 
void set_proteccio_conf_dir (const std::string &d)
 
const std::string & get_pkcs_shared_object_path () const
 
void set_pkcs_shared_object_path (const std::string &d)
 
- 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.
 

Private Attributes

ByteVector pkcs_object_id_
 
std::string pkcs_session_password_
 
size_t slot_id_ = 0
 
std::string env_PROTECCIO_CONF_DIR_
 
std::string pkcs_library_shared_object_path_
 

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)
 
- Protected Attributes inherited from logicalaccess::KeyStorage
std::map< std::string, std::string > metadata_
 

Detailed Description

A storage to represent a key store in a PKCS token.

Member Function Documentation

◆ get_key_id()

const ByteVector & logicalaccess::PKCSKeyStorage::get_key_id ( ) const
inline

◆ get_pkcs_session_password()

const std::string & logicalaccess::PKCSKeyStorage::get_pkcs_session_password ( ) const
inline

◆ get_pkcs_shared_object_path()

const std::string & logicalaccess::PKCSKeyStorage::get_pkcs_shared_object_path ( ) const
inline

◆ get_proteccio_conf_dir()

const std::string & logicalaccess::PKCSKeyStorage::get_proteccio_conf_dir ( ) const
inline

◆ get_slot_id()

size_t logicalaccess::PKCSKeyStorage::get_slot_id ( ) const
inline

◆ getDefaultXmlNodeName()

std::string logicalaccess::PKCSKeyStorage::getDefaultXmlNodeName ( ) const
inlineoverridevirtual

Get the default Xml Node name for this object.

Returns
The Xml node name.

Implements logicalaccess::XmlSerializable.

◆ getType()

KeyStorageType logicalaccess::PKCSKeyStorage::getType ( ) const
inlineoverridevirtual

Get the key storage type.

Returns
The key storage type.

Implements logicalaccess::KeyStorage.

◆ serialize()

void logicalaccess::PKCSKeyStorage::serialize ( boost::property_tree::ptree &  parentNode)
overridevirtual

Serialize object to Xml Node.

Parameters
osThe XML stream.

Reimplemented from logicalaccess::KeyStorage.

◆ set_key_id()

void logicalaccess::PKCSKeyStorage::set_key_id ( const ByteVector keyid)
inline

◆ set_pkcs_session_password()

void logicalaccess::PKCSKeyStorage::set_pkcs_session_password ( const std::string &  pwd)
inline

◆ set_pkcs_shared_object_path()

void logicalaccess::PKCSKeyStorage::set_pkcs_shared_object_path ( const std::string &  d)
inline

◆ set_proteccio_conf_dir()

void logicalaccess::PKCSKeyStorage::set_proteccio_conf_dir ( const std::string &  d)
inline

◆ set_slot_id()

void logicalaccess::PKCSKeyStorage::set_slot_id ( size_t  slot_id)
inline

◆ unSerialize()

void logicalaccess::PKCSKeyStorage::unSerialize ( boost::property_tree::ptree &  node)
overridevirtual

UnSerialize object from a Xml Node.

Parameters
nodeThe Xml node.

Reimplemented from logicalaccess::KeyStorage.

Member Data Documentation

◆ env_PROTECCIO_CONF_DIR_

std::string logicalaccess::PKCSKeyStorage::env_PROTECCIO_CONF_DIR_
private

◆ pkcs_library_shared_object_path_

std::string logicalaccess::PKCSKeyStorage::pkcs_library_shared_object_path_
private

◆ pkcs_object_id_

ByteVector logicalaccess::PKCSKeyStorage::pkcs_object_id_
private

The CKA_ID attribute value that represent the ID of the key on the PKCS token.

◆ pkcs_session_password_

std::string logicalaccess::PKCSKeyStorage::pkcs_session_password_
private

◆ slot_id_

size_t logicalaccess::PKCSKeyStorage::slot_id_ = 0
private

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