summaryrefslogtreecommitdiff
path: root/src/libstrongswan/asn1/asn1.h
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2009-10-21 11:14:02 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2009-10-21 11:14:02 +0000
commit7410d3c6d6a9a1cd7aa55083c938946af6ff9498 (patch)
tree3291beffa55649f9be28b4a98a7d503d334fbcf2 /src/libstrongswan/asn1/asn1.h
parent41787e147279ff0695e9d759487266a60b80867b (diff)
downloadvyos-strongswan-7410d3c6d6a9a1cd7aa55083c938946af6ff9498.tar.gz
vyos-strongswan-7410d3c6d6a9a1cd7aa55083c938946af6ff9498.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.3.4)
Diffstat (limited to 'src/libstrongswan/asn1/asn1.h')
-rw-r--r--src/libstrongswan/asn1/asn1.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libstrongswan/asn1/asn1.h b/src/libstrongswan/asn1/asn1.h
index 6a2b594c0..8072d62d6 100644
--- a/src/libstrongswan/asn1/asn1.h
+++ b/src/libstrongswan/asn1/asn1.h
@@ -74,7 +74,9 @@ typedef enum {
ASN1_CONTEXT_C_2 = 0xA2,
ASN1_CONTEXT_C_3 = 0xA3,
ASN1_CONTEXT_C_4 = 0xA4,
- ASN1_CONTEXT_C_5 = 0xA5
+ ASN1_CONTEXT_C_5 = 0xA5,
+
+ ASN1_INVALID = 0x100,
} asn1_t;
#define ASN1_INVALID_LENGTH 0xffffffff
@@ -123,6 +125,15 @@ chunk_t asn1_build_known_oid(int n);
size_t asn1_length(chunk_t *blob);
/**
+ * Unwrap the inner content of an ASN.1 type/length wrapped object.
+ *
+ * @param blob blob to parse header from, moved behind parsed content
+ * @param content inner content
+ * @return parsed type, ASN1_INVALID if length parsing failed
+ */
+int asn1_unwrap(chunk_t *blob, chunk_t *content);
+
+/**
* Parses an ASN.1 algorithmIdentifier object
*
* @param blob ASN.1 coded blob