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