ELC 3
This commit is contained in:
@@ -10,4 +10,4 @@ services:
|
||||
- ./lib:/app/lib
|
||||
- ./output:/app/output
|
||||
- ./src:/app/src
|
||||
/bin
|
||||
|
||||
BIN
output/ezlic_drt0_aaaaaaaaaaa.lic
Normal file
BIN
output/ezlic_drt0_aaaaaaaaaaa.lic
Normal file
Binary file not shown.
BIN
output/licenceGenerator
Normal file
BIN
output/licenceGenerator
Normal file
Binary file not shown.
@@ -11,7 +11,7 @@
|
||||
/// @param argc
|
||||
/// @param argv parametry pro generování licence
|
||||
/// @return
|
||||
int main8(int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
unordered_map<string, string> arguments = getArguments(argc, argv);
|
||||
try
|
||||
@@ -26,7 +26,8 @@ int main8(int argc, char *argv[])
|
||||
initStructure.licenceType = (int)LicenceType::DRT;
|
||||
initStructure.licenceVersion = 1;
|
||||
initStructure.licenceIndex = 0;
|
||||
initStructure.licenceFilePath = "c://_projects//sd_gen//output//"; // cesta k licenčnímu souboru
|
||||
initStructure.licenceFilePath = ""; //c://_projects//sd_gen//output//"; // cesta k licenčnímu souboru
|
||||
initStructure.compatibility = 1;
|
||||
// initStructure.compatibility = 0; v případě kompatibility 0 či nezadané je výstup defaultní.
|
||||
// pro ELC 1 LicenceELC1Info je to isValid, pro ELC 2 strukura { int protocolId = -1; int dataPointsCount = 0; }
|
||||
initStructure.cid_csd_filePath = ""; // cesta k cidu/csd pro načtení a kontrolu licence
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/// @param argc
|
||||
/// @param argv parametry pro generování licence
|
||||
/// @return
|
||||
int main()
|
||||
int main9()
|
||||
{
|
||||
// buffer,850client,104client, 104server, web
|
||||
// kouknout na unikatní klíc pro linux (native uid, i openssl neco má)
|
||||
@@ -20,7 +20,7 @@ int main()
|
||||
initStructure.licenceType = (int)LicenceType::DRT;
|
||||
initStructure.licenceVersion = 1;
|
||||
initStructure.licenceIndex = 0;
|
||||
initStructure.licenceFilePath = "c://_projects//sd_gen//output//"; // cesta k licenčnímu souboru
|
||||
initStructure.licenceFilePath = ""; //c://_projects//sd_gen//output//"; // cesta k licenčnímu souboru
|
||||
// initStructure.compatibility = 0; v případě kompatibility 0 či nezadané je výstup defaultní.
|
||||
// pro ELC 1 LicenceELC1Info je to isValid, pro ELC 2 strukura { int protocolId = -1; int dataPointsCount = 0; }
|
||||
initStructure.cid_csd_filePath = ""; // cesta k cidu/csd pro načtení a kontrolu licence
|
||||
@@ -34,7 +34,7 @@ int main()
|
||||
{
|
||||
LicenceELC3Item info; // podle ELC a kompatibility určit strukuru (LicenceInfo1, LicenceInfo2, LicenceInfo3)
|
||||
// if ()
|
||||
int protocolId = 4;
|
||||
int protocolId = 7;
|
||||
|
||||
if (licenceReaderELC3.getLicenceItemInfo(protocolId, &info))
|
||||
{
|
||||
|
||||
@@ -164,7 +164,7 @@ bool LicenceReader::getLicenceItemInfo(int protocolId, void *returnItemStructure
|
||||
}
|
||||
case ELCType::ELC2:
|
||||
{
|
||||
if (!this->licIdentification.licCompatibility) // defaultní kompatibilita
|
||||
if (!this->licIdentification.licCompatibility || licIdentification.licCompatibility == 1) // defaultní kompatibilita
|
||||
{
|
||||
LicenceELC2Item *resultPtr = static_cast<LicenceELC2Item *>(returnItemStructure);
|
||||
resultPtr->protocolId = protocolId;
|
||||
@@ -183,8 +183,10 @@ bool LicenceReader::getLicenceItemInfo(int protocolId, void *returnItemStructure
|
||||
switch (this->licIdentification.licCompatibility)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
// kod pro kompatibilitu 1
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LicenceException((int)GeneralError::CompatibilityTypeNotImplemented, "Kompatibilita není implementována.");
|
||||
break;
|
||||
@@ -194,7 +196,8 @@ bool LicenceReader::getLicenceItemInfo(int protocolId, void *returnItemStructure
|
||||
}
|
||||
case ELCType::ELC3:
|
||||
{
|
||||
if (!this->licIdentification.licCompatibility) // defaultní kompatibilita
|
||||
cout << "komp: " << this->licIdentification.licCompatibility << "\n";
|
||||
if (!this->licIdentification.licCompatibility || licIdentification.licCompatibility == 1) // defaultní kompatibilita
|
||||
{
|
||||
LicenceELC3Item *resultPtr = static_cast<LicenceELC3Item *>(returnItemStructure);
|
||||
resultPtr->protocolId = protocolId;
|
||||
@@ -213,8 +216,10 @@ bool LicenceReader::getLicenceItemInfo(int protocolId, void *returnItemStructure
|
||||
switch (this->licIdentification.licCompatibility)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
// kod pro kompatibilitu 1
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LicenceException((int)GeneralError::CompatibilityTypeNotImplemented, "Kompatibilita není implementována.");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user