Improve OpenBSD support

This commit is contained in:
David Uhden Collado 2025-10-13 22:33:57 +02:00
parent d10a7fe8e5
commit 80840b761e
No known key found for this signature in database
GPG key ID: 1A47E8A7D51FB3DA
8 changed files with 149 additions and 22 deletions

View file

@ -7,8 +7,9 @@
*/
#include <memory>
#include "Crypto.h"
#include <openssl/evp.h>
#if (OPENSSL_VERSION_NUMBER >= 0x030000000) // since 3.0.0
#if I2PD_OPENSSL_GE_3 // since 3.0.0
#include <openssl/core_names.h>
#include <openssl/param_build.h>
#endif
@ -19,7 +20,7 @@ namespace i2p
{
namespace crypto
{
#if (OPENSSL_VERSION_NUMBER >= 0x030000000) // since 3.0.0
#if I2PD_OPENSSL_GE_3 // since 3.0.0
DSAVerifier::DSAVerifier ():
m_PublicKey (nullptr)
{
@ -172,7 +173,7 @@ namespace crypto
}
#endif
#if (OPENSSL_VERSION_NUMBER >= 0x030000000) // since 3.0.0
#if I2PD_OPENSSL_GE_3 // since 3.0.0
ECDSAVerifier::ECDSAVerifier (int curve, size_t keyLen, const EVP_MD * hash):
m_Curve(curve), m_KeyLen (keyLen), m_Hash (hash), m_PublicKey (nullptr)
{
@ -405,7 +406,7 @@ namespace crypto
LogPrint (eLogError, "EdDSA signing key is not set");
}
#if (OPENSSL_VERSION_NUMBER >= 0x030000000)
#if I2PD_OPENSSL_GE_3
static const OSSL_PARAM EDDSA25519phParams[] =
{
OSSL_PARAM_utf8_string ("instance", (char *)"Ed25519ph", 9),