-
-
Save ajinabraham/cdb39b8ca05eafae693868560971287a to your computer and use it in GitHub Desktop.
How to implement an X509TrustManager using Frida
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var TrustManager; | |
var manager; | |
Java.perform(function () { | |
var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager'); | |
TrustManager = Java.registerClass({ | |
name: 'com.example.TrustManager', | |
implements: [X509TrustManager], | |
methods: { | |
checkClientTrusted: function (chain, authType) { | |
console.log('checkClientTrusted'); | |
}, | |
checkServerTrusted: function (chain, authType) { | |
console.log('checkServerTrusted'); | |
}, | |
getAcceptedIssuers: function () { | |
console.log('getAcceptedIssuers'); | |
return []; | |
} | |
} | |
}); | |
manager = TrustManager.$new(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment