directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomi Keinonen (JIRA)" <directory-...@incubator.apache.org>
Subject [jira] Created: (DIRSNICKERS-105) DERBoolean has wrong trueArray
Date Thu, 19 May 2005 09:17:54 GMT
DERBoolean has wrong trueArray
------------------------------

         Key: DIRSNICKERS-105
         URL: http://issues.apache.org/jira/browse/DIRSNICKERS-105
     Project: Directory Snickers
        Type: Bug
  Components: BER Runtime  
    Versions: 0.3.0    
    Reporter: Tomi Keinonen
 Assigned to: Alex Karasulu 
    Priority: Trivial


Class org.apache.asn1.der.DERBoolean has wrong octet value for TRUE. TRUE is encoded as 0x01
which is not correct according to DER specification.

According to "Information technology – ASN.1 encoding rules: Specification of Basic Encoding
Rules (BER),
Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)" (http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf)
page 18:

"11 Restrictions on BER employed by both CER and DER
11.1 Boolean values
If the encoding represents the boolean value TRUE, its single contents octet shall have all
eight bits set to one."

Currently class DERBoolean has values:
	private static final byte[] trueArray  = { (byte)0x01 };
	private static final byte[] falseArray = { (byte)0x00 };

This should be modified to:
	private static final byte[] trueArray  = { (byte)0xff };
	private static final byte[] falseArray = { (byte)0x00 };

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message