Package COM.claymoresystems.sslg

Examples of COM.claymoresystems.sslg.SSLPolicyInt


            }

            sslContext.loadEAYKeyFile(anonymousCertificateStream, "");

            // Copied from PuretlsInvoker
            SSLPolicyInt policy = new SSLPolicyInt();
            policy.negotiateTLS(true);
            policy.waitOnClose(true);
            sslContext.setPolicy(policy);

            PuretlsInvoker invoker = new PuretlsInvoker(sslContext);
            WSIFProviderManager.getInstance().addProvider(
                    new xsul.wsif_xsul_soap_gsi.Provider(invoker));
View Full Code Here


        SoapHttpDynamicInfosetInvoker invoker;
        if(useHostKey && globalConfiguration.getTrustedCertificates() != null && keyfile != null){
            PureTLSContext ctx = new PureTLSContext();
            ctx.setTrustedCertificates(globalConfiguration.getTrustedCertificates());
            ctx.loadEAYKeyFile(keyfile, "");
            SSLPolicyInt policy = new SSLPolicyInt();
            policy.requireClientAuth(true);
            policy.setAcceptNoClientCert(true);
            ctx.setPolicy(policy);
            invoker = new PuretlsInvoker(ctx);
        }else if(useHostKey && certFile != null && keyfile != null && new File(certFile).isFile()){
            invoker = new PuretlsInvoker(keyfile, "", certFile);
        }else {
View Full Code Here

                    else{
                        TrustedCertificates tc = TrustedCertificates.getDefaultTrustedCertificates();
                        ctx.setTrustedCertificates(tc.getCertificates());
                    }
                    ctx.loadEAYKeyFile(certKeyFile, "");
                    SSLPolicyInt policy = new SSLPolicyInt();
                    policy.requireClientAuth(true);
                    policy.setAcceptNoClientCert(true);
                    ctx.setPolicy(policy);
                }else{
                    //Use Globous crednatials if it is there
                    try {
                        ctx = new PureTLSContext();
View Full Code Here

        throw new XRegistryClientException("The host key file path is null or empty");
      }
      PureTLSContext ctx = new PureTLSContext();
      ctx.setTrustedCertificates(trustedCerts);
      ctx.loadEAYKeyFile(hostkeyPath, "");
      SSLPolicyInt policy = new SSLPolicyInt();
      policy.requireClientAuth(true);
      policy.setAcceptNoClientCert(true);
      ctx.setPolicy(policy);
      SoapHttpDynamicInfosetInvoker invoker = new PuretlsInvoker(ctx);
      String wsdlAsStr = invoker.invokeHttpGet(xregistryServiceWsdlUrl);
      XmlElement el = XmlConstants.BUILDER.parseFragmentFromReader(new StringReader(wsdlAsStr));
      WsdlDefinitions def = new WsdlDefinitions(el);
View Full Code Here

                                 rootFile,iex);
            }
            tmpContext.loadEAYKeyFile(keyStoreFile,keyPass);
      tmpContext.useRandomnessFile(randomFile,keyPass);
     
      SSLPolicyInt policy=new SSLPolicyInt();
      policy.requireClientAuth(clientAuth);
            policy.handshakeOnConnect(false);
            policy.waitOnClose(false);
            short [] enabledCiphers = getEnabledCiphers(policy.getCipherSuites());
            if( enabledCiphers != null ) {
                policy.setCipherSuites(enabledCiphers);
            }
            tmpContext.setPolicy(policy);
      context=tmpContext;
  } catch (Exception e){
      logger.info("Error initializing SocketFactory",e);
View Full Code Here

    public Object[] getPeerCertificateChain(boolean force)
        throws IOException {
        Vector v=ssl.getCertificateChain();

  if(v == null && force) {
      SSLPolicyInt policy=new SSLPolicyInt();
      policy.requireClientAuth(true);
      policy.handshakeOnConnect(false);
      policy.waitOnClose(false);
      ssl.renegotiate(policy);
      v = ssl.getCertificateChain();
  }

        if(v==null)
View Full Code Here

            }

            sslContext.loadEAYKeyFile(anonymousCertificateStream, "");

            // Copied from PuretlsInvoker
            SSLPolicyInt policy = new SSLPolicyInt();
            policy.negotiateTLS(true);
            policy.waitOnClose(true);
            sslContext.setPolicy(policy);

            PuretlsInvoker invoker = new PuretlsInvoker(sslContext);
            WSIFProviderManager.getInstance().addProvider(new xsul.wsif_xsul_soap_gsi.Provider(invoker));
            WsdlResolver.getInstance().setSecureInvoker(invoker);
View Full Code Here

            }

            sslContext.loadEAYKeyFile(anonymousCertificateStream, "");

            // Copied from PuretlsInvoker
            SSLPolicyInt policy = new SSLPolicyInt();
            policy.negotiateTLS(true);
            policy.waitOnClose(true);
            sslContext.setPolicy(policy);

            PuretlsInvoker invoker = new PuretlsInvoker(sslContext);
            WSIFProviderManager.getInstance().addProvider(new xsul.wsif_xsul_soap_gsi.Provider(invoker));
            WsdlResolver.getInstance().setSecureInvoker(invoker);
View Full Code Here

                                 rootFile,iex);
            }
            tmpContext.loadEAYKeyFile(keyStoreFile,keyPass);
      tmpContext.useRandomnessFile(randomFile,keyPass);
     
      SSLPolicyInt policy=new SSLPolicyInt();
      policy.requireClientAuth(clientAuth);
            policy.handshakeOnConnect(false);
            policy.waitOnClose(false);
            short [] enabledCiphers = getEnabledCiphers(policy.getCipherSuites());
            if( enabledCiphers != null ) {
                policy.setCipherSuites(enabledCiphers);
            }
            tmpContext.setPolicy(policy);
      context=tmpContext;
  } catch (Exception e){
      logger.info("Error initializing SocketFactory",e);
View Full Code Here

    public Object[] getPeerCertificateChain(boolean force)
        throws IOException {
        Vector v=ssl.getCertificateChain();

  if(v == null && force) {
      SSLPolicyInt policy=new SSLPolicyInt();
      policy.requireClientAuth(true);
      policy.handshakeOnConnect(false);
      policy.waitOnClose(false);
      ssl.renegotiate(policy);
      v = ssl.getCertificateChain();
  }

        if(v==null)
View Full Code Here

TOP

Related Classes of COM.claymoresystems.sslg.SSLPolicyInt

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.