openresty - 支持国密算法(国密实验室版本)

目的:openresty 支持国密SSL

linux版本:centOS 7.9

openresty:1.19.3.1

gmopenssl:1.1_b4

mkdir /usr/local/gm-openresty
# 安装所需依赖包
RUN yum -y install perl make gcc gcc-c++ libstdc++-devel pcre-devel zlib-devel net-tools pcre wget && \
yum clean all && \
wget https://www.gmssl.cn/gmssl/Tool_Down?File=gmssl_openssl_1.1_b4.tar.gz && tar xzfm Tool_Down?File=gmssl_openssl_1.1_b4.tar.gz -C /usr/local && \
wget https://openresty.org/download/openresty-1.19.3.1.tar.gz && tar xzfm openresty-1.19.3.1.tar.gz && \
ln -s /usr/lib64/libpcre.so.1 /usr/lib64/libpcre.so.3

sed -i 's#$OPENSSL/.openssl/#$OPENSSL/#p' /usr/local/gm-openresty/openresty-1.19.3.1/bundle/nginx-1.19.3/auto/lib/openssl/conf

cd openresty-1.19.3.1
./configure \
--prefix=/usr/local/gm-openresty \
--without-http_gzip_module \
--with-pcre="/home/gm-openresty/kong-build-tools-master/work/pcre-8.44" \
--with-pcre-jit \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_v2_module \
--with-stream_realip_module \
--with-stream_ssl_preread_module \
--with-file-aio \
--with-openssl="/usr/local/gmssl" \
--with-cc-opt="-I/usr/local/gmssl/include" \
--with-ld-opt="-L/usr/local/gmssl/lib -Wl,--disable-new-dtags,-rpath,/usr/local/gmssl/lib" \
--add-module="/home/gm-openresty/kong-build-tools-master/work/lua-kong-nginx-module" \
--add-module="/home/gm-openresty/kong-build-tools-master/work/lua-kong-nginx-module/stream"

gmake

gmake install

# Add additional binaries into PATH for convenience
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin

参考:

https://blog.csdn.net/beijuliao8459/article/details/100963789

https://www.cnblogs.com/wiseo/p/14964183.html

posted on 2021-09-08 14:08  TrustNature  阅读(834)  评论(0编辑  收藏  举报