How to check if APK is signed or “debug build”?

To check the debuggable flag, you can use this code: boolean isDebuggable = ( 0 != ( getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE ) ); Kotlin: val isDebuggable = 0 != applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE For more information, please see Securing Android LVL Applications. Alternatively, if you’re using Gradle correctly, you can check if BuildConfig.DEBUG is true or false.

How to convert .pfx file to keystore with private key?

Using JDK 1.6 or later It has been pointed out by Justin in the comments below that keytool alone is capable of doing this using the following command (although only in JDK 1.6 and later): keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS Using JDK 1.5 or below OpenSSL can do it all. … Read more

Development team not showing in Xcode

Apple has now unified both AppStore Connect and developer.apple.com systems. To add profile & certificates capabilities: Navigate to App Store Connect > Users and Access Select your user account. (You may need to be a team admin to do this.) In section “Developer Resources”, check the box “Access to Certificates, Identifiers & Profiles”. You will … Read more

Java SecurityException: signer information does not match

This happens when classes belonging to the same package are loaded from different JAR files, and those JAR files have signatures signed with different certificates – or, perhaps more often, at least one is signed and one or more others are not (which includes classes loaded from directories since those AFAIK cannot be signed). So … Read more

How to fix the “java.security.cert.CertificateException: No subject alternative names present” error?

I fixed the problem by disabling HTTPS checks using the approach presented here: I put following code into the the ISomeService class: static { disableSslVerification(); } private static void disableSslVerification() { try { // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[] {new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() … Read more

How to solve “Could not establish trust relationship for the SSL/TLS secure channel with authority”

As a workaround you could add a handler to the ServicePointManager‘s ServerCertificateValidationCallback on the client side: System.Net.ServicePointManager.ServerCertificateValidationCallback += (se, cert, chain, sslerror) => { return true; }; but be aware that this is not a good practice as it completely ignores the server certificate and tells the service point manager that whatever certificate is fine … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)