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 52AEB410B1 for ; Sun, 13 Jul 2025 19:26:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 36A4968E329; Sun, 13 Jul 2025 22:25:40 +0300 (EEST) Received: from btbn.de (btbn.de [144.76.60.213]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 889FA68E310 for ; Sun, 13 Jul 2025 22:25:28 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 55C2627FD36F4; Sun, 13 Jul 2025 21:25:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1752434725; 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=+c4+ZdsbvkXaV0joNAjS395YFMP0caoJit7/sQxIBAI=; b=jQZ7jMP9rieIGJm6ig2rCwYVWtnQWLffgMaE31eTFBDQbsTWqbzMkqD6cByb+bLRr25oqQ vt20qCeTYP35yw2vvNR/pNZXXEqCNkl+PjYMCVGMDgdBC7bwi94ObKRsy+2/G8JXIg975H YChBi8/Rx3L2ep0NTfSuLflWRs5QhO5YWxruloTNYrgPn0SDS07KkxyOiw97q900RmO7SW WiXcwIayTELq4cjn3v8w6evRhZKuUo+ZiGY1AjDVsgkgfns4zoCpq6jeNxh9PybTPYsvC7 XyEPcrNFO+33GlQ6dqRZC2p4fTJtj30RGmBmCIXb4mP10oDqTBq4/7eG8ZiVQA== From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Sun, 13 Jul 2025 21:24:47 +0200 Message-ID: <20250713192512.928390-13-timo@rothenpieler.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250713192512.928390-1-timo@rothenpieler.org> References: <20250713192512.928390-1-timo@rothenpieler.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 13/14] avformat/tls_openssl: make generating fingerprints optional 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 | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index cd11419fee..48d8edb08a 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -216,11 +216,13 @@ int ff_ssl_read_key_cert(char *key_url, char *cert_url, char *key_buf, size_t ke snprintf(cert_buf, cert_sz, "%s", cert_tem); /* Generate fingerprint. */ - *fingerprint = generate_fingerprint(cert); - if (!*fingerprint) { - av_log(NULL, AV_LOG_ERROR, "TLS: Failed to generate fingerprint from %s\n", cert_url); - ret = AVERROR(EIO); - goto end; + if (fingerprint) { + *fingerprint = generate_fingerprint(cert); + if (!*fingerprint) { + av_log(NULL, AV_LOG_ERROR, "TLS: Failed to generate fingerprint from %s\n", cert_url); + ret = AVERROR(EIO); + goto end; + } } end: @@ -371,9 +373,11 @@ static int openssl_gen_certificate(EVP_PKEY *pkey, X509 **cert, char **fingerpri goto einval_end; } - *fingerprint = generate_fingerprint(*cert); - if (!*fingerprint) { - goto enomem_end; + if (fingerprint) { + *fingerprint = generate_fingerprint(*cert); + if (!*fingerprint) { + goto enomem_end; + } } goto end; -- 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".