-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
== on certificates seems to compare ... strings? #158
Comments
I think OpenSSL::X509::Certificate#== should do a byte-by-byte comparison. |
Merged
#161 has been merged to master. v2.1.0 will include those == methods. |
ct-clearhaus
added a commit
to clearhaus/pedicel
that referenced
this issue
May 22, 2018
This is to accommodate for the concerns raised by @kse-clearhaus in #7 (comment) See also ruby/openssl#158
lawrence-forooghian
added a commit
to ably-forks/em-http-request
that referenced
this issue
May 14, 2024
Mistake in 9996b7b, which I missed since CI wasn’t running the relevant tests (as described in 139a59b). (Older versions of the OpenSSL gem hadn’t implemented certificate #== method; see ruby/openssl#158.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given two instances of a certificate, how can I determine if it's the same certificate?
I feel that == ought to do the trick.
It does not, as I think it looks for eq() (same object).
I can get around this using, for instance: certA.to_der == certB.to_der, which gives me a byte-comparison equality. That's great if they are actually the identical certificate (which in my present case, I care about), but I find nothing to do essentially, if certA.issuer == certB.issuer, then certA.subject == certB.subject.
Should it be == that does this?
The text was updated successfully, but these errors were encountered: