diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-06-04 14:26:35 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-06-04 14:26:41 +0200 |
commit | dee899dd68f595549493d8929478fd298e115ade (patch) | |
tree | f9652cf71c41c39d26a4d7b38781342fd3df2bea /lib/element.c | |
parent | 4010bb04588fca86a9f6d683b637c05b4cec24e0 (diff) | |
download | libtasn1-dee899dd68f595549493d8929478fd298e115ade.tar.gz libtasn1-dee899dd68f595549493d8929478fd298e115ade.tar.bz2 libtasn1-dee899dd68f595549493d8929478fd298e115ade.zip |
asn1_read_value() and friends understand the ?CURRENT keyword.
That keyword allows to specify the current element if the given
node is a node in a sequence or set.
Diffstat (limited to 'lib/element.c')
-rw-r--r-- | lib/element.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/element.c b/lib/element.c index c2b7107..b45c3ec 100644 --- a/lib/element.c +++ b/lib/element.c @@ -676,7 +676,9 @@ asn1_write_value (asn1_node node_root, const char *name, * %ASN1_ELEMENT_NOT_FOUND, it means that this element wasn't present * in the der encoding that created the structure. The first element * of a SEQUENCE_OF or SET_OF is named "?1". The second one "?2" and - * so on. + * so on. If the @root provided is a node to specific sequence element, + * then the keyword "?CURRENT" is also acceptable and indicates the + * current sequence element of this node. * * Note that there can be valid values with length zero. In these case * this function will succeed and @len will be zero. @@ -741,12 +743,14 @@ asn1_read_value (asn1_node root, const char *name, void *ivalue, int *len) * holds the sizeof value. * @etype: The type of the value read (ASN1_ETYPE) * - * Returns the value of one element inside a structure. + * Returns the type and value of one element inside a structure. * If an element is OPTIONAL and this returns * %ASN1_ELEMENT_NOT_FOUND, it means that this element wasn't present * in the der encoding that created the structure. The first element * of a SEQUENCE_OF or SET_OF is named "?1". The second one "?2" and - * so on. + * so on. If the @root provided is a node to specific sequence element, + * then the keyword "?CURRENT" is also acceptable and indicates the + * current sequence element of this node. * * Note that there can be valid values with length zero. In these case * this function will succeed and @len will be zero. |