From b99f1ddc05dbdc69fc9b79fd65d1069d96c83b86 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Thu, 12 Oct 2017 14:24:59 +0900 Subject: x509attr: implement X509::Attribute#== --- lib/openssl/x509.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/openssl/x509.rb b/lib/openssl/x509.rb index 2f87ea19..bc8ccc7d 100644 --- a/lib/openssl/x509.rb +++ b/lib/openssl/x509.rb @@ -165,6 +165,13 @@ module OpenSSL end end + class Attribute + def ==(other) + return false unless Attribute === other + to_der == other.to_der + end + end + class StoreContext def cleanup warn "(#{caller.first}) OpenSSL::X509::StoreContext#cleanup is deprecated with no replacement" if $VERBOSE -- cgit v1.2.3