Commit c3b97feb authored by Jan Möbius's avatar Jan Möbius

Added override button to generate a license with an invalid request

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11085 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2c7f1186
......@@ -58,6 +58,13 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Filename</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="fileNameBox"/>
</item>
......@@ -91,16 +98,6 @@
<item row="3" column="1">
<widget class="QLineEdit" name="cpuHashBox"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Filename</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="productIDBox"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
......@@ -108,6 +105,9 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="productIDBox"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
......@@ -118,6 +118,13 @@
<item row="5" column="1">
<widget class="QLineEdit" name="signatureBox"/>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="ignoreSigBox">
<property name="text">
<string>Ignore Invalid Signature</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
......
......@@ -85,7 +85,7 @@ void KeyGenWidget::slotAnalyze() {
QString inputData = requestData->toPlainText();
QStringList data = inputData.split('\n',QString::SkipEmptyParts);
// This is never avalid request!
// This is never a valid request!
if ( data.size() < 6 ) {
QPalette p = requestData->palette();
......@@ -141,7 +141,8 @@ void KeyGenWidget::slotAnalyze() {
signatureBox->setPalette(p);
valid_ = false;
return;
if (! ignoreSigBox->isChecked() )
return;
} else {
QPalette p = signatureBox->palette();
......@@ -171,7 +172,9 @@ void KeyGenWidget::slotAnalyze() {
std::cerr << "Full license : \n" << license_.toStdString() << std::endl;
valid_ = true;
// Only set valid, if the the request and the signature boxes match
if ( requestSig == requestSigCheck )
valid_ = true;
licenseFileName_ = name;
}
......@@ -194,11 +197,16 @@ KeyGenWidget::~KeyGenWidget() {
}
void KeyGenWidget::slotGenerateButton() {
if ( ! valid_ ) {
std::cerr << "Invalid! " << std::endl;
return;
if ( ! valid_ ) {
if ( ! ignoreSigBox->isChecked( ) ) {
std::cerr << "Invalid Request " << std::endl;
return;
} else {
std::cerr << "Invalid Request but overriding!!" << std::endl;
}
}
std::cerr << "Writing License file to output : " << licenseFileName_.toStdString() << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment