You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avformat/tls_openssl: make generating fingerprints optional
This commit is contained in:
@ -216,12 +216,14 @@ 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. */
|
||||
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:
|
||||
BIO_free(key_b);
|
||||
@ -371,10 +373,12 @@ static int openssl_gen_certificate(EVP_PKEY *pkey, X509 **cert, char **fingerpri
|
||||
goto einval_end;
|
||||
}
|
||||
|
||||
if (fingerprint) {
|
||||
*fingerprint = generate_fingerprint(*cert);
|
||||
if (!*fingerprint) {
|
||||
goto enomem_end;
|
||||
}
|
||||
}
|
||||
|
||||
goto end;
|
||||
enomem_end:
|
||||
|
Reference in New Issue
Block a user