FreeBSD更新HTTPS的OpenSSL版本
Step1)查詢HTTPS的OpenSSL版本
#curl -k --head http://localhost
Step2)預設OpenSSL的函示庫在FreeBSD的base系統,需要先獨立出來進行安裝,但因為機器為12.1版本已超過終止更新服務,需要更新到12.4的版本。
#freebsd-update -r 12.4-RELEASE upgrade
#freebsd-update install
#reboot
#freebsd-update install
Step3)如果不使用freebsd的base system的openssl,在/etc/make.conf新增以下文字,會改成使用openssl套件。
DEFAULT_VERSIONS+= ssl=openssl
Step4)更新ports與安裝portupgrade
#portsnap fetch update
#pkg install portupgrade
Step5)使用ports安裝OpenSSL
portupgrade -N security/openssl
Step6)所有需要OpenSSL的套件重新編譯與安裝
portupgrade -Rrf security/openssl
Step7)查詢HTTPS的OpenSSL版本,更改為1.1.1q
#curl -k --head http://localhost
HTTP/1.1 200 OK
Date: Tue, 24 Jan 2023 20:02:31 GMT
Server: Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd
Last-Modified: Mon, 23 Jan 2023 12:50:05 GMT
ETag: "2d-5f2edd6a629c2"
Accept-Ranges: bytes
Content-Length: 45
Content-Type: text/html