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

@ -52,7 +52,7 @@ namespace data
if (pkey)
{
int curve = 0;
#if (OPENSSL_VERSION_NUMBER >= 0x030000000) // since 3.0.0
#if I2PD_OPENSSL_GE_3 // since 3.0.0
char groupName[20];
if (EVP_PKEY_get_group_name(pkey, groupName, sizeof(groupName), NULL) == 1)
curve = OBJ_txt2nid (groupName);
@ -157,7 +157,7 @@ namespace data
SSL * ssl = SSL_new (ctx);
EVP_PKEY * pkey = SSL_get_privatekey (ssl);
int curve = 0;
#if (OPENSSL_VERSION_NUMBER >= 0x030000000) // since 3.0.0
#if I2PD_OPENSSL_GE_3 // since 3.0.0
char groupName[20];
if (EVP_PKEY_get_group_name(pkey, groupName, sizeof(groupName), NULL) == 1)
curve = OBJ_txt2nid (groupName);