Fixed length of key_usage bitstring to 7 bits
diff --git a/library/x509write.c b/library/x509write.c
index f609fb4..12cc0e1 100644
--- a/library/x509write.c
+++ b/library/x509write.c
@@ -221,7 +221,7 @@
 
     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,