How to implement SSL Pinning - Public Key Pinning (Not Certificate Pinning) with Moya in Swift?

826 Views Asked by At

I went through may blogs on internet but finding issue when implementing it. Blogs like https://betterprogramming.pub/ssl-pinning-with-moya-in-swift-d5a5edae22c2 (using certificate pinning)

Is there anyone who did Public Key Pinning with Moya and can share me the way how I can achieve this.

Thanks in anticipation!

1

There are 1 best solutions below

2
On BEST ANSWER

After a lot of digging, I found the solution. Implemented using TrustKit. Please refer this link --> https://github.com/datatheorem/TrustKit. For iOS 12+.