【发布时间】:2021-02-19 02:45:07
【问题描述】:
我想按照 PEN 测试结果的建议在我的 react-native 应用中实现 SSL Pinning。我们的 API 服务器位于 Azure 中。当我搜索 SSL Pinning 时,我发现我们需要使用 openssl 命令生成证书。但我收到错误
s_client: -connect argument or target parameter malformed or ambiguous
unable to load certificate
4565851584:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:Expecting: TRUSTED CERTIFICATE
unable to load Public Key
4369083840:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:Expecting: PUBLIC KEY
47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
我使用了以下命令:
openssl s_client -servername <AZURE API SERVERNAME> -connect <AZURE API SERVERNAME>:443 | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
我正在关注这个链接
https://itnext.io/react-native-security-ssl-pinning-cde086210d58
我们需要先在 Azure 门户中做些什么。我需要一些帮助。如果有人已经使用 Azure 服务器在 React Native 应用程序中完成 SSL Pinning,请分享一些链接作为参考。
【问题讨论】:
-
能否请您与 SSL Pinning 分享您的代码?
标签: azure react-native ssl pinning