Closed SilleBille closed 4 years ago
This issue was migrated from Pagure Issue #3079.Originally filed by ftweedal on 2018-11-11
When reading a DerValue as an OCTET STRING via getOctetString(), if the length of the OCTET STRING is zero an exception is thrown:
DerValue
getOctetString()
java.io.IOException: short read on DerValue buffer
The following program reproduces the issue:
import java.io.IOException; import netscape.security.util.DerValue; class DerTest { public static void main(String[] args) { byte[] bytes = { 0x04, 0x00 }; try { DerValue derVal = new DerValue(bytes); System.out.println(derVal.getOctetString()); } catch (IOException e) { e.printStackTrace(); } } }
Posted by ftweedal on 2018-11-11:
PR: https://github.com/dogtagpki/pki/pull/103
This issue was migrated from Pagure Issue #3079.Originally filed by ftweedal on 2018-11-11
When reading a
DerValue
as an OCTET STRING viagetOctetString()
, if the length of the OCTET STRING is zero an exception is thrown:The following program reproduces the issue: