Enforce pinning not respected in Android 5.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the supplied network-security-config and reproduce the pinning failure on Android 5.0, comparing it with Android 8.0. Trace how enforcePinning="false" is handled when certificate validation fails, then verify that failed validation is reported without blocking traffic while the Android 8.0 behavior remains unchanged.
Written by the indexing model from the issue text.
Description
Describe the bug
When using the TrustKit on 5.0 device, I am getting javax.net.ssl.SSLHandshakeException: Certificate validation failed for ...
When checking the log, it has correct parameters:
E/CERT ERROR: "include-subdomains": false,
E/CERT ERROR: "enforce-pinning": false,
E/CERT ERROR: "validation-result": 2,
These are respected on Android 8.0
The CERT ERROR: "validated-certificate-chain": contains the correct certificate, that is in the xml file and served-certificate-chain": are also same. known-pins are also correct.
To Reproduce
I can only reproduce on the 5.0 device, works correctly in emulator
I am not including the domain, because it is accessible only on private network
Expected behavior
It shouldn't fail and if it fails, it shouldn't block the traffic with enforce-pinning set to false (works well on other devices)
TrustKit configuration
domain.com f3n+wu1f9Z4QvyZZAItVF55NNBJpDFf8f68P/uLyRHA= BnGNbPrwbfsIyAu+IjeZ/nAOloLMEVQXNAyQse4u/nA= subdomain.domain.com KZOAUwc92hHmVhuD8TaDaMp3yLKF1Y6vaurRigRS8w8= EjGCjEFfzshXkT1QHH0fVfCjhy5CqZkB3TxXYRrokUI=App details:
- App target SDK: 28
- App language:Java
- Android version to reproduce the bug: 5.0
- Dominant language
- Java
- Stars
- 604
- Forks
- 90
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from datatheorem/TrustKit-Android
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
datatheorem/TrustKit-Android#93 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
datatheorem/TrustKit-Android#91 · 4 comments ·
All issues in datatheorem/TrustKit-Android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100