Hide Forgot
Description of problem: the asn1 decoder only accepts (0,1) for Boolean, but the ITU x.690 spec in chapter 8.2 defines Boolean in BER 8.2.2 If the boolean value is: FALSE the octet shall be zero. If the boolean value is TRUE the octet shall have any non-zero value, as a sender's option. EXAMPLE If of type BOOLEAN, the value TRUE can be encoded as: Boolean Length Contents 01 01 FF Version-Release number of selected component (if applicable): 0.1.2 How reproducible: always Steps to Reproduce: 1. encode a ber message with the openldap function ber_printf(ber,"b",1); It is encoded as 0xff 2. run python client decoding the message, an exception is raised: pyasn1.type.error.ValueConstraintError: ConstraintsIntersection(ConstraintsIntersection(), SingleValueConstraint(0, 1)) failed at: "SingleValueConstraint(0, 1) failed at: "-1"" 3. Actual results: Expected results: Additional info:
Created attachment 801739 [details] pcap shwoing the encoded value
Created attachment 801742 [details] wireshark highlighting the field
Created attachment 801850 [details] C program to write out a BER file using openldap
Created attachment 801851 [details] python-pyasn1 script to read the ber file This demonstrates the bug as reported
This was fixed in 0.1.4 so I'll need to consider updating the package version in F-18. Is this work you're doing going to land in F-18?
I was using the python client to test a feature which will be in 389 version 1.3.2, so this would be in F20 I think. I didn't see that it was fixed, is there a bz for that fix ?
F-20 has 0.1.7 and my testing confirms it works as expected. The upstream 0.1.4 changelog has this, which I suspect is what fixed things: - Fix to BER Boolean decoder that allows other pre-computed values besides 0 and 1
I'm going to close this since it works in F-19 and 20.