mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-07 14:40:12 +00:00
Fix for old OpenSSL
This commit is contained in:
parent
d984822b45
commit
c2bb06076a
@ -547,7 +547,7 @@ void Gnss_Crypto::readPublicKeyFromPEM(const std::string& pemFilePath)
|
|||||||
gnutls_pubkey_deinit(pubkey);
|
gnutls_pubkey_deinit(pubkey);
|
||||||
#else // OpenSSL
|
#else // OpenSSL
|
||||||
// Create a BIO object from the string data
|
// Create a BIO object from the string data
|
||||||
BIO* bio = BIO_new_mem_buf(pemContent.c_str(), pemContent.length());
|
BIO* bio = BIO_new_mem_buf(const_cast<char*>(pemContent.c_str()), pemContent.length());
|
||||||
if (!bio)
|
if (!bio)
|
||||||
{
|
{
|
||||||
std::cerr << "OpenSSL: error creating a BIO object with data read from file " << pemFilePath << ". Aborting import" << std::endl;
|
std::cerr << "OpenSSL: error creating a BIO object with data read from file " << pemFilePath << ". Aborting import" << std::endl;
|
||||||
@ -861,7 +861,7 @@ void Gnss_Crypto::set_public_key(const std::vector<uint8_t>& publicKey)
|
|||||||
#else // OpenSSL
|
#else // OpenSSL
|
||||||
BIO* bio = nullptr;
|
BIO* bio = nullptr;
|
||||||
EVP_PKEY* pkey = nullptr;
|
EVP_PKEY* pkey = nullptr;
|
||||||
bio = BIO_new_mem_buf(publicKey.data(), publicKey.size());
|
bio = BIO_new_mem_buf(const_cast<uint8_t*>(publicKey.data()), publicKey.size());
|
||||||
if (!bio)
|
if (!bio)
|
||||||
{
|
{
|
||||||
std::cerr << "Failed to create BIO for key \n";
|
std::cerr << "Failed to create BIO for key \n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user