Skip to content

Commit

Permalink
Use header presence status to avoid openssl engine
Browse files Browse the repository at this point in the history
Include presence of openssl/engine.h as indication engines should not be
used. Skip engine if header is not present.
  • Loading branch information
pemensik committed Jul 19, 2024
1 parent 0aa0c15 commit 51dedf3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/ldns-signzone.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@
#include <ldns/keys.h>

#include <openssl/conf.h>
#ifndef OPENSSL_NO_ENGINE
#if defined(HAVE_OPENSSL_ENGINE_H) && !defined(OPENSSL_NO_ENGINE)
#include <openssl/engine.h>
#else
# ifndef OPENSSL_NO_ENGINE
# define OPENSSL_NO_ENGINE
# endif
#endif
#include <openssl/err.h>

Expand Down
6 changes: 5 additions & 1 deletion keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@
#ifdef USE_DSA
#include <openssl/dsa.h>
#endif
#ifndef OPENSSL_NO_ENGINE
#if defined(HAVE_OPENSSL_ENGINE_H) && !defined(OPENSSL_NO_ENGINE)
#include <openssl/engine.h>
#else
# ifndef OPENSSL_NO_ENGINE
# define OPENSSL_NO_ENGINE
# endif
#endif
#endif /* HAVE_SSL */

Expand Down

0 comments on commit 51dedf3

Please sign in to comment.