lib/openssl/x509.rb in openssl-2.1.0.beta1 vs lib/openssl/x509.rb in openssl-2.1.0.beta2
- old
+ new
@@ -39,10 +39,15 @@
create_ext(hash["oid"], hash["value"], hash["critical"])
end
end
class Extension
+ def ==(other)
+ return false unless Extension === other
+ to_der == other.to_der
+ end
+
def to_s # "oid = critical, value"
str = self.oid
str << " = "
str << "critical, " if self.critical?
str << self.value.gsub(/\n/, ", ")
@@ -158,10 +163,17 @@
q.text to_s(OpenSSL::X509::Name::RFC2253)
}
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
end
end
@@ -174,9 +186,30 @@
q.text 'issuer='; q.pp self.issuer; q.text ','; q.breakable
q.text 'serial='; q.pp self.serial; q.text ','; q.breakable
q.text 'not_before='; q.pp self.not_before; q.text ','; q.breakable
q.text 'not_after='; q.pp self.not_after
}
+ 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
+
+ class Request
+ def ==(other)
+ return false unless Request === other
+ to_der == other.to_der
end
end
end
end