openssl 升级

openssl 升级

  1. 检查当前版本

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    openssl version -a

    # 当前版本为 1.1.1h
    OpenSSL 1.1.1h 22 Sep 2020
    built on: Sun Apr 4 12:13:13 2021 UTC
    platform: linux-x86_64
    options: bn(64,64) rc4(8x,char) des(int) idea(int) blowfish(ptr)
    compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DZLIB -DNDEBUG
    OPENSSLDIR: "/etc/ssl"
    ENGINESDIR: "/usr/lib64/engines-1.1"
    Seeding source: os-specific进行版本升级
  2. 进行版本升级

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    cd /opt
    wget --no-check-certificat https://www.openssl.org/source/openssl-1.1.1m.tar.gz
    tar -zxvf openssl-1.1.1m.tar.gz
    cd openssl-1.1.1m
    ./config --shared
    make
    make install
    mv /usr/bin/openssl /usr/bin/openssl.old.20220112
    mv /usr/include/openssl /usr/include/openssl.old.20220112
    ln -s /usr/local/bin/openssl /usr/bin/openssl
    ln -s /usr/local/include/openssl /usr/include/openssl
    echo "/usr/local/lib64/" >> /etc/ld.so.conf
    ldconfig
  1. 检查升级后的版本

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    openssl version -a

    # 当前版本为 1.1.1m
    OpenSSL 1.1.1m 14 Dec 2021
    built on: Wed Jan 12 01:57:01 2022 UTC
    platform: linux-x86_64
    options: bn(64,64) rc4(8x,char) des(int) idea(int) blowfish(ptr)
    compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG
    OPENSSLDIR: "/usr/local/ssl"
    ENGINESDIR: "/usr/local/lib64/engines-1.1"
    Seeding source: os-specific