From 6eda19da8f9edf164914a2eb62e47474f766d365 Mon Sep 17 00:00:00 2001
From: Don Gagne <don@thegagnes.com>
Date: Sun, 12 Oct 2014 19:52:12 -0700
Subject: [PATCH] Add SSL check

---
 src/main.cc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/main.cc b/src/main.cc
index b945d85..bef2636 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -29,6 +29,8 @@ This file is part of the QGROUNDCONTROL project
  */
 
 #include <QApplication>
+#include <QSslSocket>
+
 #include "QGCCore.h"
 #include "MainWindow.h"
 #include "configuration.h"
@@ -148,6 +150,14 @@ int main(int argc, char *argv[])
             firstStart = false;
         }
         core = new QGCCore(firstStart, argc, argv);
+        
+        if (!QSslSocket::supportsSsl()) {
+            QMessageBox::critical(NULL,
+                                  QObject::tr("Missing SSL Support"),
+                                  QObject::tr("QGroundControl requires support for SSL to be installed prior to running. Please see http://www.qgroundcontrol.org/downloads for instructions on installing prerequisites for QGroundControl."));
+            return 1;
+        }
+        
         val = core->exec();
     } while (core->getRestartRequested());