Examples of SSLFactory


Examples of org.apache.hadoop.security.ssl.SSLFactory

    Configuration conf = new Configuration();
   
    // Stash command-line arguments for regular datanode
    args = context.getArguments();
   
    sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, conf);
    resources = getSecureResources(sslFactory, conf);
  }
View Full Code Here

Examples of org.apache.hadoop.security.ssl.SSLFactory

  private static String readOut(URL url) throws Exception {
    StringBuilder out = new StringBuilder();
    HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
    Configuration conf = new Configuration();
    conf.addResource(CONFIG_SITE_XML);
    SSLFactory sslf = new SSLFactory(SSLFactory.Mode.CLIENT, conf);
    sslf.init();
    conn.setSSLSocketFactory(sslf.createSSLSocketFactory());
    InputStream in = conn.getInputStream();
    byte[] buffer = new byte[64 * 1024];
    int len = in.read(buffer);
    while (len > 0) {
      out.append(new String(buffer, 0, len));
View Full Code Here

Examples of org.apache.hadoop.security.ssl.SSLFactory

    this.adminsAcl = adminsAcl;
   
    if(connector == null) {
      listenerStartedExternally = false;
      if (HttpConfig.isSecure()) {
        sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, conf);
        try {
          sslFactory.init();
        } catch (GeneralSecurityException ex) {
          throw new IOException(ex);
        }
View Full Code Here

Examples of org.apache.hadoop.security.ssl.SSLFactory

        NetUtils.addStaticResolution(hosts[i - curDatanodesNum], "localhost");
      }

      SecureResources secureResources = null;
      if (UserGroupInformation.isSecurityEnabled()) {
        SSLFactory sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, dnConf);
        try {
          secureResources = SecureDataNodeStarter.getSecureResources(sslFactory, dnConf);
        } catch (Exception ex) {
          ex.printStackTrace();
        }
View Full Code Here

Examples of org.webbitserver.helpers.SslFactory

        return this.setupSsl(keyStore, pass, pass);
    }

    @Override
    public NettyWebServer setupSsl(InputStream keyStore, String storePass, String keyPass) throws WebbitException {
        this.sslContext = new SslFactory(keyStore, storePass).getServerContext(keyPass);
        return this;
    }
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.