asn1: Add helper function to create algorithmIdentifier with parameters

This commit is contained in:
Tobias Brunner
2017-11-08 16:48:10 +01:00
parent 5f7be58177
commit f89348d035
2 changed files with 23 additions and 6 deletions
+13 -4
View File
@@ -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,13 +92,22 @@ 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
*