Bouncy Castle Cryptography Library 1.85

org.bouncycastle.bcpg.test
Class UserAttributeSubpacketInputStreamTest

java.lang.Object
  extended byorg.bouncycastle.util.test.SimpleTest
      extended byorg.bouncycastle.bcpg.test.AbstractPacketTest
          extended byorg.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).


Nested Class Summary
 
Nested classes inherited from class org.bouncycastle.util.test.SimpleTest
org.bouncycastle.util.test.SimpleTest.TestExceptionOperation
 
Constructor Summary
UserAttributeSubpacketInputStreamTest()
           
 
Method Summary
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
 
Methods inherited from class org.bouncycastle.bcpg.test.AbstractPacketTest
isEncodingEqual, isEncodingEqual, isEncodingEqual, isEncodingEqual, isFalse, isFalse, isNotNull, isNotNull, isNull, isNull
 
Methods inherited from class org.bouncycastle.util.test.SimpleTest
areEqual, areEqual, areEqual, fail, fail, fail, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isTrue, isTrue, perform, runTest, runTest, runTests, runTests, testException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAttributeSubpacketInputStreamTest

public UserAttributeSubpacketInputStreamTest()
Method Detail

getName

public java.lang.String getName()

performTest

public void performTest()
                 throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)

Bouncy Castle Cryptography Library 1.85