Class ExplicitKeySignatureTrustEngineTest

java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.xmlsec.signature.support.impl.ExplicitKeySignatureTrustEngineTest

public class ExplicitKeySignatureTrustEngineTest extends org.opensaml.core.testing.XMLObjectBaseTestCase
Test explicit key signature trust engine.
  • Field Details

  • Constructor Details

    • ExplicitKeySignatureTrustEngineTest

      public ExplicitKeySignatureTrustEngineTest()
      Constructor.
  • Method Details

    • setUp

      @BeforeMethod protected void setUp() throws Exception
      Throws:
      Exception
    • testSuccess

      public void testSuccess() throws SecurityException
      Test valid signature.
      Throws:
      SecurityException - ...
    • testUntrustedCredential

      public void testUntrustedCredential() throws SecurityException
      Test valid signature, untrusted signing credential.
      Throws:
      SecurityException - ...
    • testInvalidSignature

      public void testInvalidSignature() throws SecurityException
      Test invalid signature, trusted signing credential.
      Throws:
      SecurityException - ...
    • testWhitelistedAlgorithms

      public void testWhitelistedAlgorithms() throws SecurityException
      Test whitelisted signature and digest method algorithm URIs.
      Throws:
      SecurityException - ...
    • testBlacklistedSignatureAlgorithm

      public void testBlacklistedSignatureAlgorithm() throws SecurityException
      Test blacklisted signature method algorithm URI.
      Throws:
      SecurityException - ...
    • testBlacklistedDigestAlgorithm

      public void testBlacklistedDigestAlgorithm() throws SecurityException
      Test blacklisted digest method algorithm URI.
      Throws:
      SecurityException - ...
    • testRawSuccess

      public void testRawSuccess() throws SecurityException
      Test valid raw signature, trusted signing credential.
      Throws:
      SecurityException - ...
    • testRawUntrustedCredential

      public void testRawUntrustedCredential() throws SecurityException
      Test valid raw signature, untrusted signing credential.
      Throws:
      SecurityException - ...
    • testRawInvalidSignature

      public void testRawInvalidSignature() throws SecurityException
      Test invalid raw signature, trusted signing credential.
      Throws:
      SecurityException - ...
    • testRawWhitelistedAlgorithm

      public void testRawWhitelistedAlgorithm() throws SecurityException
      Test valid raw signature with whitelisted signature algorithm.
      Throws:
      SecurityException - ...
    • testRawBlacklistedAlgorithm

      public void testRawBlacklistedAlgorithm() throws SecurityException
      Test valid raw signature with whitelisted signature algorithm.
      Throws:
      SecurityException - ...
    • getValidSignedObject

      protected SignableXMLObject getValidSignedObject()
      Get a signed object containing the signature to be validated.
      Returns:
      a signed object
    • getInvalidSignedObject

      protected SignableXMLObject getInvalidSignedObject()
      Get a signed object containing the signature to be validated. Signature should be invalid when valid (i.e. signed content modified, etc ).
      Returns:
      a signed object, with invalid signature
    • buildSignedObject

      protected SignableXMLObject buildSignedObject() throws SignatureException
      Build a signed object.
      Returns:
      a signed object
      Throws:
      SignatureException - ...