[gnutls-devel] GnuTLS | GnuTLS accepts a cert whose basicConstraints.cA==False but keyUsage.keyCertSign is set (#1167)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Jan 27 08:49:07 CET 2021



GOODPWDCETCSZ created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1167



## Description of problem:

GnuTLS accepts a cert whose basicConstraints.cA==False but keyUsage.keyCertSign is set. 

## Version of gnutls used:

3.5.5, 3.6.13

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

Ubuntu x64

## How reproducible:

Steps to Reproduce:

* `certtool --verify --load-ca-certificate ca.pem --infile seed-16s31-206s38.pem`

## Actual results:
```
certtool --verify --load-ca-certificate ./certs_related/ca.pem --infile ./certs/seed-16s31-206s38.pem
Note that no verification profile was selected. In the future the medium profile will be enabled by default.
Use --verify-profile low to apply the default verification of NORMAL priority string.
Loaded CAs (1 available)
	Subject: CN=DT-peace,OU=UNSC-peace,O=UNGA,ST=NYS,C=UN
	Issuer: CN=DT,OU=UNSC,O=UNGA,ST=NYS,C=UN
	Checked against: CN=DT,OU=UNSC,O=UNGA,ST=NYS,C=UN
	Signature algorithm: RSA-SHA256
	Output: Verified. The certificate is trusted. 

Chain verification output: Verified. The certificate is trusted. 
```

## Expected results:
The cert should be rejectd since it has no right (it cA==False) to verify certSign (keyUsage.keyCertSign is set).

## Attachments:

[ca.zip](/uploads/a1b6138e694221150409c508e44dd696/ca.zip)

[seed-16s31-206s38.zip](/uploads/946477b3be76d26aa0f2e62ee26778d2/seed-16s31-206s38.zip)

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1167
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210127/11bc6dd9/attachment-0001.html>


More information about the Gnutls-devel mailing list