简单介绍一下系统环境:

操作系统:redhat6.3 ,安装的主要涉及到的包有:

root@192.168.100.252:/root# rpm -qa | grep ssh
openssh-.3p1-.el6.x86_64
openssh-server-.3p1-.el6.x86_64
openssh-clients-.3p1-.el6.x86_64
libssh2-1.2.-.el6.x86_64
root@192.168.100.252:/root# rpm -qa | grep openssl
openssl-1.0.-.el6.x86_64
openssl-devel-1.0.-.el6.x86_64

下面要做的就是把openssl升级到当前稳定版本 [源码升级,简单透明]

root@192.168.100.252:/data/installs/openssl-1.0.0m# ./config --prefix=/usr/local/openssl/ --openssldir=/usr/local/ssl shared zlib-dynamic
root@192.168.100.252:/data/installs/openssl-1.0.0m# make
root@192.168.100.252:/data/installs/openssl-1.0.0m# make test
root@192.168.100.252:/data/installs/openssl-1.0.0m# make install
...[回显省略]....
root@192.168.100.252:/data/installs/openssl-1.0.0m# cd /usr/local/openssl/
root@192.168.100.252:/usr/local/openssl# ls include/
openssl
root@192.168.100.252:/usr/local/openssl# ls lib/
engines libcrypto.a libcrypto.so libcrypto.so.1.0. libssl.a libssl.so libssl.so.1.0. pkgconfig

config参数解析一下:

--prefix=DIR : Install in DIR/bin, DIR/lib, DIR/include/openssl. Configuration files used by OpenSSL will be in DIR/ssl or the directory specified by --openssldir.

--openssldir=DIR : Directory for OpenSSL files. If no prefix is specified, the library files and binaries are also installed there.

shared : In addition to the usual static libraries, create shared libraries on platforms where it's supported. See "Note on shared libraries" below.

zlib-dynamic : Like "zlib", but has OpenSSL load the zlib library dynamically when needed. This is only supported on systems where loading of shared libraries is supported. This is the default choice.

-------------Note on shared libraries-----------

Shared libraries have certain caveats. Binary backward compatibility can't be guaranteed before OpenSSL version 1.0. The only reason to use them would be to conserve memory on systems where several programs are using OpenSSL. For some systems, the OpenSSL Configure script knows what is needed to build shared libraries for libcrypto and libssl. On these systems, the shared libraries are currently not created by default, but giving the option "shared" will get them created. This method supports Makefile targets for shared library creation, like linux-shared. Those targets can currently be used on their own just as well, but this is expected to change in future versions of OpenSSL.

生词比较多,翻译一下:共享库一些说明:1.0之前的版本不保证向后的兼容性,而且还坚持使用1.0之前的版本的唯一目的是为了保存多个正在使用openssl的程序的内存,某些系统在使用openssl编译的时候,脚本会识别需要添加的libcrypto和libssh库,对于这些系统,共享库没有默认立即创建,而是提供shared选项,以这种方式提供共享库的创建。例如linux-shared,这些编译出来的文件可以在当前系统上正常运行,但是这些对于以后的版本,openssl可能会做一些修改。

从INSTALL文件上可以看到,openssl升级对于某些正在使用openssl动态链接库的程序保持了兼容性,但是如果要坚持编译新的动态链接库,将导致基于老版本的openssl的其他程序出现未知的错误(下面的sshd的问题就讲到了这个问题)

下面来查查sshd服务启动失败的原因

上面的图中可以看到/usr/bin/ssh调用了三个有crypt字段动态链接库:

libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f89404a7000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f893fc3e000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f893f2d8000)

其中/usr/lib64/libcrypto.so.10 是调用了最新编译的动态链接库,这个库也是前面编译出来的库之一,很明显是由于这个库的替换导致sshd服务启动失败。

下面讲下外网服务器openssl升级的情况:

升级脚本:

./config --prefix=/usr/ --openssldir=/usr/local/openssl
make
make test
make install

这样升级会产生一堆的新文件替换原来的旧文件:

