summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-09-18 15:45:50 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-09-18 15:49:27 +0200
commit5addb300c7388a50c53e801b623901ab03f47efa (patch)
tree6cfd2b703b3919a0ded93f88af3d131a43b00578 /src
parent1e3d04bce839540c6a3f8f14c8521d8390042f23 (diff)
downloadlibtasn1-5addb300c7388a50c53e801b623901ab03f47efa.tar.gz
asn1Coding: Allow handling NULL values
Diffstat (limited to 'src')
-rw-r--r--src/asn1Coding.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/asn1Coding.c b/src/asn1Coding.c
index 650e817..d4df593 100644
--- a/src/asn1Coding.c
+++ b/src/asn1Coding.c
@@ -256,7 +256,12 @@ main (int argc, char *argv[])
asn1_result = asn1_create_element (definitions, value, &structure);
}
else
- asn1_result = asn1_write_value (structure, varName, value, 0);
+ {
+ if (strcmp(value, "(NULL)") == 0)
+ asn1_result = asn1_write_value (structure, varName, NULL, 0);
+ else
+ asn1_result = asn1_write_value (structure, varName, value, 0);
+ }
if (asn1_result != ASN1_SUCCESS)
{