Skip to content

Commit

Permalink
Revert "Fix engine include errors on Fedora Rawhide"
Browse files Browse the repository at this point in the history
This reverts commit 1d57ccf.
  • Loading branch information
siddharth-narayan committed Jul 4, 2024
1 parent 1d57ccf commit a45219b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fedora-rawhide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
submodules: true
- name: Install dependencies
run: |
dnf -y install git cmake ncurses-devel openssl-devel-engine libsodium-devel readline-devel zlib-devel gcc-c++ clang
dnf -y install git cmake ncurses-devel openssl-devel libsodium-devel readline-devel zlib-devel gcc-c++ clang
- name: Compile with ${{ matrix.cc }}
run: |
export CC=${{ matrix.cc }}
Expand Down
14 changes: 11 additions & 3 deletions src/Mayaqua/Encrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#endif
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/pkcs7.h>
Expand All @@ -42,6 +40,10 @@
#include <openssl/x509v3.h>
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/provider.h>
// Static oqsprovider initialization function
#ifndef SKIP_OQS_PROVIDER
extern OSSL_provider_init_fn oqs_provider_init;
#endif
#endif

#ifdef _MSC_VER
Expand Down Expand Up @@ -4005,7 +4007,13 @@ void InitCryptLibrary()
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
ossl_provider_default = OSSL_PROVIDER_load(NULL, "legacy");
ossl_provider_legacy = OSSL_PROVIDER_load(NULL, "default");
ossl_provider_oqsprovider = OSSL_PROVIDER_load(NULL, "oqsprovider");

char *oqs_provider_name = "oqsprovider";
#ifndef SKIP_OQS_PROVIDER
// Registers "oqsprovider" as a provider -- necessary because oqsprovider is built in now.
OSSL_PROVIDER_add_builtin(NULL, oqs_provider_name, oqs_provider_init);
#endif
ossl_provider_oqsprovider = OSSL_PROVIDER_load(NULL, oqs_provider_name);
#endif

ssl_clientcert_index = SSL_get_ex_new_index(0, "struct SslClientCertInfo *", NULL, NULL, NULL);
Expand Down

0 comments on commit a45219b

Please sign in to comment.