[jboss-jira] [JBoss JIRA] (ELY-1396) Ensure the length of an ASN.1 SET is calculated properly when it has an element whose length exceeds 127 bytes

Farah Juma (JIRA) issues at jboss.org
Tue Oct 10 17:30:00 EDT 2017


Farah Juma created ELY-1396:
-------------------------------

             Summary: Ensure the length of an ASN.1 SET is calculated properly when it has an element whose length exceeds 127 bytes
                 Key: ELY-1396
                 URL: https://issues.jboss.org/browse/ELY-1396
             Project: WildFly Elytron
          Issue Type: Bug
          Components: Utils
            Reporter: Farah Juma
            Assignee: Farah Juma


When an element's length is greater than 127 bytes, {{DEREncoder#writeLength}} successfully writes the length octets using the long form where bit 8 of first octet has value "1" and bits 7-1 give the number of additional length octets and the second and following octets give the length. However, the value returned by {{writeLength}} in this case is currently just the number of additional length octets. When such an element is part of a SET, this results in the wrong accumulated length for the SET. The value returned by {{writeLength}} should also include the first octet. 



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list