GnuTLS accepts a v1 certificate which has issuer unique ID

Description of problem:

As for a certificate which has issuer unique ID, its version should be v2 or v3 because v1 certificates have no the field UID.

Version of gnutls used:

v3.3.25, v3.4.16, and v3.5.5

Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)

Ubuntu 1604 x64

How reproducible:

Steps to Reproduce:

  • one certtool --verify --load-ca-certificate=basicCA.pem < 2.pem

Actual results:

The certificate is trusted.

Expected results:

Reject this invalid certificate

test_cases.zip