实验二 OpenSSL安装

截图

编译代码

tar xzvf   	openssl-1.1.1q.tar.gz 
cd openssl-1.1.1q
./config
make
sudo make install

验证代码

#include <stdio.h>
#include <openssl/evp.h>

int main(){
	
    OpenSSL_add_all_algorithms();
	
    return 0;
}
gcc -o to test_openssl.c -I /usr/local/ssl/inlcude -L /usr/local/ssl/lib -lssl -lcrypto -ldl -lpthread
./to;echo $?
posted @ 2022-10-26 14:17  戴骏  阅读(52)  评论(0)    收藏  举报