8#include "Arp/System/Commons/Logging.h"
9#include "Arp/System/Commons/Security/KeyPairType.hpp"
10#include "Arp/System/Commons/Security/Internal/OpenSslBio.hpp"
11#include "Arp/System/Commons/Security/Internal/OpenSslEVP_PKEY.hpp"
13#include <openssl/x509.h>
15namespace Arp {
namespace System {
namespace Commons {
namespace Security
18using namespace Arp::System::Commons::Security::Internal;
48 void ReadKeyType(
void);
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
Derive from this class to inherit logging functionality.
Definition: Loggable.hxx:28
Definition: OpenSslEVP_PKEY.hpp:17
class which represents a asymmetric key pair
Definition: KeyPair.hpp:22
void InitSslContext(SSL_CTX *pSslCtx) const
Initializes a OpenSSL SSL_CTX structure ith this KeyPair
Definition: KeyPair.cpp:60
KeyPair(const KeyPair &arg)=delete
Copy constructor.
virtual ~KeyPair(void)
Destructs this instance and frees all resources.
Definition: KeyPair.cpp:36
EVP_PKEY * GetPkey()
returns a pointer to the OpenSSL EVP_PKEY* structure initialized with this KeyPair
Definition: KeyPair.cpp:163
virtual void LoadFromFile(const String &filename)
Loads the KeyPair from a PEM encoded file filename
Definition: KeyPair.cpp:44
void GenerateKeyPair(KeyPairType type)
Generates a new key pair and replaced the current key pair with the generated
Definition: KeyPair.cpp:99
KeyPairType GetKeyType()
Returns the type of this key pair
Definition: KeyPair.cpp:169
void WriteToFile(const String &filename)
saves this KeyPair to a file in PEM format (the private key is not encrypted!)
Definition: KeyPair.cpp:92
std::vector< byte > GetPublicKey()
Returns the public key portion of this key pair (PEM format)
Definition: KeyPair.cpp:70
KeyPair()
Constructs an KeyPair
Definition: KeyPair.cpp:29
KeyPair & operator=(const KeyPair &arg)=delete
Assignment operator.
void LoadFromMemory(const std::vector< byte > &data)
Loads the KeyPair from memory (PEM encoded)
Definition: KeyPair.cpp:52
Root namespace for the PLCnext API