summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-11-24 16:45:23 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-11-24 16:45:23 +0100
commit87eaca2a83999caa575df98a7d7e483251c361ee (patch)
tree772d63ea7ff39acb53baa50e89ac1d0c2fec99f9 /lib
parent8cd1f611d962eb62db6b5beb5b395597ce463110 (diff)
downloadlibtasn1-87eaca2a83999caa575df98a7d7e483251c361ee.tar.gz
libtasn1-87eaca2a83999caa575df98a7d7e483251c361ee.tar.bz2
libtasn1-87eaca2a83999caa575df98a7d7e483251c361ee.zip
simplified
Diffstat (limited to 'lib')
-rw-r--r--lib/element.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/element.c b/lib/element.c
index 2c761c5..a49758b 100644
--- a/lib/element.c
+++ b/lib/element.c
@@ -389,7 +389,6 @@ asn1_write_value (asn1_node node_root, const char *name,
memcpy (value_temp, value, len);
}
-
if (value_temp[0] & 0x80)
negative = 1;
else
@@ -501,12 +500,12 @@ asn1_write_value (asn1_node node_root, const char *name,
break;
case ASN1_ETYPE_UTC_TIME:
{
- if (_asn1_strlen (value) < 11)
+ if (len < 11)
return ASN1_VALUE_NOT_VALID;
for (k = 0; k < 10; k++)
if (!isdigit (value[k]))
return ASN1_VALUE_NOT_VALID;
- switch (_asn1_strlen (value))
+ switch (len)
{
case 11:
if (value[10] != 'Z')
@@ -536,12 +535,12 @@ asn1_write_value (asn1_node node_root, const char *name,
default:
return ASN1_VALUE_NOT_FOUND;
}
- _asn1_set_value (node, value, _asn1_strlen (value));
+ _asn1_set_value (node, value, len);
}
break;
case ASN1_ETYPE_GENERALIZED_TIME:
if (value)
- _asn1_set_value (node, value, _asn1_strlen (value));
+ _asn1_set_value (node, value, len);
break;
case ASN1_ETYPE_OCTET_STRING:
case ASN1_ETYPE_GENERALSTRING: