[vlc-commits] tls: fix the way to ignore CA check
Thomas Guillem
git at videolan.org
Mon Feb 5 10:42:58 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Feb 5 10:41:24 2018 +0100| [5d27e15cb1ad0e72b5dd5c48bd33ba429b53ec6a] | committer: Thomas Guillem
tls: fix the way to ignore CA check
You had one job...
see 0d8b5004b5df9b235a945da00eec50163a5e8e5c and
1c24e8b96435c1e438653c4fa017634072ca99cf
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=5d27e15cb1ad0e72b5dd5c48bd33ba429b53ec6a
---
modules/misc/gnutls.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index 57429a0b99..1b214358d4 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -445,7 +445,8 @@ static int gnutls_ClientHandshake(vlc_tls_creds_t *creds, vlc_tls_t *tls,
gnutls_free (desc.data);
}
- if (status == (GNUTLS_CERT_SIGNER_NOT_FOUND | GNUTLS_CERT_INVALID) &&
+ const unsigned status_insecure = GNUTLS_CERT_SIGNER_NOT_FOUND | GNUTLS_CERT_INVALID;
+ if ((status & status_insecure) == status_insecure &&
(creds->obj.flags & OBJECT_FLAGS_INSECURE))
{
msg_Info( creds, "Accepting self-signed/untrusted CA certificate." );
More information about the vlc-commits
mailing list