This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 4ad20a2c09c41f064b367abc6291fba93941db6e Author: Jack Lau <[email protected]> AuthorDate: Fri Jan 23 11:17:29 2026 +0800 Commit: Gyan Doshi <[email protected]> CommitDate: Wed Jan 28 10:47:07 2026 +0000 avformat/tls_gnutls: set key and cert when they're PEM string Signed-off-by: Jack Lau <[email protected]> --- libavformat/tls_gnutls.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c index e6d73bff61..d0358c162c 100644 --- a/libavformat/tls_gnutls.c +++ b/libavformat/tls_gnutls.c @@ -573,8 +573,20 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op ret = AVERROR(EIO); goto fail; } - } else if (s->cert_file || s->key_file) + } else if (s->cert_file || s->key_file) { av_log(h, AV_LOG_ERROR, "cert and key required\n"); + } else if (s->cert_buf && s->key_buf) { + gnutls_datum_t cert_data = { .data = s->cert_buf, .size = strlen(s->cert_buf)}; + gnutls_datum_t pkey_data = { .data = s->key_buf, .size = strlen(s->key_buf)}; + ret = gnutls_certificate_set_x509_key_mem(c->cred, &cert_data, &pkey_data, GNUTLS_X509_FMT_PEM); + if (ret < 0) { + av_log(h, AV_LOG_ERROR, "Unable to set cert/key memory: %s\n", gnutls_strerror(ret)); + ret = AVERROR(EINVAL); + goto fail; + } + } else if (s->cert_buf || s->key_buf) { + av_log(h, AV_LOG_ERROR, "cert and key required\n"); + } if (s->listen && !s->cert_file && !s->cert_buf && !s->key_file && !s->key_buf) { av_log(h, AV_LOG_VERBOSE, "No server certificate provided, using self-signed\n"); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
