Cleaner handling of "cnid" in do_x509_check
authorViktor Dukhovni <openssl-users@dukhovni.org>
Wed, 2 Sep 2015 01:59:08 +0000 (21:59 -0400)
committerViktor Dukhovni <openssl-users@dukhovni.org>
Wed, 2 Sep 2015 13:53:44 +0000 (09:53 -0400)
commitfffc2faeb2b5cad4516cc624352d445284aa7522
tree0659e739e3b3962a4eebac9432d7653d7a17be6d
parenta0724ef1c9b9e2090bdd96b784f492b6a3952957
Cleaner handling of "cnid" in do_x509_check

Avoid using cnid = 0, use NID_undef instead, and return early instead
of trying to find an instance of that in the subject DN.

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/x509v3/v3_utl.c