From 039f4068c0e991b79769426486147d7851d5d6fd Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 14 Nov 2018 00:15:33 +0100 Subject: sid: sid_test: add conformance mode imitating MS API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a conformance handler “Con_MS” to achieve a behavior that mimicks that of MS’s implementation bug-for-bug. Aspects of reading and formatting governd by the conformance: - Validation of ident auths, - validation of subauths, - validation of leading zeros in decimal numbers, - zero-padding of hex numbers. --- sid.mli | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sid.mli') diff --git a/sid.mli b/sid.mli index e2c94df..a21c5ec 100644 --- a/sid.mli +++ b/sid.mli @@ -46,6 +46,17 @@ module StringFmt : (** [encode s] convert SID [s] to its string representation. *) end +(** Conversions to and from the {e string format syntax} with permissive + input validation. *) +module MSStringFmt : + sig + val decode : string -> (t, string) result + (** [decode b] parse string buffer [b] into a SID. *) + + val encode : t -> string + (** [encode s] convert SID [s] to its string representation. *) + end + (** Conversion to and from the {e packet representation} (MS-DTYP 2.4.2.2). *) module PacketRep : sig -- cgit v1.2.3