Skip to content

Instantly share code, notes, and snippets.

@david-martin
Last active April 10, 2018 07:56
Show Gist options
  • Save david-martin/6fd0f3845214755832bb6f225a7895f9 to your computer and use it in GitHub Desktop.
Save david-martin/6fd0f3845214755832bb6f225a7895f9 to your computer and use it in GitHub Desktop.
Android custom CA
mkdir -p example/src/main/res/raw
openssl s_client -connect aerogear-app-metrics-myproject.192.168.37.1.nip.io:443 -showcerts </dev/null 2>/dev/null|openssl x509 -outform PEM > example/src/main/res/raw/my_ca
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config>
<domain includeSubdomains="true">aerogear-app-metrics-myproject.192.168.37.1.nip.io</domain>
<trust-anchors>
<certificates src="@raw/my_ca"/>
</trust-anchors>
</domain-config>
</network-security-config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment