From 45196a5251fc848a365d4c121aedd527b60edaf5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 12 Jun 2023 10:15:48 +0200 Subject: [PATCH] Fixes for OpenSSL 3.0 --- src/core/system_parameters/gnss_crypto.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/system_parameters/gnss_crypto.cc b/src/core/system_parameters/gnss_crypto.cc index e8ea0b719..e82f27b22 100644 --- a/src/core/system_parameters/gnss_crypto.cc +++ b/src/core/system_parameters/gnss_crypto.cc @@ -300,7 +300,11 @@ void Gnss_Crypto::readPublicKeyFromPEM(const std::string& filePath) return; } // Load the public key from the BIO +#if USE_OPENSSL_3 + d_PublicKey = PEM_read_bio_PUBKEY(bio, nullptr, nullptr, nullptr); +#else d_PublicKey = PEM_read_bio_EC_PUBKEY(bio, nullptr, nullptr, nullptr); +#endif BIO_free(bio); if (d_PublicKey == nullptr) {