Package com.sun.grizzly.util.net

Examples of com.sun.grizzly.util.net.ServerSocketFactory


        //XXX need to revisit if the value should be cached
        return System.getProperty(KEYSTORE_PASS_PROP, "changeit");
    }

    private SSLContext getSSLContext(SipBindingCtx sipBindingCtx) {
        ServerSocketFactory serverSF = null;

        try {
            //TODO This expects that the ServerSocketFactory initialized

            //is a seperated instance. A brief check of the grizzly

            //classes involved reveals that it is for the default JSSE14 factories
            SSLImplementation sslHelper = SSLImplementation.getInstance();

            serverSF = sslHelper.getServerSocketFactory();

            serverSF.setAttribute("keystoreType", "JKS");

            serverSF.setAttribute("keystore", keyStore);
            serverSF.setAttribute("keystorePass", keypass);
            serverSF.setAttribute("keypass", keypass);

            serverSF.setAttribute("truststoreType", "JKS");

            serverSF.setAttribute("truststore", trustStore);

            String keyAlias = sipBindingCtx.getSSLAttribute("CertNickname");

            serverSF.setAttribute("keyAlias",
                    ((keyAlias != null) ? keyAlias : "s1as")); //Default GF s1sa

            serverSF.init();
        } catch (IOException e) {
        //TODO Logging
        } catch (ClassNotFoundException e) {
        //TODO Logging
        }

        return serverSF.getSSLContext();
    }
View Full Code Here

TOP

Related Classes of com.sun.grizzly.util.net.ServerSocketFactory

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.