2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2022-07-22 12:28:51 +02:00
|
|
|
#include <utils/filepath.h>
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
#include <QDialog>
|
|
|
|
|
|
2012-04-24 13:06:32 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
2022-07-22 12:28:51 +02:00
|
|
|
class QCheckBox;
|
|
|
|
|
class QLineEdit;
|
|
|
|
|
class QSpinBox;
|
2012-04-24 13:06:32 +02:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2022-07-22 12:28:51 +02:00
|
|
|
namespace Utils { class InfoLabel; }
|
|
|
|
|
|
|
|
|
|
namespace Android::Internal {
|
2012-08-09 01:56:51 +02:00
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
class AndroidCreateKeystoreCertificate : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
enum PasswordStatus
|
|
|
|
|
{
|
|
|
|
|
Invalid,
|
|
|
|
|
NoMatch,
|
|
|
|
|
Match
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public:
|
2018-07-25 12:19:15 +02:00
|
|
|
explicit AndroidCreateKeystoreCertificate(QWidget *parent = nullptr);
|
|
|
|
|
~AndroidCreateKeystoreCertificate() override;
|
2022-07-22 12:28:51 +02:00
|
|
|
|
|
|
|
|
Utils::FilePath keystoreFilePath() const;
|
|
|
|
|
QString keystorePassword() const;
|
|
|
|
|
QString certificateAlias() const;
|
|
|
|
|
QString certificatePassword() const;
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2016-06-26 22:52:59 +03:00
|
|
|
private:
|
2012-04-18 20:30:57 +03:00
|
|
|
PasswordStatus checkKeystorePassword();
|
|
|
|
|
PasswordStatus checkCertificatePassword();
|
2013-08-29 18:53:52 +02:00
|
|
|
bool checkCertificateAlias();
|
|
|
|
|
bool checkCountryCode();
|
2016-06-26 22:52:59 +03:00
|
|
|
|
2020-11-17 10:49:48 +01:00
|
|
|
void keystoreShowPassStateChanged(int state);
|
|
|
|
|
void certificateShowPassStateChanged(int state);
|
|
|
|
|
void buttonBoxAccepted();
|
|
|
|
|
void samePasswordStateChanged(int state);
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2013-08-29 18:53:52 +02:00
|
|
|
bool validateUserInput();
|
2022-07-22 12:28:51 +02:00
|
|
|
|
2019-05-28 13:49:26 +02:00
|
|
|
Utils::FilePath m_keystoreFilePath;
|
2022-07-22 12:28:51 +02:00
|
|
|
|
|
|
|
|
QLineEdit *m_commonNameLineEdit;
|
|
|
|
|
QLineEdit *m_organizationUnitLineEdit;
|
|
|
|
|
QLineEdit *m_organizationNameLineEdit;
|
|
|
|
|
QLineEdit *m_localityNameLineEdit;
|
|
|
|
|
QLineEdit *m_stateNameLineEdit;
|
|
|
|
|
QLineEdit *m_countryLineEdit;
|
|
|
|
|
QLineEdit *m_certificateRetypePassLineEdit;
|
|
|
|
|
QCheckBox *m_certificateShowPassCheckBox;
|
|
|
|
|
QSpinBox *m_validitySpinBox;
|
|
|
|
|
QLineEdit *m_certificateAliasLineEdit;
|
|
|
|
|
QLineEdit *m_certificatePassLineEdit;
|
|
|
|
|
QSpinBox *m_keySizeSpinBox;
|
|
|
|
|
QCheckBox *m_samePasswordCheckBox;
|
|
|
|
|
QLineEdit *m_keystorePassLineEdit;
|
|
|
|
|
QLineEdit *m_keystoreRetypePassLineEdit;
|
|
|
|
|
Utils::InfoLabel *m_infoLabel;
|
2012-04-18 20:30:57 +03:00
|
|
|
};
|
|
|
|
|
|
2022-07-22 12:28:51 +02:00
|
|
|
} // Android::Internal
|