lib/rails/auth/x509/certificate.rb in rails-auth-1.0.0 vs lib/rails/auth/x509/certificate.rb in rails-auth-1.1.0
- old
+ new
@@ -43,9 +43,17 @@
{
cn: cn,
ou: ou
}
end
+
+ # Compare ourself to another object by ensuring that it has the same type
+ # and that its certificate pem is the same as ours
+ def ==(other)
+ other.is_a?(self.class) && other.certificate.to_der == certificate.to_der
+ end
+
+ alias eql? ==
end
end
end
end