Skip to content

Instantly share code, notes, and snippets.

@hongta
Created July 2, 2020 02:31
Show Gist options
  • Select an option

  • Save hongta/751e369bc9867896d704a2469a0f7277 to your computer and use it in GitHub Desktop.

Select an option

Save hongta/751e369bc9867896d704a2469a0f7277 to your computer and use it in GitHub Desktop.
Upgrade openssl in CentOS

Upgrade OpenSSL to latest in CentOS 7

Prepare

yum group install 'Development Tools' && yum install perl-core libtemplate-perl zlib-devel 

Download and extract

> wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1g.tar.gz

> tar -xvzf OpenSSL_1_1_1g.tar.gz

> cd OpenSSL_1_1_1g

Configure and compile OpenSSL

> ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared zlib

> make
> make test
> make install

Replace old version

> cp /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/
> cp /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/
> cp -f /usr/local/openssl/bin/openssl /usr/bin/

Test new version

> openssl version

OpenSSL 1.1.1g  21 Apr 2020

> openssl genrsa -out ca-key.pem 

Generating RSA private key, 2048 bit long modulus (2 primes)
.......................+++++
..................................................................+++++
e is 65537 (0x010001)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment