Class NameConstraintsTest


  • public class NameConstraintsTest
    extends Object
    Tests the handling of NameConstraints with TrustAnchors in the Merlin, MerlinAKI, and CertificateStore crypto implementations. Specifically tests the following:
    • That when Name Constraints are extracted from a certificate they are correctly decoded into a SEQUENCE
    • That when the new property org.apache.wss4j.crypto.merlin.cert.provider.nameconstraints is set to true on the Merlin and MerlinAKI implementations the Trust Anchors constructed for path validation have the Name Constraints added
    • That when the above property is not set, the Trust Anchors have null Name Constraints added
    • Constructor Detail

      • NameConstraintsTest

        public NameConstraintsTest()
    • Method Detail

      • testNameConstraints

        @Test
        public void testNameConstraints()
                                 throws Exception
        Throws:
        Exception
      • testNameConstraintsWithKeyStoreUsingMerlin

        @Test
        public void testNameConstraintsWithKeyStoreUsingMerlin()
                                                        throws Exception
        Throws:
        Exception
      • testNameConstraintsWithTrustStoreUsingMerlin

        @Test
        public void testNameConstraintsWithTrustStoreUsingMerlin()
                                                          throws Exception
        Throws:
        Exception
      • testNameConstraintsWithKeyStoreUsingMerlinAki

        @Test
        public void testNameConstraintsWithKeyStoreUsingMerlinAki()
                                                           throws Exception
        Throws:
        Exception
      • testNameConstraintsWithTrustStoreUsingMerlinAki

        @Test
        public void testNameConstraintsWithTrustStoreUsingMerlinAki()
                                                             throws Exception
        Throws:
        Exception
      • testNameConstraintsWithKeyStoreUsingMerlinBc

        @Test
        public void testNameConstraintsWithKeyStoreUsingMerlinBc()
                                                          throws Exception
        Throws:
        Exception
      • testNameConstraintsWithTrustStoreUsingMerlinBc

        @Test
        public void testNameConstraintsWithTrustStoreUsingMerlinBc()
                                                            throws Exception
        Throws:
        Exception
      • testNameConstraintsWithKeyStoreUsingMerlinAkiBc

        @Test
        public void testNameConstraintsWithKeyStoreUsingMerlinAkiBc()
                                                             throws Exception
        Throws:
        Exception
      • testNameConstraintsWithTrustStoreUsingMerlinAkiBc

        @Test
        public void testNameConstraintsWithTrustStoreUsingMerlinAkiBc()
                                                               throws Exception
        Throws:
        Exception
      • testNameConstraintsWithKeyStoreUsingMerlinBreaking

        @Test
        public void testNameConstraintsWithKeyStoreUsingMerlinBreaking()
                                                                throws Exception
        Throws:
        Exception
      • testNameConstraintsWithKeyStoreUsingMerlinAkiBreaking

        @Test
        public void testNameConstraintsWithKeyStoreUsingMerlinAkiBreaking()
                                                                   throws Exception
        Throws:
        Exception
      • testNameConstraintsUsingCertificateStore

        @Test
        public void testNameConstraintsUsingCertificateStore()
                                                      throws Exception
        Throws:
        Exception