From bedd2e7ccb1595c23e159eaa952ae1b0b5a3d2ad Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 15 Mar 2014 01:49:50 +0100 Subject: Lean and mean initial commit Not much functionality yet --- scan_asn1SET.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scan_asn1SET.c (limited to 'scan_asn1SET.c') diff --git a/scan_asn1SET.c b/scan_asn1SET.c new file mode 100644 index 0000000..7cced52 --- /dev/null +++ b/scan_asn1SET.c @@ -0,0 +1,14 @@ +#include "asn1.h" + +size_t scan_asn1SET(const char* src,const char* max,size_t* len) { + size_t res,tmp; + unsigned long tag; + enum asn1_tagclass tc; + enum asn1_tagtype tt; + if (!(res=scan_asn1tag(src,max,&tc,&tt,&tag))) return 0; + if (!(tmp=scan_asn1length(src+res,max,len))) return 0; + res+=tmp; + if (tc==UNIVERSAL && tt==CONSTRUCTED && tag==SET_OF) + return res; + return 0; +} -- cgit v1.2.3-55-g7522