mirror of
https://github.com/Py-KMS-Organization/py-kms.git
synced 2025-05-13 14:44:50 -04:00
Implements #88, documents adjust, uniformed default values
This commit is contained in:
parent
27aa94a6e4
commit
33cedce48c
14 changed files with 144 additions and 142 deletions
|
@ -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'))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue