1
#pragma once
2

            
3
#include "envoy/common/crypto/crypto.h"
4

            
5
#include "openssl/base.h"
6
#include "openssl/evp.h"
7

            
8
namespace Envoy {
9
namespace Common {
10
namespace Crypto {
11

            
12
class PKeyObject : public Envoy::Common::Crypto::CryptoObject {
13
public:
14
2
  PKeyObject() = default;
15
74
  PKeyObject(EVP_PKEY* pkey) : pkey_(pkey) {}
16
  EVP_PKEY* getEVP_PKEY() const;
17
  void setEVP_PKEY(EVP_PKEY* pkey);
18

            
19
private:
20
  bssl::UniquePtr<EVP_PKEY> pkey_;
21
};
22

            
23
using PKeyObjectPtr = std::unique_ptr<PKeyObject>;
24

            
25
} // namespace Crypto
26
} // namespace Common
27
} // namespace Envoy