openssl升级并发症
简单介绍一下系统环境:
操作系统: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升级并发症的更多相关文章
- CentOS6.5的openssl升级
CentOS6.5的openssl升级:(修复心脏漏血漏洞) [root@linux1 ~]# rpm -qi openssl|grep VersionVersion : 1.0.1e Vendor: ...
- 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 安装的时候,可能由 ...
- Openssl 升级操作
转自:http://www.cnblogs.com/lzcys8868/p/9235538.html 首先我觉得没事就用绿盟扫漏洞的公司,就是闲的蛋疼,傻逼!不少服务器使用nginx,如果openss ...
- openssl 升级操作 -2
首先我觉得没事就用绿盟扫漏洞的公司,就是闲的蛋疼,傻逼!不少服务器使用nginx,如果openssl 是静态编译的,直接将openssl 编译到nginx里面去了,这就意味着,单纯升级openssl ...
- linux环境中,openssl升级及openresty中nginx基于新版本openssl重新编译
需求说明: 最近在对系统进行安全扫描的时候,出现了openssl版本的问题,建议对openssl版本进行升级,在此记录下升级过程. 环境说明: 操作系统:RHEL 6.6 升级操作过程: 1.下载最新 ...
- nginx openssl升级支持http2
阿里云openssl升级,实现nginx主动推送 nginx主动推送能够有效减少不必要的报文传输,减少用户请求次数,以达到更快访问速度 现有版本检查 [root@node3 ~]# openssl v ...
- 阿里云openssl升级,实现nginx主动推送,nginx主动推送能够有效减少不必要的报文传输,减少用户请求次数,以达到更快访问速度
现有版本检查 [root@node3 ~]# openssl version #这个版本是无法支持http2.0主动推送功能.需要升级为2019版本. OpenSSL 1. ...
- Linux openssl 升级、降级
Linux openssl 升级.降级 最近遇到一些朋友使用微信退款,报openssl版本为问题,需要对openssl进行降级. 现在环境的openssl版本如下: root@c215a2b695ef ...
- 【转】linux /centos 中OpenSSL升级方法详解
相关软件下载地址 Apache:http://httpd.apache.org/ Nginx:http://nginx.org/en/download.html OpenSSL:http://www. ...
随机推荐
- 一致Hash算法
一致性哈希算法是分布式系统中经常使用的算法.比方,一个分布式的存储系统,要将数据存储到详细的节点上.假设採用普通的hash方法.将数据映射到详细的节点上,如key%N.key是数据的key.N是机器节 ...
- 【Django】TemplateDoesNotExist at /login/
在Django项目中配置一个简单的页面跳转 说明 OliverPro 为项目名称 ProApp 为应用程序 项目文件结构如下: 文件配置如下: 项目中的urls 应用程序urls views.py文件 ...
- javascript 模块化模式总结(二)
一.对象字面值 这种设计模式中,一个对象被描述为一组以逗号分隔的名称/值对括在大括号({})的集合.对象内部的名称可以是字符串或是标记符后跟着一个冒号":".在对象里最后一个名称/ ...
- nginx配置文件和一些用法
fastcgi配置: location ~ \.php$ { #fastcgi_pass unix:///tmp/php-cgi.sock; fastcgi_pass unix__tmp_php5_c ...
- Ubuntu下安装java
1.首先到java.com下载最新版本的jdk.下面是jdk8的网址: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-dow ...
- verilog之四位全加器的编译及仿真(用开源免费的软件——iverilog+GTKWave)
verilog之四位全加器的编译及仿真(用开源免费的软件——iverilog+GTKWave) 四位全加器的verilog的代码比比皆是,这里上一个比较简单的: /* 4位全加器全加器需要有输入输出, ...
- XCode5中新建工程后强制使用了ARC,如何去掉?
打开你的工程,点击目录的工程文件,最顶端蓝色的,然后选择project下你的工程,还是蓝色那项,然后build Settings,然后往下拉,在Apple LLVM 5.0 - Language - ...
- 使用802.1X+FreeRadius+LDAP实现网络准入方案
前言:在很多运维项目交流中,我们发现有一些运维团队还是在尝试使用网管或桌面管理来进行网络准入管理,但这两个技术有一定的缺点,所以本文分享一下802.1X+开源软件整合的网络准入管理的实践. 网络准入业 ...
- Coreseek:第一步配置文件
Windows操作系统下:mysql数据源配置:(相应coreseek-3.2.13-win32/etc/csft_mysql.conf) #源定义 source mysql { type = mys ...
- vim -d file01 file02 diff file01 file02 对比两文件的不同
[root@86 vhosts]# vim -d defaul.conf.bak zabbix.xinxianm.com.conf server { | server { listen 80; | l ...