From 9d26f044a34bbc53a7621c7343cdcbbc752f99ac Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 9 Oct 2004 23:58:11 +0000 Subject: r2883: set BOOL to the internal values not the wire ones metze (This used to be commit ad7b0385cfdb989d69a5c42c21fdaf8cd816999e) --- source4/libcli/util/asn1.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source4/libcli') diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c index 138ae930e3..15d9243acd 100644 --- a/source4/libcli/util/asn1.c +++ b/source4/libcli/util/asn1.c @@ -241,8 +241,14 @@ BOOL asn1_write_BOOLEAN(ASN1_DATA *data, BOOL v) BOOL asn1_read_BOOLEAN(ASN1_DATA *data, BOOL *v) { + uint8_t tmp = 0; asn1_start_tag(data, ASN1_BOOLEAN); - asn1_read_uint8(data, (uint8 *)v); + asn1_read_uint8(data, &tmp); + if (tmp == 0xFF) { + *v = True; + } else { + *v = False; + } asn1_end_tag(data); return !data->has_error; } -- cgit