diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-02-19 14:15:16 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-02-19 14:15:16 +0100 |
commit | a54c484db5cf78797b8db11472b636b95b1055d8 (patch) | |
tree | 757bafe91a05b5e5e6e730769793096346bccba2 | |
parent | 795591a312bebef1b8c0c3d765b0ca5e8407eeda (diff) | |
download | gnutls-a54c484db5cf78797b8db11472b636b95b1055d8.tar.gz |
Allow empty names.
-rw-r--r-- | lib/x509/extensions.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c index 7bd8571bf1..ee9b2d0231 100644 --- a/lib/x509/extensions.c +++ b/lib/x509/extensions.c @@ -829,8 +829,12 @@ _gnutls_write_general_name(ASN1_TYPE ext, const char *ext_name, int result; char name[128]; - if (data == NULL) - return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); + if (data == NULL) { + if (data_size == 0) + return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); + else + data = (void*)""; + } switch (type) { case GNUTLS_SAN_DNSNAME: |