Package com.sun.enterprise.security.ssl

Examples of com.sun.enterprise.security.ssl.J2EEKeyManager


                if (_logger.isLoggable(Level.FINE)) {
                    StringBuffer msg = new StringBuffer("Setting J2EEKeyManager for ");
                    msg.append(" alias : "+alias);
                    _logger.log(Level.FINE, msg.toString());
                }
                newMgrs[i] = new J2EEKeyManager((X509KeyManager)mgrs[i], alias);
            }
            mgrs = newMgrs;
        }
        ctx.init(mgrs, SSLUtils.getTrustManagers(), sr);
View Full Code Here


        SSLContext ctx = SSLContext.getInstance("TLS");
        String keyAlias = System.getProperty(HTTPS_OUTBOUND_KEY_ALIAS);
        KeyManager[] kMgrs = getKeyManagers();
        if (keyAlias != null && keyAlias.length() > 0 && kMgrs != null) {
            for (int i = 0; i < kMgrs.length; i++) {
                kMgrs[i] = new J2EEKeyManager((X509KeyManager)kMgrs[i], keyAlias);
            }
        }
  ctx.init(kMgrs, getTrustManagers(), null);

        HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
View Full Code Here

            final SSLContext ctx = SSLContext.getInstance("TLSv1");
            // get the key and trust managers
            final KeyManager[] kms = SSLUtils.getKeyManagers();
            J2EEKeyManager[] jkms = new J2EEKeyManager[kms.length];
            for (int i = 0; i < kms.length; i++) {
                jkms[i] = new J2EEKeyManager((X509KeyManager)kms[i], sslc.getCertNickname());
            }
            final TrustManager[] tms = null; //not needed really untill we support client auth
            final SecureRandom sr = null; // need to handle better?
            // now initialize the SSLContext gotten above and return
            ctx.init(jkms, tms, sr);
View Full Code Here

                    if (_logger.isLoggable(Level.FINE)) {
                        StringBuffer msg = new StringBuffer("Setting J2EEKeyManager for ");
                        msg.append(" alias : " + alias);
                        _logger.log(Level.FINE, msg.toString());
                    }
                    newMgrs[i] = new J2EEKeyManager((X509KeyManager) mgrs[i], alias);
                }
                mgrs = newMgrs;
            }
        } catch (Exception e) {
            //TODO: log here
View Full Code Here

        SSLContext ctx = SSLContext.getInstance("TLS");
        String keyAlias = System.getProperty(SSLUtils.HTTPS_OUTBOUND_KEY_ALIAS);
        KeyManager[] kMgrs = sslUtils.getKeyManagers();
        if (keyAlias != null && keyAlias.length() > 0 && kMgrs != null) {
            for (int i = 0; i < kMgrs.length; i++) {
                kMgrs[i] = new J2EEKeyManager((X509KeyManager)kMgrs[i], keyAlias);
            }
        }
  ctx.init(kMgrs, sslUtils.getTrustManagers(), null);
        HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
        initialized = true;
View Full Code Here

        SSLContext ctx = SSLContext.getInstance("TLS");
        String keyAlias = System.getProperty(SSLUtils.HTTPS_OUTBOUND_KEY_ALIAS);
        KeyManager[] kMgrs = sslUtils.getKeyManagers();
        if (keyAlias != null && keyAlias.length() > 0 && kMgrs != null) {
            for (int i = 0; i < kMgrs.length; i++) {
                kMgrs[i] = new J2EEKeyManager((X509KeyManager)kMgrs[i], keyAlias);
            }
        }
  ctx.init(kMgrs, sslUtils.getTrustManagers(), null);
        HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
        initialized = true;
View Full Code Here

                    if (_logger.isLoggable(Level.FINE)) {
                        StringBuffer msg = new StringBuffer("Setting J2EEKeyManager for ");
                        msg.append(" alias : " + alias);
                        _logger.log(Level.FINE, msg.toString());
                    }
                    newMgrs[i] = new J2EEKeyManager((X509KeyManager) mgrs[i], alias);
                }
                mgrs = newMgrs;
            }
        } catch (Exception e) {
            //TODO: log here
View Full Code Here

TOP

Related Classes of com.sun.enterprise.security.ssl.J2EEKeyManager

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.