public class TrustAllCertificateManager extends Object implements TrustManager, X509TrustManager
该类用于信任(忽略验证)所有SSL/TLS证书的场景
Trust (ignore verification) all certificate management classes
This class is used in scenarios where all SSL/TLS certificates are trusted (ignored verification).
program: Sinlmao Commons Network Utils
description: 信任(忽略验证)所有证书管理类
create: 2020-06-18 11:28
| 构造器和说明 |
|---|
TrustAllCertificateManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkClientTrusted(X509Certificate[] certs,
String authType) |
void |
checkServerTrusted(X509Certificate[] certs,
String authType) |
X509Certificate[] |
getAcceptedIssuers() |
boolean |
isClientTrusted(X509Certificate[] certs) |
boolean |
isServerTrusted(X509Certificate[] certs) |
public X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers 在接口中 X509TrustManagerpublic boolean isServerTrusted(X509Certificate[] certs)
public boolean isClientTrusted(X509Certificate[] certs)
public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException
checkServerTrusted 在接口中 X509TrustManagerCertificateExceptionpublic void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException
checkClientTrusted 在接口中 X509TrustManagerCertificateExceptionCopyright © 2021. All rights reserved.