gluu
静的公開メンバ関数 | 全メンバ一覧
org.xdi.oxauth.rp.demo.Utils クラス
org.xdi.oxauth.rp.demo.Utils 連携図
Collaboration graph

静的公開メンバ関数

static ClientExecutor createTrustAllExecutor ()
 
static HttpClient createHttpClientTrustAll () throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
 

詳解

著者
yuriyz on 07/19/2016.

関数詳解

◆ createHttpClientTrustAll()

static HttpClient org.xdi.oxauth.rp.demo.Utils.createHttpClientTrustAll ( ) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
inlinestatic
40  {
41 
42  SSLSocketFactory sf = new SSLSocketFactory(new TrustStrategy() {
43  @Override
44  public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
45  return true;
46  }
47  }, new X509HostnameVerifier() {
48  @Override
49  public void verify(String host, SSLSocket ssl) throws IOException {
50  }
51 
52  @Override
53  public void verify(String host, X509Certificate cert) throws SSLException {
54  }
55 
56  @Override
57  public void verify(String host, String[] cns, String[] subjectAlts) throws SSLException {
58  }
59 
60  @Override
61  public boolean verify(String s, SSLSession sslSession) {
62  return true;
63  }
64  });
65 
66  SchemeRegistry registry = new SchemeRegistry();
67  registry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
68  registry.register(new Scheme("https", 443, sf));
69  ClientConnectionManager ccm = new PoolingClientConnectionManager(registry);
70  return new DefaultHttpClient(ccm);
71  }

◆ createTrustAllExecutor()

static ClientExecutor org.xdi.oxauth.rp.demo.Utils.createTrustAllExecutor ( )
inlinestatic
32  {
33  try {
34  return new ApacheHttpClient4Executor(createHttpClientTrustAll());
35  } catch (Exception e) {
36  throw new RuntimeException("Failed to create trust_all executor.", e);
37  }
38  }
static HttpClient createHttpClientTrustAll()
Definition: Utils.java:40

このクラス詳解は次のファイルから抽出されました: