"Fossies" - the Fresh Open Source Software Archive

Member "HTTPing-2.9/test_openssl.c" (29 Oct 2022, 773 Bytes) of package /linux/www/HTTPing-2.9.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /* Released under AGPL v3 with exception for the OpenSSL library. See license.txt */
    2 
    3 #include <stdio.h>
    4 #include <openssl/bio.h>
    5 #include <openssl/conf.h>
    6 #include <openssl/engine.h>
    7 #include <openssl/err.h>
    8 #include <openssl/evp.h>
    9 #include <openssl/md5.h>
   10 #include <openssl/ssl.h>
   11 #include <openssl/x509.h>
   12 
   13 int main(int argc, char *argv[])
   14 {
   15     BIO *bio_err = NULL;
   16 
   17     SSL_library_init();
   18     SSL_load_error_strings();
   19     ERR_load_crypto_strings();
   20 
   21     /* error write context */
   22     bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
   23 
   24     const SSL_METHOD *meth = SSLv23_method();
   25 
   26     SSL_CTX *ctx = SSL_CTX_new(meth);
   27 
   28     /***/
   29 
   30     BIO_free(bio_err);
   31 
   32     ERR_free_strings();
   33 
   34     ERR_remove_state(0);
   35     ENGINE_cleanup();
   36     CONF_modules_free();
   37     EVP_cleanup();
   38     CRYPTO_cleanup_all_ex_data();
   39 
   40     return 0;
   41 }