fkie-cad / friTap

The goal of this project is to help researchers to analyze traffic encapsulated in SSL or TLS.
GNU General Public License v3.0
268 stars 28 forks source link

Potential typo in openssl_boringssl_android.ts #4

Closed Hamz-a closed 1 year ago

Hamz-a commented 1 year ago

I was just browsing through the code to see what is being hooked. The following stood out a bit:

https://github.com/fkie-cad/friTap/blob/1aea63cb7ea07e175932ff7c2efa456581bed485/agent/android/openssl_boringssl_android.ts#L20

I'm thinking maybe ObjC.available should become Java.available since this is for Android? If this is not the case, then we can probably hardcode the NativeFunction directly? I'm missing some context, so not sure what is exactly going on here.

monkeywave commented 1 year ago

Hi,

thx for reporting this issue :-)

Actually this was a "copy paste" bug when we refactored the code.

For Android the following would be enough:

OpenSSL_BoringSSL.SSL_CTX_set_keylog_callback = new NativeFunction(this.addresses["SSL_CTX_set_keylog_callback"], "void", ["pointer", "pointer"]) 

In Version 1.0.8 this is issue is fixed :-)