Changeset 3353 in ntrip


Ignore:
Timestamp:
Aug 22, 2011, 3:42:21 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncnetqueryv2.cpp

    r3352 r3353  
    3939    stop();
    4040  }
     41  _ignoreSslErrors = false;
    4142}
    4243
     
    198199void bncNetQueryV2::slotSslErrors(QList<QSslError> errors) {
    199200
    200   QString msg = "SSL Errors";
    201   QListIterator<QSslError> it(errors);
    202   while (it.hasNext()) {
    203     const QSslError& err = it.next();
    204     msg += "\n" + err.errorString();
    205   }
    206 
     201  QString msg = "SSL Error\n";
    207202  QSslCertificate cert = _reply->sslConfiguration().peerCertificate();
    208203  if (!cert.isNull()) {
    209     QString issuer = QString("\nIssued by:\n%1\n%2\n")
     204    msg = QString("Server Certificate Issued by:\n"
     205                  "%1\n%2\nCannot be verified\n")
    210206      .arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName))
    211207      .arg(cert.issuerInfo(QSslCertificate::Organization));
    212     msg += issuer;
     208  }
     209  else {
     210    QListIterator<QSslError> it(errors);
     211    while (it.hasNext()) {
     212      const QSslError& err = it.next();
     213      msg += "\n" + err.errorString();
     214    }
    213215  }
    214216
    215217  ((bncApp*)qApp)->slotMessage(msg.toAscii(), true);
    216218
    217   _reply->ignoreSslErrors();
    218 }
     219  if (_ignoreSslErrors) {
     220    _reply->ignoreSslErrors();
     221  }
     222  else {
     223    stop();
     224  }
     225}
  • trunk/BNC/bncnetqueryv2.h

    r3337 r3353  
    2929  bool                   _firstData;
    3030  bool                   _secure;
     31  bool                   _ignoreSslErrors;
    3132};
    3233
Note: See TracChangeset for help on using the changeset viewer.