nikodream/esy.lock/overrides/d2b1c9f139f83685b7ed6db48df6a440/esy/test.c
Kaustubh Maske Patil 4194ae6fda initial commit
2025-05-06 19:31:10 +05:30

33 lines
827 B
C
Generated

/* From: https://wiki.openssl.org/index.php/Libcrypto_API */
#include <openssl/conf.h>
#include <openssl/evp.h>
#include <openssl/err.h>
int main(int arc, char *argv[])
{
/* Load the human readable error strings for libcrypto */
ERR_load_crypto_strings();
/* Load all digest and cipher algorithms */
OpenSSL_add_all_algorithms();
/* Load config file, and other important initialisation */
CONF_modules_load(NULL, NULL, 0);
printf("OpenSSL successfully initialized.\n");
/* Clean up */
/* Removes all digests and ciphers */
EVP_cleanup();
/* if you omit the next, a small leak may be left when you make use of the BIO (low level API) for e.g. base64 transformations */
CRYPTO_cleanup_all_ex_data();
/* Remove error strings */
ERR_free_strings();
return 0;
}