avformat/tls_openssl: make generating fingerprints optional
This commit is contained in:
parent
40ce64eae7
commit
454f161b4b
1 changed files with 12 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue