Index: /trunk/BNC/src/bnccore.h
===================================================================
--- /trunk/BNC/src/bnccore.h	(revision 9737)
+++ /trunk/BNC/src/bnccore.h	(revision 9738)
@@ -30,4 +30,5 @@
 #include "bncrawfile.h"
 #include "bncephuser.h"
+#include "bncsslconfig.h"
 
 class bncComb;
@@ -56,6 +57,9 @@
   QDateTime         dateAndTimeGPS() const;
   void              setDateAndTimeGPS(QDateTime dateTime);
+  void              setSslConfiguration(const bncSslConfig& sslConfig) {_sslConfig = sslConfig;}
+  QString           confFileName() const {return _confFileName;}
   void              setConfFileName(const QString& confFileName);
-  QString           confFileName() const {return _confFileName;}
+  bncSslConfig      sslConfiguration() const {return _sslConfig;}
+
   void              writeRawData(const QByteArray& data, const QByteArray& staID,
                                  const QByteArray& format);
@@ -146,4 +150,5 @@
   QList<QTcpSocket*>*    _socketsCorr;
   bncCaster*             _caster;
+  bncSslConfig           _sslConfig;
   QString                _confFileName;
   QDate                  _fileDate;
Index: /trunk/BNC/src/bncmain.cpp
===================================================================
--- /trunk/BNC/src/bncmain.cpp	(revision 9737)
+++ /trunk/BNC/src/bncmain.cpp	(revision 9738)
@@ -81,6 +81,7 @@
   bool       displaySet   = false;
 #endif
-  QByteArray rawFileName;
-  QString    confFileName;
+  QByteArray   rawFileName;
+  QString      confFileName;
+  bncSslConfig sslConfig;
 
   QByteArray printHelp =
@@ -393,4 +394,6 @@
   BNC_CORE->setConfFileName( confFileName );
 
+  BNC_CORE->setSslConfiguration( sslConfig );
+
   bncSettings settings;
 
Index: /trunk/BNC/src/bncnetqueryv2.cpp
===================================================================
--- /trunk/BNC/src/bncnetqueryv2.cpp	(revision 9737)
+++ /trunk/BNC/src/bncnetqueryv2.cpp	(revision 9738)
@@ -135,6 +135,5 @@
   // ---------------
   QNetworkRequest request;
-  bncSslConfig sslConfig;
-  request.setSslConfiguration(sslConfig);
+  request.setSslConfiguration(BNC_CORE->sslConfiguration());
   request.setUrl(_url);
   request.setRawHeader("Host"         , _url.host().toLatin1());
@@ -239,5 +238,4 @@
     msg += err.errorString();
   }
-  BNC_CORE->slotMessage(msg.toLatin1(), true);
 
   if (_sslIgnoreErrors) {
@@ -246,4 +244,5 @@
   }
   else {
+    BNC_CORE->slotMessage(msg.toLatin1(), true);
     stop();
   }
Index: /trunk/BNC/src/upload/bncuploadcaster.cpp
===================================================================
--- /trunk/BNC/src/upload/bncuploadcaster.cpp	(revision 9737)
+++ /trunk/BNC/src/upload/bncuploadcaster.cpp	(revision 9738)
@@ -64,6 +64,4 @@
 
   _sslIgnoreErrors = (Qt::CheckState(settings.value("sslIgnoreErrors").toInt()) == Qt::Checked);
-
-  qRegisterMetaType<QList<QSslError> >("QList<QSslError>");
 
   _proxyOutHost = settings.value("proxyHost").toString();
@@ -196,5 +194,4 @@
 void bncUploadCaster::open() {
   const int timeOut = 5000;  // 5 seconds
-  bncSslConfig sslConfig;
   QByteArray msg;
 
@@ -222,6 +219,7 @@
 
   _outSocket = new QSslSocket();
+  _outSocket->setSslConfiguration(BNC_CORE->sslConfiguration());
   _outSocket->setProxy(QNetworkProxy::NoProxy);
-  _outSocket->setSslConfiguration(sslConfig);
+
   connect(_outSocket, SIGNAL(disconnected()), this, SLOT(slotSslSocketConnectionClosed()));
   connect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
@@ -339,6 +337,6 @@
 
 void bncUploadCaster::slotSslSocketConnectionClosed() {
-  disconnect(_outSocket, SIGNAL(disconnected()), this, SLOT(slotSslSocketConnectionClosed()));
-  disconnect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
+//  disconnect(_outSocket, SIGNAL(disconnected()), this, SLOT(slotSslSocketConnectionClosed()));
+//  disconnect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
   emit(newMessage("slotSslSocketConnectionClosed", true));
   if (_outSocket) {
