Class KeyInfoSupportTest


  • public class KeyInfoSupportTest
    extends XMLObjectBaseTestCase
    Test to exercise the KeyInfoSupport methods to convert between XMLObject's contained within KeyInfo and Java security native types.
    • Constructor Detail

      • KeyInfoSupportTest

        public KeyInfoSupportTest()
        Constructor.
    • Method Detail

      • testCertConversionXMLtoJava

        public void testCertConversionXMLtoJava()
                                         throws CertificateException
        Test converting XML X509Certificate to java.security.cert.X509Certificate.
        Throws:
        CertificateException - ...
      • testCertConversionJavaToXML

        public void testCertConversionJavaToXML()
                                         throws CertificateException
        Test converting java.security.cert.X509Certificate to XML X509Certificate.
        Throws:
        CertificateException - ...
      • testDSAConversionXMLToJava

        public void testDSAConversionXMLToJava()
        Test conversion of DSA public keys from XML to Java security native type.
      • testRSAConversionXMLToJava

        public void testRSAConversionXMLToJava()
        Test conversion of RSA public keys from XML to Java security native type.
      • testDSAConversionJavaToXML

        public void testDSAConversionJavaToXML()
                                        throws EncodingException
        Test conversion of DSA public keys from Java security native type to XML.
        Throws:
        EncodingException - on base64 encoding error
      • testRSAConversionJavaToXML

        public void testRSAConversionJavaToXML()
                                        throws EncodingException
        Test conversion of RSA public keys from Java security native type to XML.
        Throws:
        EncodingException - on base64 encoding error
      • testGetDSAKey

        public void testGetDSAKey()
        Tests extracting a DSA public key from a KeyValue.
      • testGetRSAKey

        public void testGetRSAKey()
        Tests extracting a RSA public key from a KeyValue.
      • testAddDSAPublicKey

        public void testAddDSAPublicKey()
                                 throws EncodingException
        Tests adding a public key as a KeyValue to KeyInfo.
        Throws:
        EncodingException - on base64 encoding error
      • testAddRSAPublicKey

        public void testAddRSAPublicKey()
                                 throws EncodingException
        Tests adding a public key as a KeyValue to KeyInfo.
        Throws:
        EncodingException - on base64 encoding error
      • testAddDEREncodedDSAPublicKey

        public void testAddDEREncodedDSAPublicKey()
        Tests adding a public key as a DEREncodedKeyValue to KeyInfo.
      • testAddDEREncodedRSAPublicKey

        public void testAddDEREncodedRSAPublicKey()
        Tests adding a public key as a DEREncodedKeyValue to KeyInfo.
      • testAddX509CRL

        public void testAddX509CRL()
                            throws CRLException
        Tests adding a CRL as a X509Data/X509CRL to KeyInfo.
        Throws:
        CRLException - ...
      • testBuildSubjectName

        public void testBuildSubjectName()
        Tests building a new X509SubjectName.
      • testBuildIssuerSerial

        public void testBuildIssuerSerial()
        Tests building a new X509IssuerSerial.