PLCnext API Documentation 25.0.2.69
OpenSslEVP_PKEY.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
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
23 OpenSslEVP_PKEY(const OpenSslEVP_PKEY& arg) = delete;
26 OpenSslEVP_PKEY& operator=(EVP_PKEY *key);
27 ~OpenSslEVP_PKEY(void);
28 operator EVP_PKEY*() const;
29
30public: // operations
31 void LoadFromFilePEM(const String& filename);
32 void LoadFromMemoryPEM(const std::vector<byte>& pemData);
33 void SaveToFilePEM(const String& filename);
34
35private: // methods
36 bool loadFromBio(OpenSslBio& bio);
37 bool saveToBio(OpenSslBio& bio);
38
39private: // fields
40 EVP_PKEY *key;
41};
42
43}}}}} // end of namespace Arp::System::Commons::Security::Internal
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
OpenSslEVP_PKEY()
Constructs an OpenSslEVP_PKEY instance.
Definition: OpenSslEVP_PKEY.cpp:22
~OpenSslEVP_PKEY(void)
Destructs this instance and frees all resources.
Definition: OpenSslEVP_PKEY.cpp:32
OpenSslEVP_PKEY(const OpenSslEVP_PKEY &arg)=delete
Copy constructor.
OpenSslEVP_PKEY & operator=(const OpenSslEVP_PKEY &arg)=delete
Assignment operator.
Root namespace for the PLCnext API