diff options
Diffstat (limited to 'scan_asn1INTEGER.c')
-rw-r--r-- | scan_asn1INTEGER.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scan_asn1INTEGER.c b/scan_asn1INTEGER.c new file mode 100644 index 0000000..61d3ac5 --- /dev/null +++ b/scan_asn1INTEGER.c @@ -0,0 +1,12 @@ +#include "asn1.h" + +size_t scan_asn1INTEGER(const char* src,const char* max,signed long* val) { + size_t tmp; + unsigned long tag; + enum asn1_tagclass tc; + enum asn1_tagtype tt; + if ((tmp=scan_asn1int(src,max,&tc,&tt,&tag,val))) + if (tc==UNIVERSAL && tt==PRIMITIVE && tag==INTEGER) + return tmp; + return 0; +} |