how to download the ssl certificate from a website?

In order to download the certificate, you need to use the client built into openssl like so: echo -n | openssl s_client -connect $HOST:$PORTNUMBER -servername $SERVERNAME \ | openssl x509 > /tmp/$SERVERNAME.cert That will save the certificate to /tmp/$SERVERNAME.cert. The -servername is used to select the correct certificate when multiple are presented, in the case … Read more

Displaying a remote SSL certificate details using CLI tools

You should be able to use OpenSSL for your purpose: echo | openssl s_client -showcerts -servername gnupg.org -connect gnupg.org:443 2>/dev/null | openssl x509 -inform pem -noout -text That command connects to the desired website and pipes the certificate in PEM format on to another openssl command that reads and parses the details. (Note that “redundant” … Read more

How to disable cURL SSL certificate verification

Simply add the -k switch somewhere before the url. Disclaimer: Use this at your own risk. -k, –insecure (TLS) By default, every SSL connection curl makes is verified to be secure. This option allows curl to proceed and operate even for server connections otherwise considered insecure. The server connection is verified by making sure the server’s certificate … Read more

urllib and “SSL: CERTIFICATE_VERIFY_FAILED” Error

If you just want to bypass verification, you can create a new SSLContext. By default newly created contexts use CERT_NONE. Be careful with this as stated in section 17.3.7.2.1 When calling the SSLContext constructor directly, CERT_NONE is the default. Since it does not authenticate the other peer, it can be insecure, especially in client mode where most of time you … Read more

Caused by: java.security.UnrecoverableKeyException: Cannot recover key

I am supplied with a jks keystore named ABCC_client.store. When I import this keystore to cacerts and try connecting it says No such Algorithm error. PFA the stacktrace But if I use this keystore independently i.e without adding it to cacerts it works. Some googling led to me to http://joewlarson.com/blog/2009/03/25/java-ssl-use-the-same-password-for-keystore-and-key/ which says that password might … Read more

What exactly is cacert.pem for?

cacert.pem is a bundle of CA certificates that you use to verify that the server is really the correct site you’re talking to (when it presents its certificate in the SSL handshake). The bundle can be used by tools like curl or wget, as well as other TLS/SSL speaking software. The bundle should contain the … Read more

Java: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The problem appears when your server has self signed certificate. To workaround it you can add this certificate to the list of trusted certificates of your JVM. In this article author describes how to fetch the certificate from your browser and add it to cacerts file of your JVM. You can either edit JAVA_HOME/jre/lib/security/cacerts file or run you … Read more

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