summaryrefslogtreecommitdiff
path: root/lib/element.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-09-12 22:32:20 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-09-12 22:45:28 +0200
commit92abf0cd89b512514a18754f913fb8d828ed5c8b (patch)
tree49e92ffbeef0267963f60435b3b77ecab617cf10 /lib/element.c
parentb86e75de8bc3a35620f069b7b00d680284d86eb5 (diff)
downloadlibtasn1-92abf0cd89b512514a18754f913fb8d828ed5c8b.tar.gz
libtasn1-92abf0cd89b512514a18754f913fb8d828ed5c8b.tar.bz2
libtasn1-92abf0cd89b512514a18754f913fb8d828ed5c8b.zip
Added asn1_read_node_value()
Diffstat (limited to 'lib/element.c')
-rw-r--r--lib/element.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/element.c b/lib/element.c
index 70b272b..a0f841f 100644
--- a/lib/element.c
+++ b/lib/element.c
@@ -976,3 +976,22 @@ asn1_read_tag (ASN1_TYPE root, const char *name, int *tagValue,
return ASN1_SUCCESS;
}
+
+/**
+ * asn1_read_node_value:
+ * @node: pointer to a node.
+ * @data: a point to a node_data_struct
+ *
+ * Returns the value a data node inside a ASN1_TYPE structure.
+ * The data returned should be handled as constant values.
+ *
+ * Returns: %ASN1_SUCCESS if the node exists.
+ **/
+asn1_retCode asn1_read_node_value (ASN1_TYPE node, ASN1_DATA_NODE* data)
+{
+ data->name = node->name;
+ data->value = node->value;
+ data->value_len = node->value_len;
+
+ return ASN1_SUCCESS;
+}