blob: 36347cc7b3c02c9a37a4bb4a303c8280f29a84c1 (
plain) (
tree)
|
|
#include "asn1.h"
size_t scan_asn1ENUMERATED(const char* src,const char* max,unsigned long* val) {
size_t tmp;
unsigned long tag;
enum asn1_tagclass tc;
enum asn1_tagtype tt;
long ltmp;
if ((tmp=scan_asn1int(src,max,&tc,&tt,&tag,<mp)))
if (tc==UNIVERSAL && tt==PRIMITIVE && tag==ENUMERATED) {
*val=(unsigned long)ltmp;
return tmp;
}
return 0;
}
|