Examples of AsadminTruststore


Examples of com.sun.enterprise.admin.jmx.remote.https.AsadminTruststore

        //First ensure that the certificate is valid.
        for (int i = 0 ; i < chain.length ; i ++) {
            chain[i].checkValidity();  
        }
        try {           
            AsadminTruststore truststore = null;
            try {
                truststore = new AsadminTruststore();
            } catch (IOException ex) {                   
                //An IOException is thrown when an invalid keystore password is entered.
                //In this case, we prompt the user for the truststore password.                   
                String password = promptForPassword();
                if (password != null) {
                    truststore = new AsadminTruststore(password);
                } else {
                    throw ex;
                }                   
            }
            //if the certificate already exists in the truststore, it is implicitly trusted
            if (!truststore.certificateExists(chain[0])) {
                //if the certificate does not exist in the truststore, then we prompt the
                //user. Upon confirmation from the user, the certificate is added to the
                //truststore.
                if (isItOKToAddCertToTrustStore(chain[0])) {                           
                    truststore.addCertificate(getAliasName(), chain[0]);
                } else {
                    throw new CertificateException(_strMgr.getString(
                        "serverCertificateNotTrusted"));
                }
            }    
View Full Code Here

Examples of com.sun.enterprise.security.store.AsadminTruststore

        try {
            /*
             * Open the trust store, prompting the user if needed for a valid
             * password to use.
             */
            AsadminTruststore truststore = AsadminTruststore.newInstance();
            // if the certificate already exists in the truststore,
            // it is implicitly trusted
            if (!truststore.certificateExists(chain[0])) {
                // if the certificate does not exist in the truststore,
                // then we prompt the user.  Upon confirmation from the user,
                // the certificate is added to the truststore.
                if (isItOKToAddCertToTrustStore(chain[0])) {
                    truststore.addCertificate(getAliasName(), chain[0]);
                } else {
                    throw new CertificateException(strmgr.get(
                        "serverCertificateNotTrusted"));
                }
            }    
View Full Code Here

Examples of com.sun.enterprise.security.store.AsadminTruststore

        try {
            /*
             * Open the trust store, prompting the user if needed for a valid
             * password to use.
             */
            AsadminTruststore truststore = AsadminTruststore.newInstance();
            // if the certificate already exists in the truststore,
            // it is implicitly trusted
            if (!truststore.certificateExists(chain[0])) {
                // if the certificate does not exist in the truststore,
                // then we prompt the user.  Upon confirmation from the user,
                // the certificate is added to the truststore.
                if (isItOKToAddCertToTrustStore(chain[0])) {
                    truststore.addCertificate(getAliasName(), chain[0]);
                } else {
                    throw new CertificateException(strmgr.get(
                        "serverCertificateNotTrusted"));
                }
            }    
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.