diff options
-rw-r--r-- | includes/gnutls/x509.h | 2 | ||||
-rw-r--r-- | lib/gnutls_cert.h | 2 | ||||
-rw-r--r-- | lib/x509/extensions.c | 1 | ||||
-rw-r--r-- | lib/x509/x509_write.c | 2 |
4 files changed, 4 insertions, 3 deletions
diff --git a/includes/gnutls/x509.h b/includes/gnutls/x509.h index 2fb4095c78..470d368027 100644 --- a/includes/gnutls/x509.h +++ b/includes/gnutls/x509.h @@ -104,7 +104,7 @@ int gnutls_x509_dn_oid_known(const char* oid); #define GNUTLS_KEY_KEY_CERT_SIGN 4 #define GNUTLS_KEY_CRL_SIGN 2 #define GNUTLS_KEY_ENCIPHER_ONLY 1 -#define GNUTLS_KEY_DECIPHER_ONLY 256 +#define GNUTLS_KEY_DECIPHER_ONLY 32768 int gnutls_x509_crt_get_extension_oid(gnutls_x509_crt cert, int indx, void* oid, size_t * sizeof_oid); diff --git a/lib/gnutls_cert.h b/lib/gnutls_cert.h index 1624433132..ccd8548dca 100644 --- a/lib/gnutls_cert.h +++ b/lib/gnutls_cert.h @@ -23,7 +23,7 @@ #define KEY_KEY_CERT_SIGN 4 #define KEY_CRL_SIGN 2 #define KEY_ENCIPHER_ONLY 1 -#define KEY_DECIPHER_ONLY 256 +#define KEY_DECIPHER_ONLY 32768 typedef struct gnutls_cert { GNUTLS_MPI params[MAX_PUBLIC_PARAMS_SIZE]; /* the size of params depends on the public diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c index 22bf341a36..d290e95f91 100644 --- a/lib/x509/extensions.c +++ b/lib/x509/extensions.c @@ -477,6 +477,7 @@ int _gnutls_x509_ext_gen_keyUsage(uint16 usage, gnutls_datum* der_ext) str[0] = usage & 0xff; str[1] = usage >> 8; + result = asn1_write_value(ext, "", str, 9); if (result != ASN1_SUCCESS) { gnutls_assert(); diff --git a/lib/x509/x509_write.c b/lib/x509/x509_write.c index 196460d500..0bd9e9d9df 100644 --- a/lib/x509/x509_write.c +++ b/lib/x509/x509_write.c @@ -278,7 +278,7 @@ gnutls_datum der_data; /* generate the extension. */ - result = _gnutls_x509_ext_gen_keyUsage( (uint8)usage, &der_data); + result = _gnutls_x509_ext_gen_keyUsage( (uint16)usage, &der_data); if (result < 0) { gnutls_assert(); return result; |