diff options
author | Simon Rettberg | 2014-03-18 19:34:04 +0100 |
---|---|---|
committer | Simon Rettberg | 2014-03-18 19:34:04 +0100 |
commit | 9defb2a22ceaeccb9bdd25e9ac65ee997a077c36 (patch) | |
tree | c94357531eb544c467ed754645321158d51d5f37 | |
parent | clan config (for address sanitizer use) (diff) | |
download | ldadp-9defb2a22ceaeccb9bdd25e9ac65ee997a077c36.tar.gz ldadp-9defb2a22ceaeccb9bdd25e9ac65ee997a077c36.tar.xz ldadp-9defb2a22ceaeccb9bdd25e9ac65ee997a077c36.zip |
(Forgot commit) Add fmt_ldapbindrequeststring that takes struct string as arguments
-rw-r--r-- | fmt_ldapbindrequest.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fmt_ldapbindrequest.c b/fmt_ldapbindrequest.c index 5e92bf2..b95c5f4 100644 --- a/fmt_ldapbindrequest.c +++ b/fmt_ldapbindrequest.c @@ -16,3 +16,15 @@ size_t fmt_ldapbindrequest(char* dest,long version,const char* name,const char* if (add_of(sum,sum,l)) return (size_t)-1; if (dest) dest+=l; return sum; } + +size_t fmt_ldapbindrequeststring(char* dest,long version,const struct string* name,const struct string* simple) { + size_t l,sum; + sum=l=fmt_asn1INTEGER(dest,version); + if (dest) dest+=l; + l=fmt_asn1OCTETSTRING(dest,name->s,name->l); + if (add_of(sum,sum,l)) return (size_t)-1; if (dest) dest+=l; +// sum+=l; if (dest) dest+=l; + l=fmt_asn1string(dest,PRIVATE,PRIMITIVE,0,simple->s,simple->l); + if (add_of(sum,sum,l)) return (size_t)-1; if (dest) dest+=l; + return sum; +} |