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 {