From the course: Writing Secure Code for Android by Infosec

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Activity: Certificate pinning

Activity: Certificate pinning

- [Instructor] Certificate Pinning, Activity, Implementing Certificate Pinning. Open Android Studio, open an existing project, browse into your student activity files, go to Course 5, Certificate Pinning, select the app inside, and open it. This is basically the same app that we used in the configuring network security activity, but it has a few little differences. If you open MainActivity, the first thing you'll notice is that we're going to a different website. I happen to like GitHub. And the next thing we're doing is we're asking the webView to clear its cache. WebView has this pleasant little habit of remembering things, and that could throw us off when we are trying valid and invalid certificates. So we're going to ask it to clear its cache each time. Otherwise, it's all the same. If you'll go now to network_security_config and open that up, you'll notice that it doesn't really have any configuration. We're going to need to put something in here. Go to where the activity files…

Contents