[gnome-builder/gnome-builder-3-30] main: remove early SSL overrides



commit 0271908225d009eb4cb632629861d33612f656e0
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 8 12:40:16 2018 -0700

    main: remove early SSL overrides
    
    These aren't needed any longer in our flatpak builds.

 src/main.c | 39 ---------------------------------------
 1 file changed, 39 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 6bfad3c6c..989720326 100644
--- a/src/main.c
+++ b/src/main.c
@@ -63,40 +63,6 @@ early_params_check (gint    *argc,
     early_mode = IDE_APPLICATION_MODE_TOOL;
 }
 
-static void
-early_ssl_check (void)
-{
-  /*
-   * This tries to locate the SSL cert.pem and overrides the environment
-   * variable. Otherwise, chances are we won't be able to validate SSL
-   * certificates while inside of flatpak.
-   *
-   * Ideally, we will be able to delete this once Flatpak has a solution
-   * for SSL certificate management inside of applications.
-   */
-  if (ide_is_flatpak ())
-    {
-      if (NULL == g_getenv ("SSL_CERT_FILE"))
-        {
-          static const gchar *ssl_cert_paths[] = {
-            "/etc/pki/tls/cert.pem",
-            "/etc/ssl/cert.pem",
-            NULL
-          };
-
-          for (guint i = 0; ssl_cert_paths[i]; i++)
-            {
-              if (g_file_test (ssl_cert_paths[i], G_FILE_TEST_EXISTS))
-                {
-                  g_setenv ("SSL_CERT_FILE", ssl_cert_paths[i], TRUE);
-                  g_message ("Using ā€œ%sā€ for SSL_CERT_FILE.", ssl_cert_paths[i]);
-                  break;
-                }
-            }
-        }
-    }
-}
-
 int
 main (int   argc,
       char *argv[])
@@ -130,11 +96,6 @@ main (int   argc,
   /* Extract options like -vvvv and --type=worker only */
   early_params_check (&argc, &argv);
 
-  /* We might need to prime SSL environment and other bits before
-   * the application has had a chance to setup caches/etc.
-   */
-  early_ssl_check ();
-
   /* Log what desktop is being used to simplify tracking down
    * quirks in the future.
    */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]