Fixed length of key_usage bitstring to 7 bits

This commit is contained in:
Paul Bakker 2013-08-26 14:12:57 +02:00
parent 1c0e550e21
commit 624d03a3f7

View File

@ -221,7 +221,7 @@ int x509write_csr_set_key_usage( x509_csr *ctx, unsigned char key_usage )
c = buf + 4;
if( ( ret = asn1_write_bitstring( &c, buf, &key_usage, 6 ) ) != 4 )
if( ( ret = asn1_write_bitstring( &c, buf, &key_usage, 7 ) ) != 4 )
return( ret );
ret = x509write_csr_set_extension( ctx, OID_KEY_USAGE,