Core/SSL: Conditional compilation of AES - temporary fix

This commit is contained in:
Mirek Fidler 2025-07-16 08:50:20 -04:00
parent 405637c570
commit 500ccc11a4
2 changed files with 9 additions and 1 deletions

View file

@ -1,5 +1,7 @@
#include "SSL.h"
#ifdef EVP_PKEY_KEYMGMT
// Encrypts a string using AES-256-GCM with PBKDF2 key derivation
// Format of encrypted data: "GCMv1__" + salt(16) + iv(12) + ciphertext + tag(16)
@ -331,4 +333,6 @@ bool AES256Decrypt(Stream& in, const String& password, Stream& out, Gate<int64,
}
}
}
#endif

View file

@ -143,6 +143,8 @@ String SslToString(X509_NAME *name);
Date Asn1ToDate(ASN1_STRING *time);
String Asn1ToString(ASN1_STRING *s);
#ifdef EVP_PKEY_KEYMGMT
constexpr const int AES_GCM_MIN_ITERATION = 10000;
constexpr const int AES_GCM_MAX_ITERATION = 1000000;
constexpr const int AES_GCM_DEFAULT_ITERATION = 100000;
@ -183,4 +185,6 @@ bool AES256Decrypt(Stream& in, const String& password, Stream& out, Gate<int64,
// Secure buffer
#include "Buffer.hpp"
#endif
}