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