Class ArmoredOutputStreamHeaderInjectionTest

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

public class ArmoredOutputStreamHeaderInjectionTest extends AbstractPacketTest
Regression test for ASCII-armor header injection via a bare carriage return. Armor header sanitization split and rejected on LF only, so a CR embedded in a header value (e.g. a parsed User-ID re-armored as a Comment) survived into a single header line and could forge an armor boundary or an extra header for a reader that treats CR as end-of-line.
  • Constructor Details

    • ArmoredOutputStreamHeaderInjectionTest

      public ArmoredOutputStreamHeaderInjectionTest()
  • 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)