summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-02-19 15:01:09 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-02-19 15:01:09 +0100
commitb4831cf689141846ab4cdf00eba1e25f58de9bd3 (patch)
tree89fb8ddb6817bddd73076bc6d71029006529620a
parentbf466a2b46ffb28bfd4325e603216458728a44cc (diff)
downloadgnutls-b4831cf689141846ab4cdf00eba1e25f58de9bd3.tar.gz
corrected empty name check
-rw-r--r--lib/x509/extensions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c
index ee9b2d0231..41e2f6bc88 100644
--- a/lib/x509/extensions.c
+++ b/lib/x509/extensions.c
@@ -831,9 +831,9 @@ _gnutls_write_general_name(ASN1_TYPE ext, const char *ext_name,
if (data == NULL) {
if (data_size == 0)
- return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
- else
data = (void*)"";
+ else
+ return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
}
switch (type) {