Line data Source code
1 : #pragma once 2 : 3 : #include <memory> 4 : #include <string> 5 : 6 : #include "envoy/common/pure.h" 7 : #include "envoy/ssl/private_key/private_key.h" 8 : 9 : namespace Envoy { 10 : namespace Ssl { 11 : 12 : class TlsCertificateConfig { 13 : public: 14 0 : virtual ~TlsCertificateConfig() = default; 15 : 16 : /** 17 : * @return a string of certificate chain. 18 : */ 19 : virtual const std::string& certificateChain() const PURE; 20 : 21 : /** 22 : * @return path of the certificate chain used to identify the local side or "<inline>" if the 23 : * certificate chain was inlined. 24 : */ 25 : virtual const std::string& certificateChainPath() const PURE; 26 : 27 : /** 28 : * @return a string of private key. 29 : */ 30 : virtual const std::string& privateKey() const PURE; 31 : 32 : /** 33 : * @return path of the private key used to identify the local side or "<inline>" if the private 34 : * key was inlined. 35 : */ 36 : virtual const std::string& privateKeyPath() const PURE; 37 : 38 : /** 39 : * @return a string of pkcs12 data. 40 : */ 41 : virtual const std::string& pkcs12() const PURE; 42 : 43 : /** 44 : * @return path of the pkcs12 file used to identify the local side or "<inline>" if the pkcs12 45 : * data was inlined. 46 : */ 47 : virtual const std::string& pkcs12Path() const PURE; 48 : 49 : /** 50 : * @return private key method provider. 51 : */ 52 : virtual Envoy::Ssl::PrivateKeyMethodProviderSharedPtr privateKeyMethod() const PURE; 53 : 54 : /** 55 : * @return a string of password. 56 : */ 57 : virtual const std::string& password() const PURE; 58 : 59 : /** 60 : * @return path of the password file to be used to decrypt the private key or "<inline>" if the 61 : * password was inlined. 62 : */ 63 : virtual const std::string& passwordPath() const PURE; 64 : 65 : /** 66 : * @return a byte vector of ocsp response. 67 : */ 68 : virtual const std::vector<uint8_t>& ocspStaple() const PURE; 69 : 70 : /** 71 : * @return path of the ocsp response file for this certificate or "<inline>" if the 72 : * ocsp response was inlined. 73 : */ 74 : virtual const std::string& ocspStaplePath() const PURE; 75 : }; 76 : 77 : using TlsCertificateConfigPtr = std::unique_ptr<TlsCertificateConfig>; 78 : 79 : } // namespace Ssl 80 : } // namespace Envoy