Document the invariants for the empty X509_NAME encoding
authorTomas Mraz <tomas@openssl.org>
Mon, 12 Apr 2021 17:22:04 +0000 (19:22 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 14 Apr 2021 07:45:40 +0000 (09:45 +0200)
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/14832)

crypto/x509/x_name.c

index 7b59b71ffb82b8988d11b8c003ddf331f2e3f93b..6e9b46005e728703ec80adbacc9681330cf2ad6c 100644 (file)
@@ -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)