How to make browser trust localhost SSL certificate? [closed]

tl;dr Generate a certificate issued by own CA (see the script below) Here’s what I’ve found. Correct me where I’m wrong. There are CA’s (certificate authorities). They issue certificates (sign CSR’s) for other CA’s (intermediate CA’s), or servers (end entity certificates). Some of them are root authorities. They have self-signed certificates, issued by themselves. That … Read more

How to compile python3 on RHEL with SSL? SSL cannot be imported

Had a very similar problem, with openssl not working and giving the same errors with python 3.10 on centos 7. Download openssl unpack then go to that directory ./config –prefix=/usr/local/custom-openssl –openssldir=/etc/ssl make -j1 depend make -j8 make install_sw Then go to the python source unpack it and run in the directory ./configure -C –with-openssl=/usr/local/custom-openssl –with-openssl-rpath=auto … Read more

SSLError: sslv3 alert handshake failure

Jyo de Lys has identified the problem. The problem is described here and the solution is here. I did the following to get this working: easy_install pyOpenSSL easy_install ndg-httpsclient easy_install pyasn1 If you’re getting this error while using urllib2, you’ll need to upgrade to python 2.7.9 or later too.

Why does RSA encrypted text give me different results for the same text

A secure RSA encryption is implemented with an appropriate padding scheme, which includes some randomness. See PKCS#1 or OAEP for more details. The RSA encryption encrypts message padded with ‘0’s and a string of random bit. In the process, the random string is “hidden” in the ciphertext by cryptographic hashing and XORing. On decryption, the … Read more

Cross Compile OpenSSH for ARM

To cross compile openSHH for ARM (in my case a mini2440) I did following: Install arm cross compiler – (eg. what is arm-linux-gcc and how to install this in ubuntu) Download: Zlib OpenSSL OpenSSH Build Zlib: cd zlib-1.2.7 CC=arm-linux-gnueabi-gcc ./configure –prefix=$HOME/zlibArm make make install Build OpenSSL: export cross=arm-linux-gnueabi- cd openssl-1.0.1c ./Configure dist –prefix=$HOME/opensslArm make CC=”${cross}gcc” … Read more

SSL error unsafe legacy renegotiation disabled

WARNING: When enabling Legacy Unsafe Renegotiation, SSL connections will be vulnerable to the Man-in-the-Middle prefix attack as described in CVE-2009-3555. With the help of https://bugs.launchpad.net/bugs/1963834 and https://bugs.launchpad.net/ubuntu/+source/gnutls28/+bug/1856428 Beware that editing your system’s openssl.conf is not recommended, because you might lose your changes once openssl is updated. Create a custom openssl.cnf file in any directory with … Read more

Generate Subject Hash of X509Certificate in Java

This generates a short 8 digit hash 1817886a There are two forms of this from OpenSSL: $ cd openssl-1.0.2-src $ grep -R X509_subject_name_hash * … crypto/x509/x509.h:unsigned long X509_subject_name_hash(X509 *x); crypto/x509/x509.h:unsigned long X509_subject_name_hash_old(X509 *x); crypto/x509/x509_cmp.c:unsigned long X509_subject_name_hash(X509 *x) crypto/x509/x509_cmp.c:unsigned long X509_subject_name_hash_old(X509 *x) … Generate Subject Hash of X509Certificate in Java… Here is the source for them … Read more