mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/openssl] engine: disable OpenSSL::Engine on OpenSSL 3.0
The entire ENGINE API is deprecated in OpenSSL 3.0 in favor of the new "Provider" concept. OpenSSL::Engine will not be defined when compiled with OpenSSL 3.0. We would need a way to interact with providers from Ruby programs, but since the concept is completely different from the ENGINE API, it will not be through the current OpenSSL::Engine interface. https://github.com/ruby/openssl/commit/69a27d8de4
This commit is contained in:
parent
79a6f4349d
commit
b2fb503dab
4 changed files with 11 additions and 7 deletions
|
@ -10,9 +10,6 @@
|
|||
#include RUBY_EXTCONF_H
|
||||
|
||||
#include <string.h> /* memcpy() */
|
||||
#if !defined(OPENSSL_NO_ENGINE)
|
||||
# include <openssl/engine.h>
|
||||
#endif
|
||||
#include <openssl/x509_vfy.h>
|
||||
|
||||
#include "openssl_missing.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <ruby/io.h>
|
||||
#include <ruby/thread.h>
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
@ -30,9 +31,6 @@
|
|||
#include <openssl/ts.h>
|
||||
#endif
|
||||
#include <openssl/crypto.h>
|
||||
#if !defined(OPENSSL_NO_ENGINE)
|
||||
# include <openssl/engine.h>
|
||||
#endif
|
||||
#if !defined(OPENSSL_NO_OCSP)
|
||||
# include <openssl/ocsp.h>
|
||||
#endif
|
||||
|
@ -54,6 +52,10 @@
|
|||
(LIBRESSL_VERSION_NUMBER >= (maj << 28) | (min << 20) | (pat << 12))
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_ENGINE) && !OSSL_OPENSSL_PREREQ(3, 0, 0)
|
||||
# define OSSL_USE_ENGINE
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Common Module
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
*/
|
||||
#include "ossl.h"
|
||||
|
||||
#if !defined(OPENSSL_NO_ENGINE)
|
||||
#ifdef OSSL_USE_ENGINE
|
||||
# include <openssl/engine.h>
|
||||
|
||||
#define NewEngine(klass) \
|
||||
TypedData_Wrap_Struct((klass), &ossl_engine_type, 0)
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
*/
|
||||
#include "ossl.h"
|
||||
|
||||
#ifdef OSSL_USE_ENGINE
|
||||
# include <openssl/engine.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Classes
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue