Class DecryptionSignedContentTest


  • public class DecryptionSignedContentTest
    extends org.opensaml.core.xml.XMLObjectBaseTestCase
    Test decryption of signed content.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolver encKeyResolver
      Resolver for the data encryption key.
      private org.opensaml.xmlsec.encryption.support.DataEncryptionParameters encParams
      The data encryption parameters object.
      private String idValue
      The ID value used as the signature Reference URI attribute value, set on root SimpleXMLObject.
      private org.opensaml.security.credential.Credential signingCredential
      Credential used to sign and verify.
      • Fields inherited from class org.opensaml.core.xml.XMLObjectBaseTestCase

        builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
    • Field Detail

      • signingCredential

        private org.opensaml.security.credential.Credential signingCredential
        Credential used to sign and verify.
      • encParams

        private org.opensaml.xmlsec.encryption.support.DataEncryptionParameters encParams
        The data encryption parameters object.
      • encKeyResolver

        private org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolver encKeyResolver
        Resolver for the data encryption key.
      • idValue

        private String idValue
        The ID value used as the signature Reference URI attribute value, set on root SimpleXMLObject.
    • Constructor Detail

      • DecryptionSignedContentTest

        public DecryptionSignedContentTest()
    • Method Detail

      • testDecryptAndVerifySignedElement

        public void testDecryptAndVerifySignedElement()
                                               throws org.opensaml.core.xml.io.MarshallingException,
                                                      org.opensaml.core.xml.io.UnmarshallingException,
                                                      org.opensaml.xmlsec.encryption.support.EncryptionException,
                                                      org.opensaml.xmlsec.encryption.support.DecryptionException,
                                                      net.shibboleth.utilities.java.support.xml.XMLParserException,
                                                      IOException,
                                                      org.opensaml.xmlsec.signature.support.SignatureException
        Test decryption of signed object and then verify signature.
        Throws:
        org.opensaml.core.xml.io.MarshallingException - ...
        org.opensaml.core.xml.io.UnmarshallingException - ...
        org.opensaml.xmlsec.encryption.support.EncryptionException - ...
        org.opensaml.xmlsec.encryption.support.DecryptionException - ...
        net.shibboleth.utilities.java.support.xml.XMLParserException - ...
        IOException - ...
        org.opensaml.xmlsec.signature.support.SignatureException - ...
      • testPlainRoundTripSignature

        public void testPlainRoundTripSignature()
                                         throws org.opensaml.core.xml.io.MarshallingException,
                                                org.opensaml.core.xml.io.UnmarshallingException,
                                                org.opensaml.xmlsec.signature.support.SignatureException
        Just a sanity check that unit test is set up correctly.
        Throws:
        org.opensaml.core.xml.io.MarshallingException - ...
        org.opensaml.core.xml.io.UnmarshallingException - ...
        org.opensaml.xmlsec.signature.support.SignatureException - ...
      • getSignedElement

        private Element getSignedElement()
                                  throws org.opensaml.core.xml.io.MarshallingException,
                                         org.opensaml.xmlsec.signature.support.SignatureException
        Creates a signed SimpleXMLObject element.
        Returns:
        a XMLObject that has a Signature child element
        Throws:
        org.opensaml.core.xml.io.MarshallingException - ...
        org.opensaml.xmlsec.signature.support.SignatureException - ...