GNU Libtasn1 NEWS -*- outline -*-
-* Noteworthy changes in release 2.14 (unreleased) [stable]
+* Noteworthy changes in release 3.0 (unreleased) [stable]
+- Added asn1_read_node_value() to obtain a node's value.
* Noteworthy changes in release 2.13 (2012-05-31) [stable]
- Updated fix for DER decoding issue to not depend on specific compilers.
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;
+}
typedef node_asn *ASN1_TYPE;
-
/* maximum number of characters of a name */
/* inside a file with ASN1 definitons */
#define ASN1_MAX_NAME_SIZE 128
};
typedef struct static_struct_asn ASN1_ARRAY_TYPE;
+ struct node_data_struct
+ {
+ const char *name; /* Node name */
+ const void *value; /* Node value */
+ unsigned int value_len; /* Node value size */
+ unsigned int vals[4]; /* reserved for future use */
+ };
+ typedef struct node_data_struct ASN1_DATA_NODE;
+
/***********************************/
/* Fixed constants */
/***********************************/
void *ivalue, int *len);
extern ASN1_API asn1_retCode
+ asn1_read_node_value (ASN1_TYPE node, ASN1_DATA_NODE* data);
+
+ extern ASN1_API asn1_retCode
asn1_number_of_elements (ASN1_TYPE element, const char *name, int *num);
extern ASN1_API asn1_retCode