Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.85
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.asn1
Class ASN1TimeFormatTest

    java.lang.Object
      junit.framework.Assert
          junit.framework.TestCase
              org.bouncycastle.asn1.ASN1TimeFormatTest

All Implemented Interfaces:
  junit.framework.Test

public class ASN1TimeFormatTest
extends junit.framework.TestCase

White-box tests for `ASN1TimeFormat`, the strict structural validator for UTCTime / GeneralizedTime content. Lives in to reach the package-private helper.

The "currently accepted but bogus" cases use the exact content bytes from the fuzzing report (github ASN.1 TIME parsing): values BC parses today and either turns into a nonsensical Date or fails on . The validator must reject all of them while still accepting the legal lenient forms BC is expected to read.

Constructor Summary
`ASN1TimeFormatTest()`

Method Summary
`void` | `testInvalidGeneralizedTimeFieldRanges()`
`void` | `testInvalidGeneralizedTimeStructure()`
`void` | `testInvalidUTCTimeFieldRanges()`
`void` | `testInvalidUTCTimeStructure()`
`void` | `testRejectsReportedCorpusContent()` Exact content octets (tag/length stripped) of inputs from the fuzzing report that BC parses today; every one must now be rejected.
`void` | `testValidGeneralizedTime()`
`void` | `testValidUTCTime()`

Methods inherited from class junit.framework.TestCase
`countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString`

Methods inherited from class junit.framework.Assert
`assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ASN1TimeFormatTest

    public ASN1TimeFormatTest()

Method Detail

### testValidUTCTime

    public void testValidUTCTime()

### testInvalidUTCTimeFieldRanges

    public void testInvalidUTCTimeFieldRanges()

### testInvalidUTCTimeStructure

    public void testInvalidUTCTimeStructure()

### testValidGeneralizedTime

    public void testValidGeneralizedTime()

### testInvalidGeneralizedTimeFieldRanges

    public void testInvalidGeneralizedTimeFieldRanges()

### testInvalidGeneralizedTimeStructure

    public void testInvalidGeneralizedTimeStructure()

### testRejectsReportedCorpusContent

    public void testRejectsReportedCorpusContent()

  Exact content octets (tag/length stripped) of inputs from the fuzzing report that BC parses today; every one must now be rejected.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.85
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD