Category : openssl

I’m using OpenSsl for windows. I want to get the certificate hash associated with Fiddler’s root certificate that I downloaded from: http://ipv4.fiddler:8888/ So I’m executing from the command-line: openssl x509 -hash -noout -in FiddlerRoot.cer But I’m getting this error instead of getting the 8 characters long alphanumeric hash: unable to load certificate 15176:error:0906D06C:PEM routines:PEM_read_bio:no start ..

Read more

I’ve implemented an https with jni, it’s divided into an IOS version and an android version, but I’m having some problems with the handshake, I don’t know how to authenticate with the android root certificate, if it’s IOS, I can set the SecTrustSetAnchorCertificatesOnly( peerTrust, false ); function to false, but android I don’t know how ..

Read more

System: ubuntu 18.04 environment:VirtualBox The first time I compiled the AOSP source code on Ubuntu 18.04, it passed, and the second time I compiled it failed. Here is an error message. [ 10% 538/4980] Ensuring Jack server is installed and started FAILED: setup-jack-server /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 2>&1 || (exit 0) ) && ..

Read more

I’m finishing my first app(s) and now I’m dealing with things like Google Ads, Premium and, most recently, certificates. I have 2 different apps that connect to the same server, and one of the apps runs well with a self-signed certificate, but the other one gives an error, which made me stop everything I was ..

Read more

I am supposed to receive server public key ("ECDH" , "secp256k1") in HEX format, which is uncompressed (65 bytes), generate my own public key in Android which is in X.509format (88 bytes), and then generate a shared secret which must be 32 bytes. Now when I want to get server public key I ran into ..

Read more

I am supposed to receive server public key ("ECDH" , "secp256k1") in HEX format, which is uncompressed (65 bytes), generate my own public key in Android which is in X.509format (88 bytes), and then generate a shared secret which must be 32 bytes. Now when I want to get server public key I ran into ..

Read more

To generate an ECDH keypair I have written below code which is the same as server’s one which is using open-ssl. But my public key to Hex is like this (176): 3056301006072a8648ce3d020106052b8104000a0342000462bf4308171cffa3a3ed74a9e72cd3d5fde26d760322a5e39cd67166240f75f87edaffa52bef5e0895a37751f5b90b7b8fc077a90d76893e7cb857c1a49e4818 And the server public key is shorter, like this (130): 041f13436e59b8a4e61952b1f184052b330977732f7f8a0505c46028da82bdafd34ded7444a19acdbbf5de91cd914437c3ac9b827dac2f899a4bba961fd72a7ea3 Code: KeyPairGenerator kpgen = KeyPairGenerator.getInstance("ECDH", "SC"); ECGenParameterSpec genspec = new ECGenParameterSpec("secp256k1"); kpgen.initialize(genspec); ..

Read more

I want key hash. I am able to get valid key hash through code. I tried through the command line but got the wrong SHA key hash. Code (Valid Signature Hash) : try { PackageInfo info = getPackageManager().getPackageInfo("com.xyz.abc", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md; md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); String something = new ..

Read more

I’m trying to enable public key pinning since I don’t want to release updates for every certificate renewal provided I’ll use the same CSR every time. I generated the hash with this script. #!/bin/bash certs=`openssl s_client -servername $1 -host $1 -port 443 -showcerts </dev/null 2>/dev/null | sed -n ‘/Certificate chain/,/Server certificate/p’` rest=$certs while [[ "$rest" ..

Read more

I am trying to build the strongswan on Windows machine and I was following this guide strongswan android compilation process which I did it on centos virtual machine and on android studio I am getting this error and don’t know how to solve the problem make (e=87): The parameter is incorrect. make: *** [C:/Users/mohammad_safayet/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/build-binary.mk:600: C:/Users/mohammad_safayet/Projects/Java_Projects/Study/shared-dev/strongswan/src/frontends/android/app/src/main/obj/local/arm64-v8a/libcrypto_static.a] ..

Read more