Tag Archives: Openeuler

Openeuler: How to Install OpenSSL

OpenSSL installation under openeuler##

Download the latest version of OpenSSL openssl-3.0.0.tar.gz

Unzip the source code

tar xzvf openssl-3.0.0.tar.gz

Enter the source code directory

cd openssl-3.0.0

Compile the installation using the following command

./config
./Configure
sudo make install

Write test code

//test.c
#include <stdio.h>
#include <openssl/evp.h>
int main(){
    OpenSSL_add_all_algorithms();
    return 0;
}

Compiling and executing test code

Compile:
gcc -o to test.c -I openEuler/openssl3.0.0/include -L /openEuler/openssl3.0.0/ssl -ldl -Ipthread -lcrypto

Execute:
./to;echo $?
An error is reported and the OpenSSL development kit needs to be installed.
sudo yum install openssl-devel

    1. Print

Done!