summaryrefslogtreecommitdiff
path: root/asn1.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2005-11-20 17:56:02 +0100
committerNiels Möller <nisse@lysator.liu.se>2005-11-20 17:56:02 +0100
commit629fd5bd3b8d5501833cd3b6ac9bfd2297be9c6b (patch)
treee36cca5880cbb2ee38f1810b88177be4b2b2bf9c /asn1.h
parent82323812dbf8f9e9e2e815658ba3977256b17016 (diff)
downloadnettle-629fd5bd3b8d5501833cd3b6ac9bfd2297be9c6b.tar.gz
Added name mangling defines, and a few new declarations.
Rev: src/nettle/asn1.h:1.2
Diffstat (limited to 'asn1.h')
-rw-r--r--asn1.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/asn1.h b/asn1.h
index 4c73d046..dde627dc 100644
--- a/asn1.h
+++ b/asn1.h
@@ -28,6 +28,17 @@
#include "nettle-types.h"
+/* Name mangling */
+#define asn1_der_iterator_first nettle_asn1_der_iterator_first
+#define asn1_der_iterator_next nettle_asn1_der_iterator_next
+#define asn1_der_decode_constructed nettle_asn1_der_decode_constructed
+#define asn1_der_decode_constructed_last nettle_asn1_der_decode_constructed_last
+#define asn1_der_decode_bitstring nettle_asn1_der_decode_bitstring
+#define asn1_der_decode_bitstring_last nettle_asn1_der_decode_bitstring_last
+#define asn1_der_get_uint32 nettle_asn1_der_get_uint32
+#define asn1_der_get_bignum nettle_asn1_der_get_bignum
+
+
/* enum asn1_type keeps the class number and the constructive in bits
13-14, and the constructive flag in bit 12. The remaining 14 bits
are the tag (although currently, only tags in the range 0-30 are
@@ -104,6 +115,19 @@ enum asn1_iterator_result
asn1_der_decode_constructed(struct asn1_der_iterator *i,
struct asn1_der_iterator *contents);
+/* For the common case that we have a sequence at the end of the
+ object. Checks that the current object is the final one, and ten
+ reinitialize the iterator to parse its ontents. */
+enum asn1_iterator_result
+asn1_der_decode_constructed_last(struct asn1_der_iterator *i);
+
+enum asn1_iterator_result
+asn1_der_decode_bitstring(struct asn1_der_iterator *i,
+ struct asn1_der_iterator *contents);
+
+enum asn1_iterator_result
+asn1_der_decode_bitstring_last(struct asn1_der_iterator *i);
+
/* All these functions return 1 on success, 0 on failure */
int
asn1_der_get_uint32(struct asn1_der_iterator *i,