/usr/include/qgis/qgsauthimportidentitydialog.h is in libqgis-dev 2.18.17+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | /***************************************************************************
qgsauthimportidentitydialog.cpp
---------------------
begin : May 9, 2015
copyright : (C) 2015 by Boundless Spatial, Inc. USA
author : Larry Shaffer
email : lshaffer at boundlessgeo dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSAUTHIMPORTIDENTITYDIALOG_H
#define QGSAUTHIMPORTIDENTITYDIALOG_H
#include <QDialog>
#include "ui_qgsauthimportidentitydialog.h"
#include <QSslCertificate>
#include <QSslKey>
#include "qgsauthconfig.h"
/** \ingroup gui
* Widget for importing an identity certificate/key bundle into the authentication database
*/
class GUI_EXPORT QgsAuthImportIdentityDialog : public QDialog, private Ui::QgsAuthImportIdentityDialog
{
Q_OBJECT
public:
/** Type of identity being imported */
enum IdentityType
{
CertIdentity = 0,
};
/** Type of bundles supported */
enum BundleTypes
{
PkiPaths = 0,
PkiPkcs12 = 1,
};
/** Type of certificate/bundle validity output */
enum Validity
{
Valid,
Invalid,
Unknown
};
/**
* Construct a dialog for importing identities
* @param identitytype Type of the identity to import
* @param parent Parent widget
*/
explicit QgsAuthImportIdentityDialog( QgsAuthImportIdentityDialog::IdentityType identitytype,
QWidget *parent = nullptr );
~QgsAuthImportIdentityDialog();
/** Get identity type */
QgsAuthImportIdentityDialog::IdentityType identityType();
/** Get certificate/key bundle to be imported.
* @note not available in Python bindings
*/
const QPair<QSslCertificate, QSslKey> certBundleToImport();
/** Get certificate/key bundle to be imported as a PKI bundle object */
const QgsPkiBundle pkiBundleToImport() { return mPkiBundle; }
private slots:
void populateIdentityType();
void validateIdentity();
void clearValidation();
void writeValidation( const QString &msg,
QgsAuthImportIdentityDialog::Validity valid,
bool append = false );
// Cert Identity - PkiPaths
void on_lePkiPathsKeyPass_textChanged( const QString &pass );
void on_chkPkiPathsPassShow_stateChanged( int state );
void on_btnPkiPathsCert_clicked();
void on_btnPkiPathsKey_clicked();
// Cert Identity - PkiPkcs#12
void on_lePkiPkcs12KeyPass_textChanged( const QString &pass );
void on_chkPkiPkcs12PassShow_stateChanged( int state );
void on_btnPkiPkcs12Bundle_clicked();
private:
bool validateBundle();
bool validatePkiPaths();
bool validatePkiPkcs12();
void fileFound( bool found, QWidget *widget );
QString getOpenFileName( const QString& title, const QString& extfilter );
QPushButton* okButton();
QgsAuthImportIdentityDialog::IdentityType mIdentityType;
QPair<QSslCertificate, QSslKey> mCertBundle;
QgsPkiBundle mPkiBundle;
bool mDisabled;
QVBoxLayout *mAuthNotifyLayout;
QLabel *mAuthNotify;
};
#endif // QGSAUTHIMPORTIDENTITYDIALOG_H
|