From: Tomas Mraz Date: Mon, 12 Apr 2021 17:22:04 +0000 (+0200) Subject: Document the invariants for the empty X509_NAME encoding X-Git-Tag: openssl-3.0.0-alpha15~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=456541f0b7c7a4ca8c1c99740fff1bedcc4c9244;p=thirdparty%2Fopenssl.git Document the invariants for the empty X509_NAME encoding Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/14832) --- diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index 7b59b71ffb8..6e9b46005e7 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c @@ -298,6 +298,7 @@ static int x509_name_ex_print(BIO *out, const ASN1_VALUE **pval, * comparison of Name structures can be rapidly performed by just using * memcmp() of the canonical encoding. By omitting the leading SEQUENCE name * constraints of type dirName can also be checked with a simple memcmp(). + * NOTE: For empty X509_NAME (NULL-DN), canon_enclen == 0 && canon_enc == NULL */ static int x509_name_canon(X509_NAME *a)