|
PLCnext API Documentation 23.9.0.25
|
Class with represents a Identity (Certificate with Chain and private Key) and is able to initialze an OpenSSL SSL Conetxt More...
#include <IdentityStore.hpp>

Public Types | |
| enum | KeyMustExist : bool { IgnoreMissingKey = false , RequireKeyExists = true } |
Public Member Functions | |
| IdentityStore (const String &basePath, const String &name, KeyMustExist requireKeyExists=RequireKeyExists) | |
| Constructs an IdentityStore instance. | |
| IdentityStore (const IdentityStore &arg)=delete | |
| Copy constructor. | |
| IdentityStore & | operator= (const IdentityStore &arg)=delete |
| Assignment operator. | |
| ~IdentityStore (void)=default | |
| Destructs this instance and frees all resources. | |
| String | GetName (void) const |
| Returns the name of the IdentityStore More... | |
| String | GetFullCertificateFileName (void) const |
| summary>Returns the absolute path to the key file | |
| String | GetFullKeyFileName (void) const |
| summary>Returns the absolute path to the tpm key file | |
| String | GetFullTpmKeyFileName (void) const |
| summary>checks if a certificate is available for this IdentityStore | |
| bool | HasCertificate (void) |
| const std::shared_ptr< KeyPair > & | GetKeyPair (void) |
| summary>Returns the type of the key pair | |
| KeyPairType | GetKeyType (void) |
| void | InitSslContext (SSL_CTX *pSslCtx) const |
| Initializes a OpenSSL SSL_:CTX Structure with the private key and certificate More... | |
| std::vector< byte > | GetPublicKey (void) |
| SecurityConfigurationError | SetKeyPair (const std::vector< byte > &pemData) |
| SecurityConfigurationError | SetCertificate (const std::vector< byte > &pemData) |
| std::vector< byte > | GetPemCertificate (void) |
| std::vector< byte > | GetDerCertificate (void) |
| std::vector< byte > | GetPemCertificateWithChain (void) |
| std::vector< byte > | GetDerCertificateWithChain (void) |
| summary>get the issuer certificates in PEM format | |
| std::vector< std::vector< byte > > | GetIssuerPemCertificates (void) |
| summary>creates all needed directories inside the folder of this IdentityStore | |
| void | CreateAllDirectories (void) |
| summary>list all elements in the list referenced by ListType More... | |
| SecurityConfigurationError | ListContent (SecurityListType type, std::vector< ItemInfo > &result) |
| summary>add an element into the list referenced by ListType More... | |
| SecurityConfigurationError | AddElement (SecurityListType type, const std::vector< byte > &pemData) |
| summary>delete an elements from the list referenced by ListType, identified by identifier More... | |
| SecurityConfigurationError | DeleteElement (SecurityListType type, const String &identifier) |
| summary>Generate a new KeyPair for this IdentityStore More... | |
| SecurityConfigurationError | GenerateKeyPair (KeyPairType type) |
| std::vector< byte > | GenerateCSR () |
| bool | VerifyCertMatchesWithPrivateKey (void) |
Class with represents a Identity (Certificate with Chain and private Key) and is able to initialze an OpenSSL SSL Conetxt
internal class used by TlsSocket
| SecurityConfigurationError Arp::System::Commons::Security::IdentityStore::AddElement | ( | SecurityListType | type, |
| const std::vector< byte > & | pemData | ||
| ) |
summary>delete an elements from the list referenced by ListType, identified by identifier
returns>SecurityConfigurationError::None if operation was successful. In case of an error the error code identified the error is returned
| void Arp::System::Commons::Security::IdentityStore::CreateAllDirectories | ( | void | ) |
summary>list all elements in the list referenced by ListType
returns>SecurityConfigurationError::None if operation was successful. In case of an error the error code identified the error is returned
| SecurityConfigurationError Arp::System::Commons::Security::IdentityStore::DeleteElement | ( | SecurityListType | type, |
| const String & | identifier | ||
| ) |
summary>Generate a new KeyPair for this IdentityStore
returns>SecurityConfigurationError::None if operation was successful. In case of an error the error code identified the error is returned
| std::vector< byte > Arp::System::Commons::Security::IdentityStore::GenerateCSR | ( | ) |
summary>verify if the certificates matches with the Key pair
returns>true if the certificate matches the private key, false otherwise
| SecurityConfigurationError Arp::System::Commons::Security::IdentityStore::GenerateKeyPair | ( | KeyPairType | type | ) |
summary>Generate a Certiciate Signing Request (CSR) for the Key Pair of this IdentityStore
returns>byte vector with generated CSR in PEM format
| std::vector< byte > Arp::System::Commons::Security::IdentityStore::GetDerCertificate | ( | void | ) |
summary>get certificate as byte array in PEM format with issuer certificates appended
returns>byte vector with PEM encoded certificate with all certificates from its chain appended
|
inline |
Returns the name of the IdentityStore
summary>Returns the absolute path to the certificate file
| std::vector< byte > Arp::System::Commons::Security::IdentityStore::GetPemCertificate | ( | void | ) |
summary>get certificate as byte array in DER format
returns>byte vector with DER encoded certificate
| std::vector< byte > Arp::System::Commons::Security::IdentityStore::GetPemCertificateWithChain | ( | void | ) |
summary>get certificate as byte array in DER format with issuer certificates appended
returns>byte vector with DER encoded certificate with all certificates from its chain appended
| std::vector< byte > Arp::System::Commons::Security::IdentityStore::GetPublicKey | ( | void | ) |
summary>Sets the key pair from pem data out if memory
param pemData="pemData">std::vector<byte> with pem encoded key pair
returns>SecurityConfigurationError::None if operation was successful. In case of an error the error code identified the error is returned
| void Arp::System::Commons::Security::IdentityStore::InitSslContext | ( | SSL_CTX * | pSslCtx | ) | const |
Initializes a OpenSSL SSL_:CTX Structure with the private key and certificate
param name="pSslCtx">Pointer to the OpenSSL SSL_CTX structure to initialize
summary>reads the public key in PEM format
| SecurityConfigurationError Arp::System::Commons::Security::IdentityStore::ListContent | ( | SecurityListType | type, |
| std::vector< ItemInfo > & | result | ||
| ) |
summary>add an element into the list referenced by ListType
returns>SecurityConfigurationError::None if operation was successful. In case of an error the error code identified the error is returned
| SecurityConfigurationError Arp::System::Commons::Security::IdentityStore::SetCertificate | ( | const std::vector< byte > & | pemData | ) |
summary>get certificate as byte array in PEM format
returns>byte vector with PEM encoded certificate
| SecurityConfigurationError Arp::System::Commons::Security::IdentityStore::SetKeyPair | ( | const std::vector< byte > & | pemData | ) |
summary>Sets the certificate from pem data out if memory
param pemData="pemData">std::vector<byte> with pem encoded certificate
returns>SecurityConfigurationError::None if operation was successful. In case of an error the error code identified the error is returned