Skip to content

Commit 736af5b

Browse files
committed
x509cert: update doc for OpenSSL::X509::Certificate#==
Mention the underlying OpenSSL function. Add a note about the unreliable comparison when called on an incomplete object. Fixes #844
1 parent 7999e1e commit 736af5b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/openssl/ossl_x509cert.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,12 @@ ossl_x509_add_extension(VALUE self, VALUE extension)
671671
*
672672
* Compares the two certificates. Note that this takes into account all fields,
673673
* not just the issuer name and the serial number.
674+
*
675+
* This method uses X509_cmp() from OpenSSL, which compares certificates based
676+
* on their cached DER encodings. The comparison can be unreliable if a
677+
* certificate is incomplete.
678+
*
679+
* See also the man page X509_cmp(3).
674680
*/
675681
static VALUE
676682
ossl_x509_eq(VALUE self, VALUE other)

0 commit comments

Comments
 (0)