]> git.ipfire.org Git - thirdparty/gnutls.git/commit
x509: Write keyUsage extension with minimal BIT STRING
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 13 May 2021 00:49:20 +0000 (20:49 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 14 May 2021 20:16:03 +0000 (16:16 -0400)
commit87394a055bdd4cfcbdff52d7c0d9d06563fb7bcb
tree12f883bdef799ebfcc7f7c8fe76cf37d7bbfb830
parente899e3200ffb3d7d8958cfa7685052a66ebfbf80
x509: Write keyUsage extension with minimal BIT STRING

Avoid embedding trailing cleared bits in the BIT STRING for the
keyUsage extension.

The overwhelming majority of this changeset is correcting the
artifacts in the test suite, most of which had keyUsage with a
non-minimal encoding.  The only functional code change is in
lib/x509/x509_ext.c.

Closes: #1236
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
31 files changed:
lib/x509/x509_ext.c
tests/cert-tests/data/arb-extensions.csr
tests/cert-tests/data/crq-cert-no-ca-honor.pem
tests/cert-tests/data/inhibit-anypolicy.pem
tests/cert-tests/data/long-dns.pem
tests/cert-tests/data/long-serial.pem
tests/cert-tests/data/template-crq.pem
tests/cert-tests/data/template-date.pem
tests/cert-tests/data/template-dates-after2038.pem
tests/cert-tests/data/template-dn.pem
tests/cert-tests/data/template-generalized.pem
tests/cert-tests/data/template-krb5name.pem
tests/cert-tests/data/template-long-dns-crq.pem
tests/cert-tests/data/template-nc.pem
tests/cert-tests/data/template-othername-xmpp.pem
tests/cert-tests/data/template-othername.pem
tests/cert-tests/data/template-overflow.pem
tests/cert-tests/data/template-overflow2.pem
tests/cert-tests/data/template-rsa-sha3-224.pem
tests/cert-tests/data/template-rsa-sha3-256.pem
tests/cert-tests/data/template-rsa-sha3-384.pem
tests/cert-tests/data/template-rsa-sha3-512.pem
tests/cert-tests/data/template-sgenerate.pem
tests/cert-tests/data/template-test.pem
tests/cert-tests/data/template-tlsfeature.csr
tests/cert-tests/data/template-tlsfeature.pem
tests/cert-tests/data/template-unique.pem
tests/crq_apis.c
tests/crt_apis.c
tests/gnutls_x509_crq_sign.c
tests/gnutls_x509_crt_sign.c