Unified · Split
| @@ -836,14 +836,14 @@ static av_cold int openssl_init_ca_key_cert(URLContext *h) · 835 unmodified lines | ||
| 836 | 836 | ret = AVERROR(EIO); |
| 837 | 837 | goto fail; |
| 838 | 838 | } |
| 839 | − } else if (p->tls_shared.cert_buf) { | |
| 840 | − cert = cert_from_pem_string(p->tls_shared.cert_buf); | |
| 839 | + } else if (c->cert_buf) { | |
| 840 | + cert = cert_from_pem_string(c->cert_buf); | |
| 841 | 841 | if (SSL_CTX_use_certificate(p->ctx, cert) != 1) { |
| 842 | 842 | av_log(p, AV_LOG_ERROR, "SSL: Init SSL_CTX_use_certificate failed, %s\n", openssl_get_error(p)); |
| 843 | 843 | ret = AVERROR(EINVAL); |
| 844 | 844 | return ret; |
| 845 | 845 | } |
| 846 | − } else if (p->tls_shared.is_dtls){ | |
| 846 | + } else if (c->is_dtls){ | |
| 847 | 847 | av_log(p, AV_LOG_ERROR, "TLS: Init cert failed, %s\n", openssl_get_error(p)); |
| 848 | 848 | ret = AVERROR(EINVAL); |
| 849 | 849 | goto fail; |
| @@ -857,14 +857,14 @@ static av_cold int openssl_init_ca_key_cert(URLContext *h) · 7 unmodified lines | ||
| 857 | 857 | ret = AVERROR(EIO); |
| 858 | 858 | goto fail; |
| 859 | 859 | } |
| 860 | − } else if (p->tls_shared.key_buf) { | |
| 861 | − p->pkey = pkey = pkey_from_pem_string(p->tls_shared.key_buf, 1); | |
| 860 | + } else if (c->key_buf) { | |
| 861 | + p->pkey = pkey = pkey_from_pem_string(c->key_buf, 1); | |
| 862 | 862 | if (SSL_CTX_use_PrivateKey(p->ctx, pkey) != 1) { |
| 863 | 863 | av_log(p, AV_LOG_ERROR, "TLS: Init SSL_CTX_use_PrivateKey failed, %s\n", openssl_get_error(p)); |
| 864 | 864 | ret = AVERROR(EINVAL); |
| 865 | 865 | return ret; |
| 866 | 866 | } |
| 867 | − } else if (p->tls_shared.is_dtls){ | |
| 867 | + } else if (c->is_dtls) { | |
| 868 | 868 | av_log(p, AV_LOG_ERROR, "TLS: Init pkey failed, %s\n", openssl_get_error(p)); |
| 869 | 869 | ret = AVERROR(EINVAL); |
| 870 | 870 | goto fail; |