Package jp.go.aist.sot.client.common

Examples of jp.go.aist.sot.client.common.SignOnException


    private void showCertDetailWindow(Object alias) {
        Log.debug(CLASS_NAME, "SignOnMain->details(alias)" + alias);

        try {
            if (alias == null) {
                throw new SignOnException(mh.getMessage("select_certificate"));
            }

            if (detailWindow == null) {
                detailWindow = new CertDetailWindow(null);
                detailWindow.setOkCommand(new CertDetailOkCmd());
View Full Code Here


            String hostName = windowController.getHostName();
            Map urls = ContactUtil.getURLs(hostName);

            if (hostName == null || urls == null) {
                throw new SignOnException(mh.getMessage("invalid_hostname"));
            }

            SignOnSessionController mgr = new SignOnSessionController();

            mgr.setFirstUrl((String) urls.get(ContactUtil.FIRST_URL));
            mgr.setSecondUrl((String) urls.get(ContactUtil.SECOND_URL));
            mgr.setLegacyProxy(windowController.isLegacyProxy());

            /* valility of term */
            long certTerm = -1L;

            certTerm = CertTermUtil.checkCertTerm(windowController.getDays(),
                    windowController.getHours());
            mgr.setCertTerm(certTerm);

            SSLContext ctx = null;
            String cn = (String) windowController.getSubject();
            String passphrase = windowController.getPassPhrase();

            if (passphrase == null) {
                throw new SignOnException(mh.getMessage("passphrase_null"));
            }
           
            jp.go.aist.sot.client.security.KeyStore ks = null;

            ks = storage.getTrustStore(new SubjectName(null, null),
                    passphrase.toCharArray());
            KeyStore caks = jp.go.aist.sot.client.security.KeyStore.convert(ks);

            if (caks == null || caks.size() == 0) {
                throw new SignOnException(mh.getMessage("check_trustca"));
            }

            KeyStore uks = null;

            try {
                ks = storage.getKeyStore(new SubjectName(cn, null),
                        passphrase.toCharArray());
                uks = jp.go.aist.sot.client.security.KeyStore.convert(ks);
            } catch (jp.go.aist.sot.client.security.KeyStoreException e) {
                throw new SignOnException(e, mh.getMessage("invalid_passphrase"));
            }
            if (uks == null || uks.size() == 0) {
                throw new SignOnException(mh.getMessage("invalid_passphrase"));
            }
           
            PKCS12 pkcs12 = jp.go.aist.sot.client.security.KeyStore.convertKeyStoreToPKCS12(
                    ks, cn, passphrase.toCharArray());

View Full Code Here

TOP

Related Classes of jp.go.aist.sot.client.common.SignOnException

Copyright © 2018 www.massapicom. 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.