1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/tls_openssl: remove all redundant "TLS: " in log with AVClass

Signed-off-by: Jack Lau <jacklau1222@qq.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This commit is contained in:
Jack Lau
2025-07-07 15:26:35 +08:00
committed by Timo Rothenpieler
parent dda91b87e8
commit e6af82c498

View File

@ -533,7 +533,7 @@ int ff_dtls_export_materials(URLContext *h, char *dtls_srtp_materials, size_t ma
ret = SSL_export_keying_material(c->ssl, dtls_srtp_materials, materials_sz, ret = SSL_export_keying_material(c->ssl, dtls_srtp_materials, materials_sz,
dst, strlen(dst), NULL, 0, 0); dst, strlen(dst), NULL, 0, 0);
if (!ret) { if (!ret) {
av_log(c, AV_LOG_ERROR, "TLS: Failed to export SRTP material, %s\n", openssl_get_error(c)); av_log(c, AV_LOG_ERROR, "Failed to export SRTP material, %s\n", openssl_get_error(c));
return -1; return -1;
} }
return 0; return 0;
@ -768,7 +768,7 @@ static av_cold int openssl_init_ca_key_cert(URLContext *h)
} else if (c->key_buf) { } else if (c->key_buf) {
pkey = pkey_from_pem_string(c->key_buf, 1); pkey = pkey_from_pem_string(c->key_buf, 1);
if (SSL_CTX_use_PrivateKey(p->ctx, pkey) != 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)); av_log(p, AV_LOG_ERROR, "Init SSL_CTX_use_PrivateKey failed, %s\n", openssl_get_error(p));
ret = AVERROR(EINVAL); ret = AVERROR(EINVAL);
goto fail; goto fail;
} }
@ -837,7 +837,7 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary **
/* Setup the SRTP context */ /* Setup the SRTP context */
if (SSL_CTX_set_tlsext_use_srtp(p->ctx, profiles)) { if (SSL_CTX_set_tlsext_use_srtp(p->ctx, profiles)) {
av_log(p, AV_LOG_ERROR, "TLS: Init SSL_CTX_set_tlsext_use_srtp failed, profiles=%s, %s\n", av_log(p, AV_LOG_ERROR, "Init SSL_CTX_set_tlsext_use_srtp failed, profiles=%s, %s\n",
profiles, openssl_get_error(p)); profiles, openssl_get_error(p));
ret = AVERROR(EINVAL); ret = AVERROR(EINVAL);
return ret; return ret;
@ -896,12 +896,12 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary **
ret = dtls_handshake(h); ret = dtls_handshake(h);
// Fatal SSL error, for example, no available suite when peer is DTLS 1.0 while we are DTLS 1.2. // Fatal SSL error, for example, no available suite when peer is DTLS 1.0 while we are DTLS 1.2.
if (ret < 0) { if (ret < 0) {
av_log(p, AV_LOG_ERROR, "TLS: Failed to drive SSL context, ret=%d\n", ret); av_log(p, AV_LOG_ERROR, "Failed to drive SSL context, ret=%d\n", ret);
return AVERROR(EIO); return AVERROR(EIO);
} }
} }
av_log(p, AV_LOG_VERBOSE, "TLS: Setup ok, MTU=%d\n", p->tls_shared.mtu); av_log(p, AV_LOG_VERBOSE, "Setup ok, MTU=%d\n", p->tls_shared.mtu);
ret = 0; ret = 0;
fail: fail: