summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-12-19 16:26:15 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-12-19 16:26:15 +0000
commit6dc70fda9c0e492ac8bfd318f7f4941df9291c62 (patch)
tree1c95f0bfdcd263936651ff0f30c20881c7e3ed63
parente9b83b81236e21bedb5293614e671cc0c75f4f57 (diff)
downloadgnutls-6dc70fda9c0e492ac8bfd318f7f4941df9291c62.tar.gz
*** empty log message ***
-rw-r--r--includes/gnutls/x509.h2
-rw-r--r--lib/gnutls_cert.h2
-rw-r--r--lib/x509/extensions.c1
-rw-r--r--lib/x509/x509_write.c2
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;