Examples of SecuritySupport


Examples of com.sun.enterprise.server.pluggable.SecuritySupport

     * Gets the SSL server's keystore.
     */
    protected KeyStore getKeystore(String pass) throws IOException {
        String keyAlias = (String)attributes.get("keyAlias");
        String token = getTokenFromKeyAlias(keyAlias);       
        SecuritySupport secSupp = SecurityUtil.getSecuritySupport();
        KeyStore ks = secSupp.getKeyStore(token);
        if (ks==null) {
            throw new IOException("keystore not found for token " + token);
        }
        return ks;
    }
View Full Code Here

Examples of com.sun.enterprise.server.pluggable.SecuritySupport

     */
    protected KeyManager[] getKeyManagers(String algorithm,
                                          String keyAlias)
                throws Exception {
        KeyManager[] kms = null;
        SecuritySupport secSupp = SecurityUtil.getSecuritySupport();
        String token=getTokenFromKeyAlias(keyAlias);
        String certAlias = getCertAliasFromKeyAlias(keyAlias);
        String keystorePass = secSupp.getKeyStorePassword(token);
        KeyStore ks = secSupp.getKeyStore(token);
        if (ks==null) {
            throw new IOException("keystore not found for token " + token);
        }
        KeyManagerFactory kmf = KeyManagerFactory.getInstance(algorithm);
        kmf.init(ks, keystorePass.toCharArray());
View Full Code Here

Examples of com.sun.enterprise.server.pluggable.SecuritySupport

            String realmName = event.getAuthRealmName();
            Realm realm = Realm.getInstance(realmName);

            // should always true in this moment
            if (realm instanceof FileRealm) {
                SecuritySupport secSupp = SecurityUtil.getSecuritySupport();
                secSupp.synchronizeKeyFile(event.getConfigContext(), realmName);
            }

            realm.refresh();
        } catch(Exception ex) {
            throw new AdminEventListenerException(ex);
View Full Code Here

Examples of com.sun.enterprise.server.pluggable.SecuritySupport

            props.setProperty(elementProps[i].getName(),
                    elementProps[i].getValue());
        }

        if ("com.sun.enterprise.security.auth.realm.file.FileRealm".equals(className)) {
            SecuritySupport secSupp = SecurityUtil.getSecuritySupport();
            secSupp.synchronizeKeyFile(configContext, realmName);
        }
        Realm.instantiate(realmName, className, props);
    }
View Full Code Here

Examples of com.sun.enterprise.server.pluggable.SecuritySupport

     */
    private KeyStore getCertTrustore(String certNickname)
        throws KeyStoreException {

        // available trust stores
        SecuritySupport secSupp = SecurityUtil.getSecuritySupport();
        KeyStore[] trustStore = secSupp.getTrustStores();
        int i = 0; boolean found = false;
        Certificate cert = null;
        for (; i<trustStore.length; i++) {
            cert = trustStore[i].getCertificate(certNickname);
            if (cert != null) {
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.