如何获取SSL固定的公钥哈希? [英] How do I get public key hash for SSL pinning?

查看:489
本文介绍了如何获取SSL固定的公钥哈希?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取公共证书信息的哈希值,以便能够在我的应用程序中执行SSL固定?



我在我的iOS应用程序中使用TrustKit,它要求我设置我期望的哈希值。我在哪里可以得到这个?

解决方案

如果是公共网站,你可以使用



公钥固定页面也有从密钥文件,证书签名请求,证书或网站获取引脚的命令(这是一个在 @ mylogon的回答)。


How would I get the hash of a public certificate's info to be able to perform SSL Pinning in my application?

I am using TrustKit in my iOS application and it is asking for me to set the hash that I am expecting. Where can I get this from?

解决方案

If it is a public website, you can use SSL Labs server test which computes and displays the pin.

The Public Key Pinning page over at the Mozilla Developer Network also has commands for obtaining the pin from a key file, a certificate signing request, a certificate or a website (this is the one in @mylogon's answer).

这篇关于如何获取SSL固定的公钥哈希?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