Skip to content

hawkup/react-native-ssl-pinning-poc

Repository files navigation

React Native SSL Pinning

Android

  1. Get certificate from host
openssl s_client -servername www.google.com -connect www.google.com:443 -prexit -showcerts
  1. Copy text from BEGIN to END of last section and save to googlecert.pem file

  2. RUN python get_pin_from_certificate.py googlecert.pem to get pin key

  3. Added OkHttpCertPin.java and modify MainActivity.java

  4. Added pin key into OKHttpCertPin.java

iOS

  1. gem install cocoapods

  2. cd ios && pod init

  3. add pod 'TrustKit' into podfile

  4. pod install

  5. open xcode on project

  • Open 'Build Settings', search 'Header Search Path'.
  • Add $(SRCROOT)/../node_modules/react-native/React and set it recursive
  1. on AppDelegate.m add trustKitConfig

  2. run on simmulator

referrence

About

React Native SSL Pinning POC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published