From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 6635E4FDD1 for ; Wed, 2 Jul 2025 16:59:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 7651B68D43F; Wed, 2 Jul 2025 19:57:27 +0300 (EEST) Received: from btbn.de (btbn.de [144.76.60.213]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 97A0768D20B for ; Wed, 2 Jul 2025 19:57:11 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id BA02627FFCCBA; Wed, 02 Jul 2025 18:57:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1751475429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z481GfexspUb5CPfAsDDnAF7iVGiCBovkeBrW0WDuxs=; b=hQXJGPtKOknwPa32jhNB8Jrcyi5IOF/Y6iCV6ta9e/knQ18ISxFPZzV3tGlpjx88pENorE KuWyCZ9LU1HzdAawEo0g+ImCMVI/eQ4y4Eh1gHzoS++VeR9qBvS1tJ/ITUMHXMIHGoGIzz /H1boN10RWBRMn+ZRoWESulHBxzenfLL29Kr+ih9yuwuciFL6KT5J6WEMt7tTGPTUSopxO D7PxXypY2DGfexsIfrOPsQ+Yd7igqDkG2slv5fnpJStrbq2HCpTnCTHgO/4C217ylAY2Nl JanXJBiiAz+Mu1Dq/EDMaAWRg9NBc/5F/BDyss1WmN85OulrtcczebIU23BaXQ== From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Wed, 2 Jul 2025 18:56:45 +0200 Message-ID: <20250702165655.1325-18-timo@rothenpieler.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250702165655.1325-1-timo@rothenpieler.org> References: <20250702165655.1325-1-timo@rothenpieler.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 17/18] avformat/tls_openssl: use existing context handle X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Timo Rothenpieler Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- libavformat/tls_openssl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 5805513065..6c994b3b89 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -842,14 +842,14 @@ static av_cold int openssl_init_ca_key_cert(URLContext *h) ret = AVERROR(EIO); goto fail; } - } else if (p->tls_shared.cert_buf) { - cert = cert_from_pem_string(p->tls_shared.cert_buf); + } else if (c->cert_buf) { + cert = cert_from_pem_string(c->cert_buf); if (SSL_CTX_use_certificate(p->ctx, cert) != 1) { av_log(p, AV_LOG_ERROR, "SSL: Init SSL_CTX_use_certificate failed, %s\n", openssl_get_error(p)); ret = AVERROR(EINVAL); return ret; } - } else if (p->tls_shared.is_dtls){ + } else if (c->is_dtls){ av_log(p, AV_LOG_ERROR, "TLS: Init cert failed, %s\n", openssl_get_error(p)); ret = AVERROR(EINVAL); goto fail; @@ -863,14 +863,14 @@ static av_cold int openssl_init_ca_key_cert(URLContext *h) ret = AVERROR(EIO); goto fail; } - } else if (p->tls_shared.key_buf) { - p->pkey = pkey = pkey_from_pem_string(p->tls_shared.key_buf, 1); + } else if (c->key_buf) { + p->pkey = pkey = pkey_from_pem_string(c->key_buf, 1); if (SSL_CTX_use_PrivateKey(p->ctx, pkey) != 1) { av_log(p, AV_LOG_ERROR, "TLS: Init SSL_CTX_use_PrivateKey failed, %s\n", openssl_get_error(p)); ret = AVERROR(EINVAL); return ret; } - } else if (p->tls_shared.is_dtls){ + } else if (c->is_dtls) { av_log(p, AV_LOG_ERROR, "TLS: Init pkey failed, %s\n", openssl_get_error(p)); ret = AVERROR(EINVAL); goto fail; -- 2.49.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".