Implements #88, documents adjust, uniformed default values

This commit is contained in:
Matteo ℱan 2020-09-03 23:52:59 +02:00
parent 27aa94a6e4
commit 33cedce48c
No known key found for this signature in database
GPG key ID: 3C30A05BC133D9B6
14 changed files with 144 additions and 142 deletions

View file

@ -107,8 +107,8 @@ class kmsBase:
return 4 + (((~bodyLength & 3) + 1) & 3)
def serverLogic(self, kmsRequest):
if self.srv_config['sqlite'] and self.srv_config['dbSupport']:
self.dbName = sql_initialize()
if self.srv_config['sqlite']:
sql_initialize(self.srv_config['sqlite'])
pretty_printer(num_text = 15, where = "srv")
kmsRequest = byterize(kmsRequest)
@ -210,8 +210,8 @@ could be detected as not genuine !{end}" %currentClientCount)
'status' : infoDict["licenseStatus"],
'product' : infoDict["skuId"]})
if self.srv_config['sqlite'] and self.srv_config['dbSupport']:
sql_update(self.dbName, infoDict)
if self.srv_config['sqlite']:
sql_update(self.srv_config['sqlite'], infoDict)
return self.createKmsResponse(kmsRequest, currentClientCount)
@ -233,8 +233,8 @@ could be detected as not genuine !{end}" %currentClientCount)
response['vLActivationInterval'] = self.srv_config["activation"]
response['vLRenewalInterval'] = self.srv_config["renewal"]
if self.srv_config['sqlite'] and self.srv_config['dbSupport']:
response = sql_update_epid(self.dbName, kmsRequest, response)
if self.srv_config['sqlite']:
response = sql_update_epid(self.srv_config['sqlite'], kmsRequest, response)
loggersrv.info("Server ePID: %s" % response["kmsEpid"].decode('utf-16le'))