Changeset 9795 in ntrip for trunk/BNC/src/bncwindow.cpp


Ignore:
Timestamp:
Jul 22, 2022, 1:34:16 PM (21 months ago)
Author:
stuerze
Message:

consideration of client SSL certificates, if they are available

File:
1 edited

Legend:

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

    r9783 r9795  
    195195          this, SLOT(slotBncTextChanged()));
    196196
    197   _sslCaCertPathLineEdit   = new QLineEdit(settings.value("sslCaCertPath").toString());
    198   _sslIgnoreErrorsCheckBox = new QCheckBox();
     197  _sslCaCertPathLineEdit     = new QLineEdit(settings.value("sslCaCertPath").toString());
     198  _sslClientCertPathLineEdit = new QLineEdit(settings.value("sslClientCertPath").toString());
     199  _sslIgnoreErrorsCheckBox   = new QCheckBox();
    199200  _sslIgnoreErrorsCheckBox->setCheckState(Qt::CheckState(
    200201                                          settings.value("sslIgnoreErrors").toInt()));
     
    762763  pLayout->addWidget(_sslCaCertPathLineEdit,                                 3, 1, 1,10);
    763764  pLayout->addWidget(new QLabel("Default:  " + bncSslConfig::defaultPath()), 3,11, 1,20);
    764   pLayout->addWidget(new QLabel("Ignore SSL authorization errors"),          4, 0);
    765   pLayout->addWidget(_sslIgnoreErrorsCheckBox,                               4, 1, 1,10);
    766   pLayout->addWidget(new QLabel(""),                                         5, 1);
     765  pLayout->addWidget(new QLabel("Path to SSL client certificates"),          4, 0);
     766  pLayout->addWidget(_sslClientCertPathLineEdit,                             4, 1, 1,10);
     767  pLayout->addWidget(new QLabel("Ignore SSL authorization errors"),          5, 0);
     768  pLayout->addWidget(_sslIgnoreErrorsCheckBox,                               5, 1, 1,10);
     769  pLayout->addWidget(new QLabel(""),                                         6, 1);
    767770  pLayout->setRowStretch(6, 999);
    768771
     
    13701373  _proxyHostLineEdit->setWhatsThis(tr("<p>If you are running BNC within a protected Local Area Network (LAN), you may need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator. Without any entry, BNC will try to use the system proxies. </p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the Ntrip Broadcasters. If this is not possible, you may need to run BNC outside your LAN on a network that has unobstructed connection to the Internet. <i>[key: proxyHost]</i></p>"));
    13711374  _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case a proxy is operated in front of BNC. <i>[key: proxyPort]</i></p>"));
    1372   _sslCaCertPathLineEdit->setWhatsThis(tr("<p>Communication with an Ntrip Broadcaster over SSL requires the exchange of client and/or server certificates. Specify the path to a directory where you save certificates on your system. Don't try communication via SSL if you are not sure whether this is supported by the involved Ntrip Broadcaster.</p><p>Note that SSL communication is usually done over port 443. <i>[key: sslCaCertPath]</i></p>"));
     1375  _sslCaCertPathLineEdit->setWhatsThis(tr("<p>Communication with an Ntrip Broadcaster over SSL requires the exchange of server certificates. Specify the path to a directory where you save CA certificates on your system. </p><p>BNC creates from *.crt and *.pem files a CA certificate database, which is used by the socket during the handshake phase to validate the peer's certificate. </p><p>Don't try communication via SSL if you are not sure whether this is supported by the involved Ntrip Broadcaster.</p><p>Note that SSL communication is usually done over port 443. <i>[key: sslCaCertPath]</i></p>"));
     1376  _sslClientCertPathLineEdit->setWhatsThis(tr("<p>Two-sided communication with an Ntrip Broadcaster over SSL requires in addition the exchange of client certificates. Specify the full path to the client certificates on your system.</p><p></p><p>The file naming convention for client certificates in BNC is as follows: &lt;hostname&gt;.&lt;port&gt;.crt for the certificate and &lt;hostname&gt;.&lt;port&gt;.key for the private key, where &lt;hostname&gt; is without https://. </p><p> If available, the client or personal authentication certificate is presented to the peer during the SSL handshake process. Password protected key files are not supported. </p><p>Don't try communication via two sided SSL if you are not sure whether this is supported by the involved Ntrip Broadcaster. </p><p>Note that SSL communication is usually done over port 443. <i>[key: sslClientCertPath]</i></p>"));
    13731377  _sslIgnoreErrorsCheckBox->setWhatsThis(tr("<p>SSL communication may involve queries coming from the Ntrip Broadcaster. Tick 'Ignore SSL authorization errors' if you don't want to be bothered with this. <i>[key: sslIgnoreErrors]</i></p>"));
    13741378
     
    15931597  delete _proxyPortLineEdit;
    15941598  delete _sslCaCertPathLineEdit;
     1599  delete _sslClientCertPathLineEdit;
    15951600  delete _sslIgnoreErrorsCheckBox;
    15961601  delete _logFileLineEdit;
     
    17801785
    17811786  settings.setValue("sslCaCertPath",   _sslCaCertPathLineEdit->text());
     1787  settings.setValue("sslClientCertPath",   _sslClientCertPathLineEdit->text());
    17821788  settings.setValue("sslIgnoreErrors", _sslIgnoreErrorsCheckBox->checkState());
    17831789
     
    20552061  settings.setValue("proxyPort",   _proxyPortLineEdit->text());
    20562062  settings.setValue("sslCaCertPath",   _sslCaCertPathLineEdit->text());
    2057   settings.setValue("sslIgnoreErrors",  _sslIgnoreErrorsCheckBox->checkState());
     2063  settings.setValue("sslClientCertPath", _sslClientCertPathLineEdit->text());
     2064  settings.setValue("sslIgnoreErrors", _sslIgnoreErrorsCheckBox->checkState());
    20582065// General
    20592066  settings.setValue("logFile",     _logFileLineEdit->text());
Note: See TracChangeset for help on using the changeset viewer.