Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 608244
Collapse All | Expand All

(-)a/src/openvpn/ssl_openssl.c (-4 / +7 lines)
Lines 508-517 tls_ctx_load_ecdh_params(struct tls_root_ctx *ctx, const char *curve_name Link Here
508
        const EC_GROUP *ecgrp = NULL;
508
        const EC_GROUP *ecgrp = NULL;
509
        EVP_PKEY *pkey = NULL;
509
        EVP_PKEY *pkey = NULL;
510
        /* Little hack to get private key ref from SSL_CTX, yay OpenSSL... */
510
        SSL *ssl = SSL_new(ctx->ctx);
511
        SSL ssl;
511
        if (!ssl)
512
        ssl.cert = ctx->ctx->cert;
512
        {
513
        pkey = SSL_get_privatekey(&ssl);
513
            crypto_msg(M_FATAL, "SSL_new failed");
514
        }
515
        pkey = SSL_get_privatekey(ssl);
516
        SSL_free(ssl);
514
        msg(D_TLS_DEBUG, "Extracting ECDH curve from private key");
517
        msg(D_TLS_DEBUG, "Extracting ECDH curve from private key");

Return to bug 608244