summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fmt_ldapbindrequest.c12
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;
+}