true is encoded as 0xff, not 1 (thanks Christian Ullrich)
This commit is contained in:
@@ -8,7 +8,7 @@ size_t scan_asn1BOOLEAN(const char* src,const char* max,unsigned long* val) {
|
||||
long ltmp;
|
||||
if ((tmp=scan_asn1int(src,max,&tc,&tt,&tag,<mp)))
|
||||
if (tc==UNIVERSAL && tt==PRIMITIVE && tag==BOOLEAN) {
|
||||
if (ltmp!=0 && ltmp!=1) return 0;
|
||||
if (ltmp!=0 && ltmp!=255) return 0;
|
||||
*val=(unsigned long)ltmp;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user