Changeset 9725 in ntrip


Ignore:
Timestamp:
May 19, 2022, 2:09:16 PM (3 months ago)
Author:
stuerze
Message:

minor changes

Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncnetqueryv2.cpp

    r9723 r9725  
    206206  }
    207207
    208 
    209208  // Append Data
    210209  // -----------
  • trunk/BNC/src/upload/bncuploadcaster.cpp

    r9724 r9725  
    119119  emit newMessage("slotProxyAuthenticationRequired", true);
    120120}
    121 
    122 // TSL/SSL
    123  ////////////////////////////////////////////////////////////////////////////
    124  void bncUploadCaster::slotSslErrors(QList<QSslError> errors) {
    125    QString msg = "SSL Error: ";
    126    QSslCertificate cert = _outSocket->sslConfiguration().peerCertificate();
    127    if (!cert.isNull() &&
    128        cert.issuerInfo(QSslCertificate::OrganizationalUnitName).count() &&
    129        cert.issuerInfo(QSslCertificate::Organization).count()) {
    130 
    131      msg += QString("Server Certificate Issued by:\n"
    132                     "%1\n%2\nCannot be verified\n")
    133  #if QT_VERSION >= 0x050000
    134             .arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName).at(0))
    135             .arg(cert.issuerInfo(QSslCertificate::Organization).at(0));
    136  #else
    137             .arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName))
    138             .arg(cert.issuerInfo(QSslCertificate::Organization));
    139  #endif
    140    }
    141 
    142    QListIterator<QSslError> it(errors);
    143    while (it.hasNext()) {
    144      const QSslError& err = it.next();
    145      msg += err.errorString();
    146    }
    147    emit(newMessage(msg.toLatin1(), true));
    148 
    149    if (_sslIgnoreErrors) {cout << "_sslIgnoreErrors" << endl;
    150      if (_outSocket) {
    151        _outSocket->ignoreSslErrors();
    152        emit(newMessage("BNC ignores SSL errors as configured", true));
    153      } else {
    154        cout << "no Socket" << endl;
    155      }
    156    }
    157    else {
    158      delete _outSocket;
    159      _outSocket = 0;
    160    }
    161    return;
    162 }
    163 
    164121
    165122// Endless Loop
     
    237194
    238195  _outSocket = new QSslSocket();
    239 
     196  _outSocket->setProxy(QNetworkProxy::NoProxy);
    240197  _outSocket->setSslConfiguration(sslConfig);
    241   _outSocket->setProxy(QNetworkProxy::NoProxy);
     198  if (_sslIgnoreErrors) {
     199    _outSocket->ignoreSslErrors();
     200    emit(newMessage("BNC ignores SSL errors as configured", true));
     201  }
    242202
    243203  if (_proxy) {
     
    300260  }
    301261
    302   connect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
    303 
    304262  if (_ntripVersion == "1") {
    305263    msg = "SOURCE " + _password.toLatin1() + " /" + _mountpoint.toLatin1()
  • trunk/BNC/src/upload/bncuploadcaster.h

    r9715 r9725  
    3636 private slots:
    3737  void slotProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*);
    38   void slotSslErrors(QList<QSslError>);
    3938
    4039 private:
Note: See TracChangeset for help on using the changeset viewer.