0018-gnutls-HACK-to-enable-https-playback-on-iOS.patch 1.8 KB

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