Files
mars-tinyldap/asn1dump.c
leitner d184c99cf9 add asn1dump and support more OIDs
expand fmt_asn1generic
2011-09-27 20:07:13 +00:00

24 lines
354 B
C

#include <stdio.h>
#include <byte.h>
#include <stdlib.h>
#include "asn1.h"
#include "mmap.h"
#include "printasn1.c"
int main(int argc,char* argv[]) {
char* buf;
size_t l;
if (argc<2) {
printf("usage: asn1dump filename\n");
return 0;
}
buf=mmap_read(argv[1],&l);
if (buf) {
printasn1(buf,buf+l);
return 0;
}
return 1;
}