summaryrefslogtreecommitdiffstats
path: root/asn1.h
diff options
context:
space:
mode:
authorSimon Rettberg2017-04-21 16:31:06 +0200
committerSimon Rettberg2017-04-21 16:31:06 +0200
commitb61176f17b59a94750dff1f959231dadc4e6078a (patch)
tree88ee419323ba332a1dd06c5aa801c87f59b36bb3 /asn1.h
parentldadp.h: Add missing SearchRequestReference opcode (diff)
downloadldadp-b61176f17b59a94750dff1f959231dadc4e6078a.tar.gz
ldadp-b61176f17b59a94750dff1f959231dadc4e6078a.tar.xz
ldadp-b61176f17b59a94750dff1f959231dadc4e6078a.zip
Update ldap/asn1/... files with current tinyldap
Diffstat (limited to 'asn1.h')
-rw-r--r--asn1.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/asn1.h b/asn1.h
index 6c367dc..f74556e 100644
--- a/asn1.h
+++ b/asn1.h
@@ -159,8 +159,8 @@ struct string {
};
struct oid {
- unsigned long l;
- unsigned long* a;
+ size_t l;
+ size_t* a;
};
enum x509_oid {
@@ -208,10 +208,12 @@ size_t lookupoid(const char* oid,size_t l);
size_t scan_asn1generic(const char* src,const char* max,const char* fmt,...);
size_t fmt_asn1generic(char* dest,const char* fmt,...);
/* the format string works like this:
- * 'i' next argument is a long* (scan) or unsigned long (fmt)
+ * 'i' parse INTEGER; next argument is a long* (scan) or unsigned long (fmt)
+ * 'B' parse BOOLEAN; next argument is an int* (scan) or int (fmt)
* '*' (fmt only) next argument is an unsigned long, tag type is set to APPLICATION and tag is set to that argument
* '*' (scan only) next argument is an unsigned long*; for next tag, expect tag type to be APPLICATION and write tag to this unsigned long*
* 'b' next argument is a struct string* but the length l in it is in bits, not bytes; if the length is not a multiple of 8, the unused bits are at the end of the last byte in the string
+ * 'I' (fmt only) next argument is struct string *, send as BIT_STRING
* 'S' (fmt only) next argument is struct string *, send as OCTET_STRING
* 's' (fmt only) next argument is const char*, use strlen and send as OCTET_STRING
* 's' (scan only) next argument is struct string*, parse OCTET_STRING into it