18 #ifndef QGSAUTHCERTIFICATEINFO_H
19 #define QGSAUTHCERTIFICATEINFO_H
26 #include <QSslCertificate>
31 #include "ui_qgsauthcertificateinfo.h"
47 bool manageCertTrust =
false,
49 const QList<QSslCertificate> &connectionCAs = QList<QSslCertificate>() );
54 void setupError(
const QString &msg );
56 void currentCertItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *previous );
58 void updateCurrentCert( QTreeWidgetItem *item );
60 void btnSaveTrust_clicked();
62 void currentPolicyIndexChanged(
int indx );
64 void decorateCertTreeItem(
const QSslCertificate &cert,
66 QTreeWidgetItem *item =
nullptr );
71 DetailsSection = 1000,
83 void setUpCertDetailsTree();
85 void populateTrustBox();
87 bool populateQcaCertCollection();
89 bool setQcaCertificate(
const QSslCertificate &cert );
91 bool populateCertChain();
93 void setCertHierarchy();
95 void updateCurrentCertInfo(
int chainindx );
97 void populateCertInfo();
99 QTreeWidgetItem *addGroupItem( QTreeWidgetItem *parent,
const QString &group );
101 void addFieldItem( QTreeWidgetItem *parent,
const QString &
field,
const QString &value, FieldWidget wdgt = NoWidget,
102 const QColor &color = QColor() );
104 void populateInfoGeneralSection();
106 void populateInfoDetailsSection();
108 void populateInfoPemTextSection();
110 QCA::Certificate mCert;
111 QList<QSslCertificate> mConnectionCAs;
112 QMap<QString, QPair<QgsAuthCertUtils::CaCertSource, QSslCertificate> > mCaCertsCache;
113 QCA::CertificateCollection mCaCerts;
114 QCA::CertificateChain mACertChain;
115 QList<QSslCertificate> mQCertChain;
116 QSslCertificate mCurrentQCert;
117 QCA::Certificate mCurrentACert;
119 QBrush mDefaultItemForeground;
122 bool mTrustCacheRebuilt;
126 QTreeWidgetItem *mSecGeneral =
nullptr;
127 QTreeWidgetItem *mSecDetails =
nullptr;
128 QTreeWidgetItem *mSecPemText =
nullptr;
129 QTreeWidgetItem *mGrpSubj =
nullptr;
130 QTreeWidgetItem *mGrpIssu =
nullptr;
131 QTreeWidgetItem *mGrpCert =
nullptr;
132 QTreeWidgetItem *mGrpPkey =
nullptr;
133 QTreeWidgetItem *mGrpExts =
nullptr;
135 QVBoxLayout *mAuthNotifyLayout =
nullptr;
136 QLabel *mAuthNotify =
nullptr;
159 bool manageCertTrust,
161 const QList<QSslCertificate> &connectionCAs = QList<QSslCertificate>() );
176 #endif // QGSAUTHCERTIFICATEINFO_H