add "generic" format string based encoder and decoder (scan_asn1generic,

fmt_asn1generic, see t10.c for example usage)
add "generic" asn.1 dumper (in t10.c)
fix some read off-by-one errors, minor cleanups
add real OID support
add bitstring support
This commit is contained in:
leitner
2011-04-28 19:50:11 +00:00
parent e90320f819
commit e04ca78ff8
49 changed files with 483 additions and 110 deletions

View File

@@ -1,4 +1,3 @@
#include "asn1.h"
#include "ldap.h"
#include <stdlib.h>
@@ -40,7 +39,7 @@ size_t scan_ldapsearchfilter(const char* src,const char* max,struct Filter** f)
if (tc!=PRIVATE || (tt!=CONSTRUCTED && tag!=7) || tag>9) goto error;
if (!(tmp=scan_asn1length(src+res,max,&len))) goto error;
res+=tmp;
if (src+res+len>max) goto error;
if (src+res+len>=max) goto error;
if (!(*f=malloc(sizeof(struct Filter)))) goto error;
(*f)->next=0;
(*f)->x=0;