summaryrefslogtreecommitdiff
path: root/src/libstrongswan/asn1/asn1.h
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2017-11-21 10:22:31 +0100
committerYves-Alexis Perez <corsac@corsac.net>2017-11-21 10:22:31 +0100
commite1d78dc2faaa06e7c3f71ef674a71e4de2f0758e (patch)
treeae0c8b5f4cd8289d0797882ea18969f33ea59a1e /src/libstrongswan/asn1/asn1.h
parent11d6b62db969bdd808d0f56706cb18f113927a31 (diff)
downloadvyos-strongswan-e1d78dc2faaa06e7c3f71ef674a71e4de2f0758e.tar.gz
vyos-strongswan-e1d78dc2faaa06e7c3f71ef674a71e4de2f0758e.zip
New upstream version 5.6.1
Diffstat (limited to 'src/libstrongswan/asn1/asn1.h')
-rw-r--r--src/libstrongswan/asn1/asn1.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/libstrongswan/asn1/asn1.h b/src/libstrongswan/asn1/asn1.h
index f0b3e17e8..3c7389e5c 100644
--- a/src/libstrongswan/asn1/asn1.h
+++ b/src/libstrongswan/asn1/asn1.h
@@ -1,8 +1,8 @@
/*
+ * Copyright (C) 2011-2017 Tobias Brunner
* Copyright (C) 2006 Martin Will
* Copyright (C) 2000-2008 Andreas Steffen
- *
- * Hochschule fuer Technik Rapperswil
+ * HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -92,14 +92,23 @@ extern const chunk_t ASN1_INTEGER_2;
/** Some ASN.1 analysis functions */
/**
- * Build an algorithmIdentifier from a known OID.
+ * Build an algorithmIdentifier from a known OID with empty parameters.
*
* @param oid known OID index
- * @return body of the corresponding OID, allocated
+ * @return body of the corresponding ASN.1 structure, allocated
*/
chunk_t asn1_algorithmIdentifier(int oid);
/**
+ * Build an algorithmIdentifier from a known OID and the given prameters.
+ *
+ * @param oid known OID index
+ * @param params parameters to encode in the algorithmIdentifier (adopted)
+ * @return body of the corresponding ASN.1 structure, allocated
+ */
+chunk_t asn1_algorithmIdentifier_params(int oid, chunk_t params);
+
+/**
* Converts an ASN.1 OID into a known OID index
*
* @param object body of an OID
@@ -181,6 +190,14 @@ bool asn1_parse_simple_object(chunk_t *object, asn1_t type, u_int level0,
uint64_t asn1_parse_integer_uint64(chunk_t blob);
/**
+ * Converts an uint64_t to an ASN.1 INTEGER object.
+ *
+ * @param val integer to convert
+ * @return body of an ASN.1 coded integer object
+ */
+chunk_t asn1_integer_from_uint64(uint64_t val);
+
+/**
* Print the value of an ASN.1 simple object
*
* @param object ASN.1 object to be printed