mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-10-24 04:29:03 +01:00
Improve OpenBSD support
This commit is contained in:
parent
d10a7fe8e5
commit
80840b761e
8 changed files with 149 additions and 22 deletions
|
|
@ -14,12 +14,12 @@
|
|||
#include <boost/algorithm/string.hpp>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x030000000) // since 3.0.0
|
||||
#include "Crypto.h"
|
||||
#if I2PD_OPENSSL_GE_3 // since 3.0.0
|
||||
#include <openssl/core_names.h>
|
||||
#endif
|
||||
#include <zlib.h>
|
||||
|
||||
#include "Crypto.h"
|
||||
#include "I2PEndian.h"
|
||||
#include "Reseed.h"
|
||||
#include "FS.h"
|
||||
|
|
@ -485,7 +485,7 @@ namespace data
|
|||
// extract RSA key (we need n only, e = 65537)
|
||||
EVP_PKEY * pubKey = X509_get_pubkey (cert);
|
||||
const BIGNUM * n = nullptr;
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x030000000) // since 3.0.0
|
||||
#if I2PD_OPENSSL_GE_3 // since 3.0.0
|
||||
BIGNUM * n1 = BN_new ();
|
||||
if (EVP_PKEY_get_bn_param (pubKey, OSSL_PKEY_PARAM_RSA_N, &n1) > 0)
|
||||
n = n1;
|
||||
|
|
@ -505,7 +505,7 @@ namespace data
|
|||
}
|
||||
else
|
||||
LogPrint (eLogError, "Reseed: Can't extract RSA key from ", filename);
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x030000000) // since 3.0.0
|
||||
#if I2PD_OPENSSL_GE_3 // since 3.0.0
|
||||
BN_free (n1);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue