Class UserAttributeSubpacketInputStreamTest

java.lang.Object
org.bouncycastle.util.test.SimpleTest
org.bouncycastle.bcpg.test.AbstractPacketTest
org.bouncycastle.bcpg.test.UserAttributeSubpacketInputStreamTest
All Implemented Interfaces:
org.bouncycastle.util.test.Test

public class UserAttributeSubpacketInputStreamTest extends AbstractPacketTest
Regression test for the unbounded user-attribute subpacket allocation: a crafted 4-octet length header must be rejected against the absolute MAX_SUBPACKET_LEN cap before any body buffer is allocated, rather than relying on the StreamUtil.findLimit() hint (which is ~heap-sized for the non-seekable streams used during packet parsing).
  • Constructor Details

    • UserAttributeSubpacketInputStreamTest

      public UserAttributeSubpacketInputStreamTest()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.bouncycastle.util.test.Test
      Specified by:
      getName in class org.bouncycastle.util.test.SimpleTest
    • performTest

      public void performTest() throws Exception
      Specified by:
      performTest in class org.bouncycastle.util.test.SimpleTest
      Throws:
      Exception
    • main

      public static void main(String[] args)