From 624d03a3f71d96368d2fd3b27a18326ccdb276b8 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Mon, 26 Aug 2013 14:12:57 +0200
Subject: [PATCH] Fixed length of key_usage bitstring to 7 bits
---
library/x509write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/library/x509write.c b/library/x509write.c
index f609fb454..12cc0e177 100644
--- a/library/x509write.c
+++ b/library/x509write.c
@@ -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,