summaryrefslogblamecommitdiffstats
path: root/scan_asn1SEQUENCE.c
blob: 41bdb4b465bf3c58184427ccdd157e15beb2759b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                       
#include "asn1.h"

size_t scan_asn1SEQUENCE(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==SEQUENCE_OF)
    return res;
  return 0;
}