在 Debian 上更新 openssl

在 Debian 上更新 openssl

我從[原始碼][1]在Debian Lenny(armv4架構)上編譯了OpenSSL-1.0.1e。我按照說明進行操作http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html編譯原始碼。makemake testmake install順利完成。但是,OpenSSL 顯示我仍然有舊版本

OpenSSL> version
OpenSSL 0.9.8g 19 Oct 2007

我該如何更新 OpenSSL?我需要/usr/bin用新編譯的openssl二進位檔案替換舊的二進位(在 中)嗎?

編輯:make test輸出:所有測試成功。

make[1]: Leaving directory `/home/openssl-1.0.1e/test'
OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
OpenSSL 1.0.1e 11 Feb 2013
built on: Mon Jun 10 05:08:05 UTC 2013
platform: dist
options:  bn(32,32) rc4(ptr,int) des(idx,cisc,2,long) idea(int) blowfish(idx) 
compiler: cc -O
OPENSSLDIR: "/usr/local/ssl"

make install輸出:

make[1]: Leaving directory `/home/openssl-1.0.1e/engines'
making install in apps...
make[1]: Entering directory `/home/openssl-1.0.1e/apps'
installing openssl
installing CA.sh
installing CA.pl
installing tsget
make[1]: Leaving directory `/home/openssl-1.0.1e/apps'
making install in test...
make[1]: Entering directory `/home/openssl-1.0.1e/test'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/home/openssl-1.0.1e/test'
making install in tools...
make[1]: Entering directory `/home/openssl-1.0.1e/tools'
make[1]: Leaving directory `/home/openssl-1.0.1e/tools'
installing libcrypto.a
installing libssl.a
cp libcrypto.pc /usr/local/ssl/lib/pkgconfig
chmod 644 /usr/local/ssl/lib/pkgconfig/libcrypto.pc
cp libssl.pc /usr/local/ssl/lib/pkgconfig
chmod 644 /usr/local/ssl/lib/pkgconfig/libssl.pc
cp openssl.pc /usr/local/ssl/lib/pkgconfig
chmod 644 /usr/local/ssl/lib/pkgconfig/openssl.pc

-------------------------------------------------- -------------------

編輯2: 我已經apt-get --purge remove openssl刪除舊版本了。openssl在終端輸出上執行-bash: /usr/bin/openssl: No such file or directory。如果我執行,/usr/local/ssl/bin/openssl那麼它會使用正確的版本來執行 openssl 。

我不確定哪些文件連結到哪裡?我還是個嘗試學習Linux的新手。由於設備處理器上的一些問題,我正在使用的設備不支援squeeze或Wheezy,所以我必須手動編譯它。我相信如果你能回答這兩個問題就可以解決問題:

/usr/local/ssl/bin/openssl1)如果我複製到會有效嗎/usr/bin/openssl?但是,它會導致任何問題嗎?

或 2)我在文檔中讀到:

 This will build and install OpenSSL in the default location, which is (for
 historical reasons) /usr/local/ssl. If you want to install it anywhere else,
 run config like this:

  $ ./config --prefix=/usr/local --openssldir=/usr/local/openssl

您能告訴我需要為 Debian 定義哪些目錄(對於 --prefix 和 openssldir)嗎?然後我可以再次編譯原始程式碼。

./config --prefix=/usr         \
         --openssldir=/etc/ssl \
         shared                \
         linux-armv4           \
         zlib-dynamic

答案1

OpenSSL 通常被認為是核心包,因為許多其他套件都使用它來提供安全功能,我建議不要手動滾動核心包,除非您對潛在影響有特別好的了解。如果你手動滾動它,我建議安裝在提供的包上,而不是將其安裝到/usr/local甚至你的用戶主目錄中,並編譯你需要的任何需要更新的庫的地方,作為他們的構建過程的一部分-這是您不會破壞依賴 openssl 的其他二進位套件。如果您手動捲動 openssl,則每次發布更新時都需要重建它(並且可能每次也需要重建其他依賴套件,具體取決於變更)。

是否可以將您的 Debian 安裝更新到最新的穩定版本?預設包括 v1.0.1e(請參閱http://packages.debian.org/search?suite=wheezy&searchon=names&keywords=openssl)並且意味著您無需額外努力即可獲得未來的更新。

相關內容