-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathtest_openssl.c
More file actions
42 lines (31 loc) · 788 Bytes
/
Copy pathtest_openssl.c
File metadata and controls
42 lines (31 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* Released under GPLv2 with exception for the OpenSSL library. See license.txt */
/* $Revision$ */
#include <stdio.h>
#include <openssl/bio.h>
#include <openssl/conf.h>
#include <openssl/engine.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/md5.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
int main(int argc, char *argv[])
{
BIO *bio_err = NULL;
SSL_library_init();
SSL_load_error_strings();
ERR_load_crypto_strings();
/* error write context */
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
const SSL_METHOD *meth = SSLv23_method();
SSL_CTX *ctx = SSL_CTX_new(meth);
/***/
BIO_free(bio_err);
ERR_free_strings();
ERR_remove_state(0);
ENGINE_cleanup();
CONF_modules_free();
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
return 0;
}