//需要的OpenSSL的两个头文件 #include <openssl/aes.h> #include <openssl/rand.h> class CMyOpenSSL { private: //用来输出十六进制数据 static void show_buf(char const* title, unsigned char const* buf, int len) { 。。。。。。 } //需
1、首先需要安装openssl,一个开源的实现加解密和证书的专业系统。在centos下可以利用yum安装。 2、openssl的配置文件是openssl.cnf,我们一般就是用默认配置就可以。如果证书有特殊要求的话,可以修改配置适应需求。这样必须把相关的文件放到配置文件指定的目录下面。 3、首先需要利用openssl生成根证书,以后的服务器端证书或...
由于lua没有openss sdk做证书检查校验工作,那么就需要我们基于c语言和openssl库些一个so动态库,以供lua调用去判断证书有效时间、合法性、证书签发者信息等。 c函数从lua获取参数 与lua交互的c函数,所有函数入参参数固定为lua_State *L。 在lua调用c函数时,通过lua_State *L向其传入参数,如果只有一个参数且类型为...
make install PREFIX=/usr/local/luajit 注意环境变量! vi /etc/profile 在最下面添加 export LUAJIT_LIB=/usr/local/luajit/lib export LUAJIT_INC=/usr/local/luajit/include/luajit-2.1 然后执行 source /etc/profile 在/opt 目录下执行(随意) cd /opt mkdir nginx_module wget https://www.openssl.or...