Extract function to convert ASN.1 INTEGER object to u_int64_t

This commit is contained in:
Tobias Brunner
2013-05-08 14:53:08 +02:00
parent 4076e3ee91
commit c734c2d875
3 changed files with 28 additions and 23 deletions
+9
View File
@@ -170,6 +170,15 @@ int asn1_parse_algorithmIdentifier(chunk_t blob, int level0, chunk_t *params);
bool asn1_parse_simple_object(chunk_t *object, asn1_t type, u_int level0,
const char* name);
/**
* Converts an ASN.1 INTEGER object to an u_int64_t. If the INTEGER is longer
* than 8 bytes only the 8 LSBs are returned.
*
* @param blob body of an ASN.1 coded integer object
* @return converted integer
*/
u_int64_t asn1_parse_integer_uint64(chunk_t blob);
/**
* Print the value of an ASN.1 simple object
*