使用 java 或 android 进行 https 客户端检查
Do a https client check with java or android
我得到了一个带有 https 的 url,它有一个通用的认证(这意味着这个 url 可以从浏览器访问并且有一个 https 安全徽章)。现在我想使用 HttpsUrlConnection 从这个 url 获取信息,我该如何进行认证检查。
我是一个SSL初学者,所以我做了一些搜索。我得到了this,这是一个自签名支票演示。
我想知道是否应该像这样检查常见的 https link。 HttpsUrlConnection 是否做检查,我在 Android 上找到 Developers:
If an application wants to trust Certificate Authority (CA) certificates that are not part of the system, it should specify its own X509TrustManager via a SSLSocketFactory set on the HttpsURLConnection.
这是否意味着如果我可以从网络浏览器浏览它,就不需要检查服务器证书?我可以像网络浏览器那样进行验证吗?我在哪里可以找到信任库文件,我可以只做一个默认的密钥库吗?或者任何人都可以告诉我如何实现 TrustManager(我确实想要验证,而不是信任任何东西的信任管理器)。
也许这些信息会对您有所帮助HttpComponents
我得到了一个带有 https 的 url,它有一个通用的认证(这意味着这个 url 可以从浏览器访问并且有一个 https 安全徽章)。现在我想使用 HttpsUrlConnection 从这个 url 获取信息,我该如何进行认证检查。
我是一个SSL初学者,所以我做了一些搜索。我得到了this,这是一个自签名支票演示。
我想知道是否应该像这样检查常见的 https link。 HttpsUrlConnection 是否做检查,我在 Android 上找到 Developers:
If an application wants to trust Certificate Authority (CA) certificates that are not part of the system, it should specify its own X509TrustManager via a SSLSocketFactory set on the HttpsURLConnection.
这是否意味着如果我可以从网络浏览器浏览它,就不需要检查服务器证书?我可以像网络浏览器那样进行验证吗?我在哪里可以找到信任库文件,我可以只做一个默认的密钥库吗?或者任何人都可以告诉我如何实现 TrustManager(我确实想要验证,而不是信任任何东西的信任管理器)。
也许这些信息会对您有所帮助HttpComponents