History

avformat/tls_openssl: make generating fingerprints optional

Timo Rothenpieler committed 1 year ago

Commit 454f1611 parent 40ce64e1 file · +12 −8Browse files

Unified · Split

libavformat/tls_openssl.c+12−8
@@ -216,11 +216,13 @@ int ff_ssl_read_key_cert(char *key_url, char *cert_url, char *key_buf, size_t ke · 215 unmodified lines
216 snprintf(cert_buf, cert_sz, "%s", cert_tem);216 snprintf(cert_buf, cert_sz, "%s", cert_tem);
217 217
218 /* Generate fingerprint. */218 /* Generate fingerprint. */
219 *fingerprint = generate_fingerprint(cert);219 if (fingerprint) {
220 if (!*fingerprint) {220 *fingerprint = generate_fingerprint(cert);
221 av_log(NULL, AV_LOG_ERROR, "TLS: Failed to generate fingerprint from %s\n", cert_url);221 if (!*fingerprint) {
222 ret = AVERROR(EIO);222 av_log(NULL, AV_LOG_ERROR, "TLS: Failed to generate fingerprint from %s\n", cert_url);
223 goto end;223 ret = AVERROR(EIO);
224 goto end;
225 }
224 }226 }
225 227
226end:228end:
@@ -371,9 +373,11 @@ static int openssl_gen_certificate(EVP_PKEY *pkey, X509 **cert, char **fingerpri · 144 unmodified lines
371 goto einval_end;373 goto einval_end;
372 }374 }
373 375
374 *fingerprint = generate_fingerprint(*cert);376 if (fingerprint) {
375 if (!*fingerprint) {377 *fingerprint = generate_fingerprint(*cert);
376 goto enomem_end;378 if (!*fingerprint) {
379 goto enomem_end;
380 }
377 }381 }
378 382
379 goto end;383 goto end;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t