OkHttp PublicKey pinning on Android

一个人想着一个人 提交于 2019-12-14 01:04:13

问题


Does anyone know how we could implement Public Key pinning with OkHttp3

Have been reading about SSL pinning and I see that we could do it with either Certificate Pinning or Public Key pinning (the latter seems more flexible). But I was only able to find example of Certificate pinning with OkHttp and none of Key Pinning.

Does anyone know how easy this is to implement with OkHttp (and/or an example of how to go about doing so)?

TIA


回答1:


Been looking through the source of the CertificatePinner in OkHttp3 and it seems that the implementation is actually a Public Key check so is in fact an implementation of Public Key Pinning (hence adding this as an answer).

Please correct me if I'm wrong?



来源:https://stackoverflow.com/questions/40656714/okhttp-publickey-pinning-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!