Changeset 9725 in ntrip
- Timestamp:
- May 19, 2022, 2:09:16 PM (3 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncnetqueryv2.cpp
r9723 r9725 206 206 } 207 207 208 209 208 // Append Data 210 209 // ----------- -
trunk/BNC/src/upload/bncuploadcaster.cpp
r9724 r9725 119 119 emit newMessage("slotProxyAuthenticationRequired", true); 120 120 } 121 122 // TSL/SSL123 ////////////////////////////////////////////////////////////////////////////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 >= 0x050000134 .arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName).at(0))135 .arg(cert.issuerInfo(QSslCertificate::Organization).at(0));136 #else137 .arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName))138 .arg(cert.issuerInfo(QSslCertificate::Organization));139 #endif140 }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 164 121 165 122 // Endless Loop … … 237 194 238 195 _outSocket = new QSslSocket(); 239 196 _outSocket->setProxy(QNetworkProxy::NoProxy); 240 197 _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 } 242 202 243 203 if (_proxy) { … … 300 260 } 301 261 302 connect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));303 304 262 if (_ntripVersion == "1") { 305 263 msg = "SOURCE " + _password.toLatin1() + " /" + _mountpoint.toLatin1() -
trunk/BNC/src/upload/bncuploadcaster.h
r9715 r9725 36 36 private slots: 37 37 void slotProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*); 38 void slotSslErrors(QList<QSslError>);39 38 40 39 private:
Note:
See TracChangeset
for help on using the changeset viewer.