QGIS API Documentation 3.41.0-Master (57ec4277f5e)
Loading...
Searching...
No Matches
qgsauthsslconfigwidget.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthsslconfigwidget.cpp
3 ---------------------
4 begin : May 17, 2015
5 copyright : (C) 2015 by Boundless Spatial, Inc. USA
6 author : Larry Shaffer
7 email : lshaffer at boundlessgeo dot com
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
18#include "moc_qgsauthsslconfigwidget.cpp"
20
21#include <QDialogButtonBox>
22#include <QPushButton>
23#include <QSpinBox>
24#include <QUrl>
25
26#include "qgsauthguiutils.h"
27#include "qgsauthmanager.h"
28#include "qgslogger.h"
29#include "qgsapplication.h"
30
31
32static const QString configFoundText_() { return QObject::tr( "Configuration loaded from database" ); }
33static const QString configNotFoundText_() { return QObject::tr( "Configuration not found in database" ); }
34
35QgsAuthSslConfigWidget::QgsAuthSslConfigWidget( QWidget *parent, const QSslCertificate &cert, const QString &hostport, const QList<QSslCertificate> &connectionCAs )
36 : QWidget( parent )
37 , mCert( nullptr )
38 , mConnectionCAs( connectionCAs )
39{
40 if ( QgsApplication::authManager()->isDisabled() )
41 {
42 mDisabled = true;
43 mAuthNotifyLayout = new QVBoxLayout;
44 this->setLayout( mAuthNotifyLayout );
45 mAuthNotify = new QLabel( QgsApplication::authManager()->disabledMessage(), this );
46 mAuthNotifyLayout->addWidget( mAuthNotify );
47 }
48 else
49 {
50 setupUi( this );
51 connect( btnCertInfo, &QToolButton::clicked, this, &QgsAuthSslConfigWidget::btnCertInfo_clicked );
52
53 connect( grpbxSslConfig, &QGroupBox::toggled, this, &QgsAuthSslConfigWidget::configEnabledChanged );
56
57 setUpSslConfigTree();
58
59 lblLoadedConfig->setVisible( false );
60 lblLoadedConfig->clear();
61
62 connect( leHost, &QLineEdit::textChanged, this, &QgsAuthSslConfigWidget::validateHostPortText );
63
64 if ( !cert.isNull() )
65 {
66 setSslCertificate( cert, hostport );
67 }
68 }
69}
70
72{
73 if ( mDisabled )
74 {
75 return nullptr;
76 }
77 return grpbxCert;
78}
79
81{
82 if ( mDisabled )
83 {
84 return nullptr;
85 }
86 return grpbxSslConfig;
87}
88
89// private
90QTreeWidgetItem *QgsAuthSslConfigWidget::addRootItem( const QString &label )
91{
92 QTreeWidgetItem *item = new QTreeWidgetItem(
93 QStringList() << label,
94 static_cast<int>( ConfigParent )
95 );
97 item->setTextAlignment( 0, Qt::AlignVCenter );
98 item->setFlags( item->flags() & ~Qt::ItemIsSelectable );
99 treeSslConfig->insertTopLevelItem( treeSslConfig->topLevelItemCount(), item );
100
101 return item;
102}
103
104void QgsAuthSslConfigWidget::setUpSslConfigTree()
105{
106 treeSslConfig->setColumnCount( 1 );
107
108 // add config field names
109 mProtocolItem = addRootItem( tr( "Protocol" ) );
110 mProtocolCmbBx = new QComboBox( treeSslConfig );
111 mProtocolCmbBx->addItem( QgsAuthCertUtils::getSslProtocolName( QSsl::SecureProtocols ), static_cast<int>( QSsl::SecureProtocols ) );
112 mProtocolCmbBx->addItem( QgsAuthCertUtils::getSslProtocolName( QSsl::TlsV1_0 ), static_cast<int>( QSsl::TlsV1_0 ) );
113 mProtocolCmbBx->setMaximumWidth( 300 );
114 mProtocolCmbBx->setCurrentIndex( 0 );
115 QTreeWidgetItem *protocolitem = new QTreeWidgetItem(
116 mProtocolItem,
117 QStringList() << QString(),
118 static_cast<int>( ConfigItem )
119 );
120 protocolitem->setFlags( protocolitem->flags() & ~Qt::ItemIsSelectable );
121 treeSslConfig->setItemWidget( protocolitem, 0, mProtocolCmbBx );
122 mProtocolItem->setExpanded( true );
123
124 mVerifyModeItem = addRootItem( tr( "Peer verification" ) );
125 mVerifyPeerCmbBx = new QComboBox( treeSslConfig );
126 mVerifyPeerCmbBx->addItem( tr( "Verify Peer Certs" ), static_cast<int>( QSslSocket::VerifyPeer ) );
127 mVerifyPeerCmbBx->addItem( tr( "Do Not Verify Peer Certs" ), static_cast<int>( QSslSocket::VerifyNone ) );
128 mVerifyPeerCmbBx->setMaximumWidth( 300 );
129 mVerifyPeerCmbBx->setCurrentIndex( 0 );
130 QTreeWidgetItem *peerverifycmbxitem = new QTreeWidgetItem(
131 mVerifyModeItem,
132 QStringList() << QString(),
133 static_cast<int>( ConfigItem )
134 );
135 peerverifycmbxitem->setFlags( peerverifycmbxitem->flags() & ~Qt::ItemIsSelectable );
136 treeSslConfig->setItemWidget( peerverifycmbxitem, 0, mVerifyPeerCmbBx );
137 mVerifyModeItem->setExpanded( true );
138
139 mVerifyDepthItem = addRootItem( tr( "Peer verification depth (0 = complete cert chain)" ) );
140 mVerifyDepthSpnBx = new QSpinBox( treeSslConfig );
141 mVerifyDepthSpnBx->setMinimum( 0 );
142 mVerifyDepthSpnBx->setMaximum( 10 );
143 mVerifyDepthSpnBx->setMaximumWidth( 200 );
144 mVerifyDepthSpnBx->setAlignment( Qt::AlignHCenter );
145 QTreeWidgetItem *peerverifyspnbxitem = new QTreeWidgetItem(
146 mVerifyDepthItem,
147 QStringList() << QString(),
148 static_cast<int>( ConfigItem )
149 );
150 peerverifyspnbxitem->setFlags( peerverifyspnbxitem->flags() & ~Qt::ItemIsSelectable );
151 treeSslConfig->setItemWidget( peerverifyspnbxitem, 0, mVerifyDepthSpnBx );
152 mVerifyDepthItem->setExpanded( true );
153
154 mIgnoreErrorsItem = addRootItem( tr( "Ignore errors" ) );
155
156 const QList<QPair<QSslError::SslError, QString>> errenums = QgsAuthCertUtils::sslErrorEnumStrings();
157 for ( int i = 0; i < errenums.size(); i++ )
158 {
159 QTreeWidgetItem *item = new QTreeWidgetItem(
160 mIgnoreErrorsItem,
161 QStringList() << errenums.at( i ).second,
162 static_cast<int>( ConfigItem )
163 );
164 item->setCheckState( 0, Qt::Unchecked );
165 item->setTextAlignment( 0, Qt::AlignVCenter );
166 item->setFlags( item->flags() & ~Qt::ItemIsSelectable );
167 item->setData( 0, Qt::UserRole, errenums.at( i ).first );
168 }
169 mIgnoreErrorsItem->setExpanded( true );
170}
171
173{
175 if ( mDisabled )
176 {
177 return config;
178 }
179 config.setSslCertificate( mCert );
180 config.setSslHostPort( leHost->text() );
181 config.setSslProtocol( sslProtocol() );
185 return config;
186}
187
189{
190 if ( mDisabled )
191 {
192 return QSslCertificate();
193 }
194 return mCert;
195}
196
198{
199 if ( mDisabled )
200 {
201 return QString();
202 }
203 return leHost->text();
204}
205
207{
208 if ( mDisabled )
209 {
210 return;
211 }
212 if ( grpbxSslConfig->isCheckable() )
213 {
214 grpbxSslConfig->setChecked( enable );
215 }
216}
217
218void QgsAuthSslConfigWidget::setSslCertificate( const QSslCertificate &cert, const QString &hostport )
219{
220 if ( mDisabled )
221 {
222 return;
223 }
224 if ( cert.isNull() )
225 {
226 return;
227 }
228 mCert = cert;
229
230 if ( !hostport.isEmpty() )
231 {
232 setSslHost( hostport );
233 }
234
235 const QString sha( QgsAuthCertUtils::shaHexForCert( cert ) );
236 const QgsAuthConfigSslServer config(
237 QgsApplication::authManager()->sslCertCustomConfig( sha, hostport.isEmpty() ? sslHost() : hostport )
238 );
239
240 emit certFoundInAuthDatabase( !config.isNull() );
241
242 lblLoadedConfig->setVisible( true );
243 if ( !config.isNull() )
244 {
245 loadSslCustomConfig( config );
246 leCommonName->setStyleSheet( QgsAuthGuiUtils::greenTextStyleSheet() );
247 }
248 else
249 {
250 lblLoadedConfig->setText( configNotFoundText_() );
251 leCommonName->setText( QgsAuthCertUtils::resolvedCertName( mCert ) );
252 leCommonName->setStyleSheet( QgsAuthGuiUtils::orangeTextStyleSheet() );
253 }
254 validateHostPortText( leHost->text() );
255}
256
258{
259 if ( mDisabled )
260 {
261 return;
262 }
264 if ( config.isNull() )
265 {
266 QgsDebugError( QStringLiteral( "Passed-in SSL custom config is null" ) );
267 return;
268 }
269
270 const QSslCertificate cert( config.sslCertificate() );
271 if ( cert.isNull() )
272 {
273 QgsDebugError( QStringLiteral( "SSL custom config's cert is null" ) );
274 return;
275 }
276
278 mCert = cert;
279 leCommonName->setText( QgsAuthCertUtils::resolvedCertName( cert ) );
280 leHost->setText( config.sslHostPort() );
282 setSslProtocol( config.sslProtocol() );
284
285 lblLoadedConfig->setVisible( true );
286 lblLoadedConfig->setText( configFoundText_() );
287}
288
290{
291 if ( mDisabled )
292 {
293 return;
294 }
295 if ( !QgsApplication::authManager()->storeSslCertCustomConfig( sslCustomConfig() ) )
296 {
297 QgsDebugError( QStringLiteral( "SSL custom config FAILED to store in authentication database" ) );
298 }
299}
300
302{
303 if ( mDisabled )
304 {
305 return;
306 }
307 mCert.clear();
308 mConnectionCAs.clear();
309 leCommonName->clear();
310 leCommonName->setStyleSheet( QString() );
311 leHost->clear();
312
313 lblLoadedConfig->setVisible( false );
314 lblLoadedConfig->clear();
318 enableSslCustomOptions( false );
319}
320
322{
323 if ( mDisabled )
324 {
325 return QSsl::UnknownProtocol;
326 }
327 return ( QSsl::SslProtocol ) mProtocolCmbBx->currentData().toInt();
328}
329
330void QgsAuthSslConfigWidget::setSslProtocol( QSsl::SslProtocol protocol )
331{
332 if ( mDisabled )
333 {
334 return;
335 }
336 const int indx( mProtocolCmbBx->findData( static_cast<int>( protocol ) ) );
337 mProtocolCmbBx->setCurrentIndex( indx );
338}
339
341{
342 if ( mDisabled )
343 {
344 return;
345 }
346 mProtocolCmbBx->setCurrentIndex( 0 );
347}
348
349void QgsAuthSslConfigWidget::appendSslIgnoreErrors( const QList<QSslError> &errors )
350{
351 if ( mDisabled )
352 {
353 return;
354 }
356
357 QList<QSslError::SslError> errenums;
358 const auto constErrors = errors;
359 for ( const QSslError &err : constErrors )
360 {
361 errenums << err.error();
362 }
363
364 for ( int i = 0; i < mIgnoreErrorsItem->childCount(); i++ )
365 {
366 QTreeWidgetItem *item( mIgnoreErrorsItem->child( i ) );
367 if ( errenums.contains( ( QSslError::SslError ) item->data( 0, Qt::UserRole ).toInt() ) )
368 {
369 item->setCheckState( 0, Qt::Checked );
370 }
371 }
372}
373
374void QgsAuthSslConfigWidget::setSslIgnoreErrorEnums( const QList<QSslError::SslError> &errorenums )
375{
376 if ( mDisabled )
377 {
378 return;
379 }
380 QList<QSslError> errors;
381 const auto constErrorenums = errorenums;
382 for ( const QSslError::SslError errorenum : constErrorenums )
383 {
384 errors << QSslError( errorenum );
385 }
386 setSslIgnoreErrors( errors );
387}
388
389void QgsAuthSslConfigWidget::setSslIgnoreErrors( const QList<QSslError> &errors )
390{
391 if ( mDisabled )
392 {
393 return;
394 }
395 if ( errors.isEmpty() )
396 {
397 return;
398 }
399
401
402 QList<QSslError::SslError> errenums;
403 const auto constErrors = errors;
404 for ( const QSslError &err : constErrors )
405 {
406 errenums << err.error();
407 }
408
409 for ( int i = 0; i < mIgnoreErrorsItem->childCount(); i++ )
410 {
411 QTreeWidgetItem *item( mIgnoreErrorsItem->child( i ) );
412 const bool enable( errenums.contains( ( QSslError::SslError ) item->data( 0, Qt::UserRole ).toInt() ) );
413 item->setCheckState( 0, enable ? Qt::Checked : Qt::Unchecked );
414 }
415}
416
418{
419 if ( mDisabled )
420 {
421 return;
422 }
423 for ( int i = 0; i < mIgnoreErrorsItem->childCount(); i++ )
424 {
425 mIgnoreErrorsItem->child( i )->setCheckState( 0, Qt::Unchecked );
426 }
427}
428
429const QList<QSslError::SslError> QgsAuthSslConfigWidget::sslIgnoreErrorEnums()
430{
431 QList<QSslError::SslError> errs;
432 if ( mDisabled )
433 {
434 return errs;
435 }
436 for ( int i = 0; i < mIgnoreErrorsItem->childCount(); i++ )
437 {
438 QTreeWidgetItem *item( mIgnoreErrorsItem->child( i ) );
439 if ( item->checkState( 0 ) == Qt::Checked )
440 {
441 errs.append( ( QSslError::SslError ) item->data( 0, Qt::UserRole ).toInt() );
442 }
443 }
444 return errs;
445}
446
448{
449 if ( mDisabled )
450 {
451 return QSslSocket::AutoVerifyPeer;
452 }
453 return ( QSslSocket::PeerVerifyMode ) mVerifyPeerCmbBx->currentData().toInt();
454}
455
457{
458 if ( mDisabled )
459 {
460 return 0;
461 }
462 return mVerifyDepthSpnBx->value();
463}
464
465void QgsAuthSslConfigWidget::setSslPeerVerify( QSslSocket::PeerVerifyMode mode, int modedepth )
466{
467 if ( mDisabled )
468 {
469 return;
470 }
472
473 const int indx( mVerifyPeerCmbBx->findData( static_cast<int>( mode ) ) );
474 mVerifyPeerCmbBx->setCurrentIndex( indx );
475
476 mVerifyDepthSpnBx->setValue( modedepth );
477}
478
480{
481 if ( mDisabled )
482 {
483 return;
484 }
485 mVerifyPeerCmbBx->setCurrentIndex( 0 );
486 mVerifyDepthSpnBx->setValue( 0 );
487}
488
490{
491 if ( mDisabled )
492 {
493 return false;
494 }
495 const bool cansave = ( isEnabled() && ( grpbxSslConfig->isCheckable() ? grpbxSslConfig->isChecked() : true ) && validateHostPort( leHost->text() ) );
496 if ( mCanSave != cansave )
497 {
498 mCanSave = cansave;
499 emit readyToSaveChanged( cansave );
500 }
501 return cansave;
502}
503
504void QgsAuthSslConfigWidget::setSslHost( const QString &host )
505{
506 if ( mDisabled )
507 {
508 return;
509 }
510 leHost->setText( host );
511}
512
513bool QgsAuthSslConfigWidget::validateHostPort( const QString &txt )
514{
515 const QString hostport( txt );
516 if ( hostport.isEmpty() )
517 {
518 return false;
519 }
520
521 // TODO: add QRegex checks against valid IP and domain.tld input
522 // i.e., currently accepts unlikely (though maybe valid) host:port combo, like 'a:1'
523 const QString urlbase( QStringLiteral( "https://%1" ).arg( hostport ) );
524 const QUrl url( urlbase );
525 return ( !url.host().isEmpty() && QString::number( url.port() ).size() > 0 && QStringLiteral( "https://%1:%2" ).arg( url.host() ).arg( url.port() ) == urlbase );
526}
527
529{
530 if ( mDisabled )
531 {
532 return;
533 }
534 const bool valid = validateHostPort( txt );
536 emit hostPortValidityChanged( valid );
537}
538
540{
541 if ( mDisabled )
542 {
543 return;
544 }
545 grpbxSslConfig->setCheckable( checkable );
546 if ( !checkable )
547 {
548 grpbxSslConfig->setEnabled( true );
549 }
550}
551
552void QgsAuthSslConfigWidget::btnCertInfo_clicked()
553{
554 if ( mCert.isNull() )
555 {
556 return;
557 }
558
559 QgsAuthCertInfoDialog *dlg = new QgsAuthCertInfoDialog( mCert, false, this, mConnectionCAs );
560 dlg->setWindowModality( Qt::WindowModal );
561 dlg->resize( 675, 500 );
562 dlg->exec();
563 dlg->deleteLater();
564}
565
566
568
569QgsAuthSslConfigDialog::QgsAuthSslConfigDialog( QWidget *parent, const QSslCertificate &cert, const QString &hostport )
570 : QDialog( parent )
571
572{
573 setWindowTitle( tr( "Custom Certificate Configuration" ) );
574 QVBoxLayout *layout = new QVBoxLayout( this );
575 layout->setContentsMargins( 6, 6, 6, 6 );
576
577 mSslConfigWdgt = new QgsAuthSslConfigWidget( this, cert, hostport );
578 connect( mSslConfigWdgt, &QgsAuthSslConfigWidget::readyToSaveChanged, this, &QgsAuthSslConfigDialog::checkCanSave );
579 layout->addWidget( mSslConfigWdgt );
580
581 QDialogButtonBox *buttonBox = new QDialogButtonBox(
582 QDialogButtonBox::Close | QDialogButtonBox::Save, Qt::Horizontal, this
583 );
584
585 buttonBox->button( QDialogButtonBox::Close )->setDefault( true );
586 mSaveButton = buttonBox->button( QDialogButtonBox::Save );
587 connect( buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close );
588 connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsAuthSslConfigDialog::accept );
589 layout->addWidget( buttonBox );
590
591 setLayout( layout );
592 mSaveButton->setEnabled( mSslConfigWdgt->readyToSave() );
593}
594
596{
597 mSslConfigWdgt->saveSslCertConfig();
598 QDialog::accept();
599}
600
601void QgsAuthSslConfigDialog::checkCanSave( bool cansave )
602{
603 mSaveButton->setEnabled( cansave );
604}
static QgsAuthManager * authManager()
Returns the application's authentication manager instance.
Dialog wrapper for widget displaying detailed info on a certificate and its hierarchical trust chain.
static QString resolvedCertName(const QSslCertificate &cert, bool issuer=false)
Gets the general name via RFC 5280 resolution.
static QString shaHexForCert(const QSslCertificate &cert, bool formatted=false)
Gets the sha1 hash for certificate.
static QString getSslProtocolName(QSsl::SslProtocol protocol)
SSL Protocol name strings per enum.
static QList< QPair< QSslError::SslError, QString > > sslErrorEnumStrings()
Gets short strings describing SSL errors.
Configuration container for SSL server connection exceptions or overrides.
void setSslProtocol(QSsl::SslProtocol protocol)
Sets SSL server protocol to use in connections.
void setSslCertificate(const QSslCertificate &cert)
Sets server certificate object.
void setSslHostPort(const QString &hostport)
Sets server host:port string.
QSsl::SslProtocol sslProtocol() const
SSL server protocol to use in connections.
void setSslPeerVerifyMode(QSslSocket::PeerVerifyMode mode)
Sets SSL client's peer verify mode to use in connections.
void setSslPeerVerifyDepth(int depth)
Set number or SSL client's peer to verify in connections.
int sslPeerVerifyDepth() const
Number or SSL client's peer to verify in connections.
bool isNull() const
Whether configuration is null (missing components)
void setSslIgnoredErrorEnums(const QList< QSslError::SslError > &errors)
Sets SSL server errors (as enum list) to ignore in connections.
const QList< QSslError::SslError > sslIgnoredErrorEnums() const
SSL server errors (as enum list) to ignore in connections.
QSslSocket::PeerVerifyMode sslPeerVerifyMode() const
SSL client's peer verify mode to use in connections.
const QSslCertificate sslCertificate() const
Server certificate object.
const QString sslHostPort() const
Server host:port string.
static QString greenTextStyleSheet(const QString &selector="*")
Green text stylesheet representing valid, trusted, etc. certificate.
static QString redTextStyleSheet(const QString &selector="*")
Red text stylesheet representing invalid, untrusted, etc. certificate.
static QString orangeTextStyleSheet(const QString &selector="*")
Orange text stylesheet representing loaded component, but not stored in database.
static void setItemBold(QTreeWidgetItem *item)
Call setFirstColumnSpanned(true) on the item and make its font bold.
QgsAuthSslConfigDialog(QWidget *parent=nullptr, const QSslCertificate &cert=QSslCertificate(), const QString &hostport=QString())
Construct wrapper dialog for the SSL config widget.
Widget for editing an SSL server configuration.
QgsAuthSslConfigWidget(QWidget *parent=nullptr, const QSslCertificate &cert=QSslCertificate(), const QString &hostport=QString(), const QList< QSslCertificate > &connectionCAs=QList< QSslCertificate >())
Construct a widget for editing an SSL server certificate configuration.
const QSslCertificate sslCertificate()
Gets the SSL server certificate.
void validateHostPortText(const QString &txt)
Parse string for host:port.
void setSslPeerVerify(QSslSocket::PeerVerifyMode mode, int modedepth)
Sets the client's peer verify mode for connections.
QSslSocket::PeerVerifyMode sslPeerVerifyMode()
Gets the client's peer verify mode for connections.
QSsl::SslProtocol sslProtocol()
Gets the SSL protocol used for connections.
QGroupBox * sslConfigGroupBox()
Access to the SSL configuration's group box widget.
const QString sslHost()
Gets the host:port to associate with the server certificate.
void resetSslCertConfig()
Clear the current SSL server configuration and disabled it.
void setSslCertificate(const QSslCertificate &cert, const QString &hostport=QString())
Sets SSl certificate and any associated host:port.
void saveSslCertConfig()
Save the current SSL server configuration to the authentication database.
void certFoundInAuthDatabase(bool found)
Emitted when an certificate of same SHA hash is found in authentication database.
void resetSslProtocol()
Reset the SSL protocol to use in connections to the default.
void setSslHost(const QString &host)
Sets the host of the server.
void appendSslIgnoreErrors(const QList< QSslError > &errors)
Add to SSL errors to ignore for the connection.
void hostPortValidityChanged(bool valid)
Emitted when the validity of the host:port changes.
void setSslIgnoreErrorEnums(const QList< QSslError::SslError > &errorenums)
Sets the SSL errors (as enums) to ignore for the connection.
void readyToSaveChanged(bool cansave)
Emitted when the configuration can be saved changes.
void resetSslIgnoreErrors()
Clear the SSL errors to ignore for the connection.
void configEnabledChanged(bool enabled)
Emitted when the enabled state of the configuration changes.
void setSslIgnoreErrors(const QList< QSslError > &errors)
Sets the SSL errors to ignore for the connection.
int sslPeerVerifyDepth()
Gets the client's peer verify depth for connections.
void loadSslCustomConfig(const QgsAuthConfigSslServer &config=QgsAuthConfigSslServer())
Load an existing SSL server configuration.
const QList< QSslError::SslError > sslIgnoreErrorEnums()
Gets list of the SSL errors (as enums) to be ignored for connections.
bool readyToSave()
Verify if the configuration if ready to save.
void setSslProtocol(QSsl::SslProtocol protocol)
Sets the SSL protocol to use in connections.
QGroupBox * certificateGroupBox()
Access to the certificate's group box widget.
void enableSslCustomOptions(bool enable)
Enable or disable the custom options widget.
void resetSslPeerVerify()
Reset the client's peer verify mode for connections to default.
void setConfigCheckable(bool checkable)
Sets whether the config group box is checkable.
const QgsAuthConfigSslServer sslCustomConfig()
Gets the SSL configuration.
#define QgsDebugError(str)
Definition qgslogger.h:38