Skip to content

Commit

Permalink
Fix compile error on OPENSSL_VERSION_MAJOR < 3
Browse files Browse the repository at this point in the history
../pdns/libssl.cc:637:28: error: no member named 'content' in 'OpenSSLTLSTicketKey'

(cherry picked from commit b1f09ed)
  • Loading branch information
omoerbeek authored and rgacogne committed Jul 9, 2024
1 parent 2fb7be7 commit 58cae49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pdns/libssl.hh
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ public:
#if OPENSSL_VERSION_MAJOR >= 3
int encrypt(unsigned char keyName[TLS_TICKETS_KEY_NAME_SIZE], unsigned char* iv, EVP_CIPHER_CTX* ectx, EVP_MAC_CTX* hctx) const;
bool decrypt(const unsigned char* iv, EVP_CIPHER_CTX* ectx, EVP_MAC_CTX* hctx) const;
[[nodiscard]] std::string content() const;
#else
int encrypt(unsigned char keyName[TLS_TICKETS_KEY_NAME_SIZE], unsigned char* iv, EVP_CIPHER_CTX* ectx, HMAC_CTX* hctx) const;
bool decrypt(const unsigned char* iv, EVP_CIPHER_CTX* ectx, HMAC_CTX* hctx) const;
#endif

[[nodiscard]] std::string content() const;

private:
unsigned char d_name[TLS_TICKETS_KEY_NAME_SIZE];
unsigned char d_cipherKey[TLS_TICKETS_CIPHER_KEY_SIZE];
Expand Down

0 comments on commit 58cae49

Please sign in to comment.