/usr/lib64
drwxr-xr-x root root Jan : engines
-rw-r--r-- root root Jan : libcrypto.a
-rw-r--r-- root root Jan : libssl.a
drwxr-xr-x root root Jan : pkgconfig /usr/include/openssl/*.h /usr/bin
-rwxr-xr-x 1 root root 4265 Jan 23 11:57 c_rehash
-rwxr-xr-x 1 root root 569237 Jan 23 11:57 openssl

这些文件都是直接替换,如果不做备份,根本没法还原。。。外网服务器上的窟噜够大啦

建议小伙伴们没事就别去做这个升级了,除非你深刻的知道你的系统调用openssl动态链接库的程序很少,否则,极其有可能导致你系统在重启后一堆的未知error。

openssl升级并发症的更多相关文章

  1. CentOS6.5的openssl升级

    CentOS6.5的openssl升级:(修复心脏漏血漏洞) [root@linux1 ~]# rpm -qi openssl|grep VersionVersion : 1.0.1e Vendor: ...

  2. tomcat 8.0安装ssl证书,及centos7.2 的openssl升级到最新版本,及ERR_SSL_OBSOLETE_CIPHER错误解决

    openssl官网https://www.openssl.org/source/下载最新的文件 2017-Feb-16 12:03:39 openssl-1.1.0e.tar.gz 安装的时候,可能由 ...

  3. Openssl 升级操作

    转自:http://www.cnblogs.com/lzcys8868/p/9235538.html 首先我觉得没事就用绿盟扫漏洞的公司,就是闲的蛋疼,傻逼!不少服务器使用nginx,如果openss ...

  4. openssl 升级操作 -2

    首先我觉得没事就用绿盟扫漏洞的公司,就是闲的蛋疼,傻逼!不少服务器使用nginx,如果openssl 是静态编译的,直接将openssl 编译到nginx里面去了,这就意味着,单纯升级openssl ...

  5. linux环境中,openssl升级及openresty中nginx基于新版本openssl重新编译

    需求说明: 最近在对系统进行安全扫描的时候,出现了openssl版本的问题,建议对openssl版本进行升级,在此记录下升级过程. 环境说明: 操作系统:RHEL 6.6 升级操作过程: 1.下载最新 ...

  6. nginx openssl升级支持http2

    阿里云openssl升级,实现nginx主动推送 nginx主动推送能够有效减少不必要的报文传输,减少用户请求次数,以达到更快访问速度 现有版本检查 [root@node3 ~]# openssl v ...

  7. 阿里云openssl升级,实现nginx主动推送,nginx主动推送能够有效减少不必要的报文传输,减少用户请求次数,以达到更快访问速度

    现有版本检查 [root@node3 ~]# openssl version               #这个版本是无法支持http2.0主动推送功能.需要升级为2019版本. OpenSSL 1. ...

  8. Linux openssl 升级、降级

    Linux openssl 升级.降级 最近遇到一些朋友使用微信退款,报openssl版本为问题,需要对openssl进行降级. 现在环境的openssl版本如下: root@c215a2b695ef ...

  9. 【转】linux /centos 中OpenSSL升级方法详解

    相关软件下载地址 Apache:http://httpd.apache.org/ Nginx:http://nginx.org/en/download.html OpenSSL:http://www. ...

随机推荐

  1. MySQL 中now()时间戳用法

    MySQL 中now()时间戳用法 UPDATE news set addtime = unix_timestamp(now()); #结果:1452001082  

  2. Java生成各种条形码

    import java.awt.image.BufferedImage; import java.io.FileOutputStream; import org.jbarcode.JBarcode; ...

  3. Generator [ˈdʒenəreɪtə(r)] 函数结构

    Generator函数是ES6新增的一种异步编程方案. 说明:Generator函数指的是一种新的语法结构,是一个遍历器对象生成器,它内部可以封装多个状态,非常适合用于异步操作. Generator函 ...

  4. javascript 作用域 通俗解释

    首先将作用域比喻为一座大楼: 第一层表示当前执行作用域.大楼顶层表示全局作用域. (1)js首先会在当前楼层进行查找变量,如果没有找到,就做电梯往上一层(二层)楼查找. (2)若还是没有找到继续往上查 ...

  5. 解决Android SDK Manager下载问题和android studio每次启动都要在fetching Android sdk compoment information

    1.能解决国内访问Google服务器的困难启动 Android SDK Manager ,打开主界面,依次选择「Tools」.「Options...」,弹出『Android SDK Manager - ...

  6. LaTeX 中文段首空格问题

    一般用 “\\”或者回车可以使得下一段段首空两格,但是对于第一段就不行了. 解决办法:  加一个\usepackage{indentfirst}就可以

  7. Linux下connect超时处理

    1.前言 最近在写一个测试工具,要求快速的高效率的扫描出各个服务器开放了哪些端口.当时想了一下,ping只能检测ip,判断服务器的网络是连通的,而不能判断是否开放了端口.我们知道端口属于网络的传输层, ...

  8. 迅为4412开发板Linux驱动教程——总线_设备_驱动注冊流程具体解释

    视频下载地址: 驱动注冊:http://pan.baidu.com/s/1i34HcDB 设备注冊:http://pan.baidu.com/s/1kTlGkcR 总线_设备_驱动注冊流程具体解释 • ...

  9. OpenSAML2.X 在SSO系统中的应用

    背景 年底的时候有机会开发一个SPA(单页面应用)的项目,那时候须要用到票据的方式能够用Cookie的方式来登录.当是想到了OpenID或者是CAS的方式来做统一认证中心.后来一个安全界的大牛推荐让我 ...

  10. 常用maven 仓库地址

    maven下载jar的时候会去寻国外的地址,因此造成了下载jar很缓慢,影响开发效率,于是就出现maven镜像地址,可以使我们开发人员迅速下载相关的jar. 在maven的config的setting ...