From 5df8e30d641cbbedb8756242e6fd5c8b20500f51 Mon Sep 17 00:00:00 2001 From: kares Date: Mon, 27 May 2024 10:54:15 +0200 Subject: [PATCH] [compat] OpenSSL::ConfigError and DEFAULT_CONFIG_FILE (#304) --- lib/jopenssl/load.rb | 1 + lib/openssl/config.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/jopenssl/load.rb b/lib/jopenssl/load.rb index db90cdf4..ab224c27 100644 --- a/lib/jopenssl/load.rb +++ b/lib/jopenssl/load.rb @@ -43,6 +43,7 @@ module OpenSSL autoload :Config, 'openssl/config' unless const_defined?(:Config, false) + autoload :ConfigError, 'openssl/config' unless const_defined?(:ConfigError, false) autoload :PKCS12, 'openssl/pkcs12' end diff --git a/lib/openssl/config.rb b/lib/openssl/config.rb index 9a0b7874..547b08f2 100644 --- a/lib/openssl/config.rb +++ b/lib/openssl/config.rb @@ -14,6 +14,7 @@ require 'stringio' module OpenSSL + class ConfigError < OpenSSLError; end ## # = OpenSSL::Config # @@ -27,6 +28,8 @@ module OpenSSL class Config include Enumerable + DEFAULT_CONFIG_FILE = nil # JRuby: compatibility (we do not read openssl.cnf) + class << self ##