aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-10-12 15:32:02 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-10-12 16:43:33 +0900
commite4727829837a4a4de173a54ddd6514053fce1b5a (patch)
tree6d815819ba8a6ae0244a04364b3e511e32d1e8eb /lib
parent51699757a2e2f1a3e47e385346c35b23cf92f245 (diff)
downloadruby-openssl-e4727829837a4a4de173a54ddd6514053fce1b5a.tar.gz
x509crl, x509revoked: implement X509::{CRL,Revoked}#==
Diffstat (limited to 'lib')
-rw-r--r--lib/openssl/x509.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/openssl/x509.rb b/lib/openssl/x509.rb
index bc8ccc7d..6b220142 100644
--- a/lib/openssl/x509.rb
+++ b/lib/openssl/x509.rb
@@ -190,5 +190,19 @@ module OpenSSL
}
end
end
+
+ class CRL
+ def ==(other)
+ return false unless CRL === other
+ to_der == other.to_der
+ end
+ end
+
+ class Revoked
+ def ==(other)
+ return false unless Revoked === other
+ to_der == other.to_der
+ end
+ end
end
end