Skip to content

Commit

Permalink
Disable ca file loading
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Ehlers <[email protected]>
  • Loading branch information
b-m-f committed Mar 30, 2023
1 parent 884a280 commit 9901a9f
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions src/player/PlayerComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,33 +135,7 @@ bool PlayerComponent::componentInitialize()
mpv::qt::set_property(m_mpv, "tls-verify", "no");
} else {
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
QList<QByteArray> list;
list << "/etc/ssl/certs/ca-certificates.crt"
<< "/etc/pki/tls/certs/ca-bundle.crt"
<< "/usr/share/ssl/certs/ca-bundle.crt"
<< "/usr/local/share/certs/ca-root-nss.crt"
<< "/etc/ssl/cert.pem"
<< "/usr/share/curl/curl-ca-bundle.crt"
<< "/usr/local/share/curl/curl-ca-bundle.crt"
<< "/var/lib/ca-certificates/ca-bundle.pem";

bool success = false;

for (auto path : list)
{
if (access(path.data(), R_OK) == 0) {
mpv::qt::set_property(m_mpv, "tls-ca-file", path.data());
mpv::qt::set_property(m_mpv, "tls-verify", "yes");
success = true;
break;
}
}

if (!success)
throw FatalException(tr("Failed to locate CA bundle."));
#else
// We need to not use Shinchiro's personal CA file...
mpv::qt::set_property(m_mpv, "tls-ca-file", "");
mpv::qt::set_property(m_mpv, "tls-verify", "yes");
#endif
}

Expand Down

0 comments on commit 9901a9f

Please sign in to comment.