PLCnext API Documentation 23.6.0.37
OpenSslEVP_PKEY.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Commons/Security/Internal/OpenSslBio.hpp"
9#include "openssl/bio.h"
10
11#include <vector>
12
13namespace Arp { namespace System { namespace Commons { namespace Security { namespace Internal
14{
15
17{
18public: // typedefs
19
20public: // construction/destruction
24 OpenSslEVP_PKEY(const OpenSslEVP_PKEY& arg) = delete;
27 OpenSslEVP_PKEY& operator=(EVP_PKEY *key);
28
31
32 operator EVP_PKEY*() const
33 {
34 return key;
35 };
36
37public: // operators
38
39
40public: // static operations
41
42public: // setter/getter operations
43
44public: // operations
45 void LoadFromFilePEM(const String& filename);
46 void LoadFromMemoryPEM(const std::vector<byte>& pemData);
47 void SaveToFilePEM(const String& filename);
48
49protected: // operations
50
51private: // static methods
52
53private: // methods
54 bool loadFromBio(OpenSslBio& bio);
55 bool saveToBio(OpenSslBio& bio);
56
57private: // fields
58 EVP_PKEY *key;
59
60
61private: // static fields
62
63};
64
66// inline methods of class CertificateStore
67
68}}}}} // end of namespace Arp::System::Commons::Security::Internal
OpenSslEVP_PKEY()
Constructs an OpenSslEVP_PKEY instance.
~OpenSslEVP_PKEY(void)
Destructs this instance and frees all resources.
OpenSslEVP_PKEY(const OpenSslEVP_PKEY &arg)=delete
Copy constructor.
OpenSslEVP_PKEY & operator=(const OpenSslEVP_PKEY &arg)=delete
Assignment operator.
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API