Commit 16c6deed authored by Richard Levitte's avatar Richard Levitte
Browse files

Fixup BIO demos for OpenSSL 1.1.x



Note: server-cmod doesn't seem to do things right...  from loading
cmod.cnf, it tries to load libssl_conf.so.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 08029dfa
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -23,10 +23,6 @@ int main(int argc, char **argv)
    const char *connect_str = "localhost:4433";
    int nargs = argc - 1;

    ERR_load_crypto_strings();
    ERR_load_SSL_strings();
    SSL_library_init();

    ctx = SSL_CTX_new(TLS_client_method());
    cctx = SSL_CONF_CTX_new();
    SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_CLIENT);
+0 −4
Original line number Diff line number Diff line
@@ -26,10 +26,6 @@ int main(int argc, char **argv)
    const char *connect_str = "localhost:4433";
    long errline = -1;

    ERR_load_crypto_strings();
    ERR_load_SSL_strings();
    SSL_library_init();

    conf = NCONF_new(NULL);

    if (NCONF_load(conf, "connect.cnf", &errline) <= 0) {
+1 −6
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@

static int done = 0;

void interrupt()
void interrupt(int sig)
{
    done = 1;
}
@@ -58,11 +58,6 @@ int main(int argc, char *argv[])
    else
        port = argv[1];

    SSL_load_error_strings();

    /* Add ciphers and message digests */
    OpenSSL_add_ssl_algorithms();

    ctx = SSL_CTX_new(TLS_server_method());
    if (!SSL_CTX_use_certificate_chain_file(ctx, CERT_FILE))
        goto err;
+0 −5
Original line number Diff line number Diff line
@@ -55,11 +55,6 @@ char *argv[];
    sock_init();
#endif

    /* Lets get nice error messages */
    SSL_load_error_strings();

    /* Setup all the global SSL stuff */
    OpenSSL_add_ssl_algorithms();
    ssl_ctx = SSL_CTX_new(TLS_client_method());

    /* Enable trust chain verification */
+1 −5
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
 */

#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
@@ -30,11 +31,6 @@ int main(int argc, char *argv[])
    char **args = argv + 1;
    int nargs = argc - 1;

    SSL_load_error_strings();

    /* Add ciphers and message digests */
    OpenSSL_add_ssl_algorithms();

    ctx = SSL_CTX_new(TLS_server_method());

    cctx = SSL_CONF_CTX_new();
Loading