Class TestUtil


  • public class TestUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.math.BigInteger serialNumber  
    • Constructor Summary

      Constructors 
      Constructor Description
      TestUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.security.cert.X509Certificate makeCaCertificate​(java.security.cert.X509Certificate issuer, java.security.PrivateKey issuerKey, java.security.PublicKey subjectKey, java.lang.String subject)  
      static java.security.cert.X509CRL makeCrl​(java.security.cert.X509Certificate issuer, java.security.PrivateKey sigKey, java.math.BigInteger revoked)  
      static java.security.cert.X509Certificate makeEeCertificate​(boolean withDistPoint, java.security.cert.X509Certificate issuer, java.security.PrivateKey issuerKey, java.security.PublicKey subjectKey, java.lang.String subject)  
      static java.security.cert.X509Certificate makeTrustAnchor​(java.security.KeyPair kp, java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serialNumber

        public static java.math.BigInteger serialNumber
    • Constructor Detail

      • TestUtil

        public TestUtil()
    • Method Detail

      • makeTrustAnchor

        public static java.security.cert.X509Certificate makeTrustAnchor​(java.security.KeyPair kp,
                                                                         java.lang.String name)
                                                                  throws java.security.GeneralSecurityException,
                                                                         java.io.IOException,
                                                                         OperatorCreationException
        Throws:
        java.security.GeneralSecurityException
        java.io.IOException
        OperatorCreationException
      • makeCaCertificate

        public static java.security.cert.X509Certificate makeCaCertificate​(java.security.cert.X509Certificate issuer,
                                                                           java.security.PrivateKey issuerKey,
                                                                           java.security.PublicKey subjectKey,
                                                                           java.lang.String subject)
                                                                    throws java.security.GeneralSecurityException,
                                                                           java.io.IOException,
                                                                           OperatorCreationException
        Throws:
        java.security.GeneralSecurityException
        java.io.IOException
        OperatorCreationException
      • makeEeCertificate

        public static java.security.cert.X509Certificate makeEeCertificate​(boolean withDistPoint,
                                                                           java.security.cert.X509Certificate issuer,
                                                                           java.security.PrivateKey issuerKey,
                                                                           java.security.PublicKey subjectKey,
                                                                           java.lang.String subject)
                                                                    throws java.security.GeneralSecurityException,
                                                                           java.io.IOException,
                                                                           OperatorCreationException
        Throws:
        java.security.GeneralSecurityException
        java.io.IOException
        OperatorCreationException
      • makeCrl

        public static java.security.cert.X509CRL makeCrl​(java.security.cert.X509Certificate issuer,
                                                         java.security.PrivateKey sigKey,
                                                         java.math.BigInteger revoked)
                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception