Get certificate and add it to a Java truststore, when only having https URL?(当只有 https URL 时,获取证书并将其添加到 Java 信任库?)
问题描述
我正在尝试通过 Google Cloud Message 服务器向 Android 设备发送推送通知.
I'm trying to send push notifications to Android devices through the Google Cloud Message servers.
我们使用的网址是:
https://android.googleapis.com/gcm/send
在我们的企业应用程序中,我们不使用默认的 CA 权限,并且出于安全原因,我们在 SSLContext 属性加载的信任库文件中手动添加我们信任的每个实体.我想将 GCM 证书添加到我们的信任库.
In our entreprise applications, we do not use the default CA authorities and we add manually each entity we trust for security reason, in a truststore file loaded by SSLContext properties. I'd like to add GCM certificate to our truststore.
我不知道如何从该 URL 获取证书.由于页面重定向到另一个非 SSL 页面,因此 Chrome/Firefox 导出方式似乎不起作用.
I don't know how to get the certificate from that URL. It seems the Chrome/Firefox export way is not working since the page redirects to another non-SSL page.
有人有解决办法吗?
推荐答案
使用 Portecle.您可以打开目标密钥库,然后使用 Examine > Examine SSL/TLS Connection,输入 android.googleapis.com
和 443
你就完成了!
Use Portecle. You can open the target key store, then use Examine > Examine SSL/TLS Connection, enter android.googleapis.com
and 443
and you're done!
这篇关于当只有 https URL 时,获取证书并将其添加到 Java 信任库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:当只有 https URL 时,获取证书并将其添加到 Java 信任库?


- 如何指定 CORS 的响应标头? 2022-01-01
- 未找到/usr/local/lib 中的库 2022-01-01
- 转换 ldap 日期 2022-01-01
- java.lang.IllegalStateException:Bean 名称“类别"的 BindingResult 和普通目标对象都不能用作请求属性 2022-01-01
- Eclipse 的最佳 XML 编辑器 2022-01-01
- 获取数字的最后一位 2022-01-01
- 将 Java Swing 桌面应用程序国际化的最佳实践是什么? 2022-01-01
- 在 Java 中,如何将 String 转换为 char 或将 char 转换 2022-01-01
- GC_FOR_ALLOC 是否更“严重"?在调查内存使用情况时? 2022-01-01
- 如何使 JFrame 背景和 JPanel 透明且仅显示图像 2022-01-01