简单介绍一下系统环境:

操作系统: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. C++ bool和string转换

    直接贴代码吧.用g++能够编译.測试ok #include <iostream> #include <sstream> using namespace std; int mai ...

  2. Android 应用开发实例之文件管理器

    2013-07-02 10.2 文件管理器 能够浏览和管理手机/存储卡上的文件和文件夹,包括重命名.删除.新建.复制.粘帖等文件操作. 由于需要浏览大量的文件/文件夹,所以需要使用一个ListView ...

  3. 【laravel54】查看版本号3种方式

    1:最简单的用命令行实现>进入项目目录,执行 > php artisan --version 2:查看文件 vendor\laravel\framework\src\Illuminate\ ...

  4. php实现二维数组排序array_multisort($ages, SORT_DESC, $home)函数

    1.sql查询排序参数是order by,那么php进行排序呢 可以参考array_multisrot函数 //php进行二维数组排序 -xzz1009 foreach($home as $home) ...

  5. ajax提交gb2312的中文,出现乱码

    解决方案:

  6. PHP-权限控制类(转)

    <?php /** * 权限控制类 */ class include_purview { /** * 类的唯一实例 */ private static $instance; /** * 权限常量 ...

  7. static 与单例模式、auto_ptr与单例模式、const 用法小结、mutable修饰符

    一.static 与单例模式 单例模式也就是简单的一种设计模式,它需要: 保证一个类只有一个实例,并提供一个全局访问点 禁止拷贝  C++ Code  1 2 3 4 5 6 7 8 9 10 11 ...

  8. TeleMCU视频会议系统添加字幕支持

    本文原创自 http://blog.csdn.net/voipmaker  转载注明出处. 最新版本号TeleMCU添加了字幕支持,与会者能够看到其它人的名字,做法是在与会者的视频上overlay 文 ...

  9. windows上通过secureCRT和putty创建密钥登录

    前面介绍了linux的ssh远程登录协议和ssh无password登录方式.这里在windows下通过secureCRT和putty登录linux来看一下详细的密钥创建,配置和登录.也算做个备忘录吧. ...

  10. tp读取器和写入器

    一.读取器 控制器调用如下: //以ID的方式查询数据$user=User::get(3);//查询ID为3的单条数据echo $user->username;//以对象的方式显示对应的字段值 ...