123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- From f13b5eaafd9d4d4e22bddeabd22ef8cef2481261 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
- Date: Tue, 19 Nov 2013 00:09:34 +0100
- Subject: [PATCH 18/23] gnutls: HACK to enable https playback on iOS
- Note that certificates presented by a server won't verified at all so we cannot trust the stream
- ---
- modules/misc/gnutls.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
- diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
- index 4a6056a..1d70ea5 100644
- --- a/modules/misc/gnutls.c
- +++ b/modules/misc/gnutls.c
- @@ -40,6 +40,10 @@
- #include <gnutls/x509.h>
- #include "dhparams.h"
-
- +#if defined (__APPLE__)
- +#include <TargetConditionals.h>
- +#endif
- +
- /*****************************************************************************
- * Module descriptor
- *****************************************************************************/
- @@ -291,9 +295,11 @@ static int gnutls_CertSearch (vlc_tls_t *obj, const char *host,
- return -1;
- }
-
- +#if !TARGET_OS_IPHONE
- if (dialog_Question (obj, _("Insecure site"), vlc_gettext (msg),
- _("Abort"), _("View certificate"), NULL, host) != 2)
- return -1;
- +#endif
-
- gnutls_x509_crt_t cert;
- gnutls_datum_t desc;
- @@ -308,11 +314,15 @@ static int gnutls_CertSearch (vlc_tls_t *obj, const char *host,
- }
- gnutls_x509_crt_deinit (cert);
-
- +#if !TARGET_OS_IPHONE
- val = dialog_Question (obj, _("Insecure site"),
- _("This is the certificate presented by %s:\n%s\n\n"
- "If in doubt, abort now.\n"),
- _("Abort"), _("Accept 24 hours"),
- _("Accept permanently"), host, desc.data);
- +#else
- + val = 2;
- +#endif
- gnutls_free (desc.data);
-
- time_t expiry = 0;
- --
- 1.8.3.4 (Apple Git-47)
|