关于中间人攻击,替换服务器公钥。想在程序里写死公钥,对方服务器发过来的公钥与写死的不一致就终止通信。
然而翻烂了首页也没发现有什么方法可以实现的。
关于中间人攻击,替换服务器公钥。想在程序里写死公钥,对方服务器发过来的公钥与写死的不一致就终止通信。
然而翻烂了首页也没发现有什么方法可以实现的。
|
vitovanOct 21, 2015
1
翻首页干啥?为什么不去翻文档?
http://curl.haxx.se/docs/httpscripting.html#Certificates At times you may end up with your own CA cert store and then you can tell curl to use that to verify the server's certificate: curl --cacert ca-bundle.pem https://example.com/ |
|
snnnOct 22, 2015 via Android
2
他问的是如何 pin 住证书。
|
|
msg7086Oct 22, 2015
3
|
|
alectOct 22, 2015
4
然而,程序写死不是一个明智的选择。。万一真的被人破了密钥,完蛋咯。
|
|
chuxiwenOct 22, 2015 via iPad
5
man curl
|
|
oott123Oct 22, 2015 via Android
6
其实楼主问的是 PHP
我不会告诉楼主 php 文档里也有的 |
|
7
|
|
realpgOct 24, 2015
8
@cevincheung
所有 curl 命令行能附加参数实现的东西 基本去 curl_setopt 里找都有 http://php.net/manual/en/function.curl-setopt.php |
|
9
@realpg 然而翻烂了手册也没找到有关 PINNING 的任何资料。
|