编译
ssl编译 shared:决定是否生成动态libssl动态库
// ./config --prefix=/usr/local --openssldir=/usr/local/openssl
./config shared --prefix=/usr/local --openssldir=/usr/local/openssl
libevent
./configure --prefix=/usr/local CPPFLAGS="-I/usr/local/include/openssl" LDFLAGS="-L/usr/local/lib -lssl -lcrypto"
各版本下载地址:
http://mirrors.ibiblio.org/openssl/source/old/1.0.1/
https://blog.51cto.com/sandshell/2131795
http://linux.51yip.com/search/openssl
https://blog.csdn.net/gengxiaoming7/article/details/78505107
https://www.jb51.net/article/124531.htm
https://www.cnblogs.com/yangxiaolan/p/6256838.html
https://www.cnblogs.com/binchen-china/p/5651142.html
https://blog.csdn.net/qq_37960324/article/details/83108698
https://www.jianshu.com/p/fb2ae3dc7986
//文件加密示例指令
openssl genrsa -out rsa_private.key 2048
openssl rsa -in rsa_private.key -pubout -out rsa_public.key
openssl rsautl -encrypt -pubin -inkey rsa_public.key -in readme.txt -out encryptpublic.txt //公钥加密
openssl rsautl -decrypt -inkey rsa_private.key -in encryptpublic.txt -out decryptprivate.txt //私钥解密
//私钥解密