![]() |
Zentitle SDK and Library
|
When an activation request is generated, the library generates a "receipt" of that request. When the actual activation certificate is imported into the library, it is verified against this receipt. Because of the receipt, there may be only one outstanding offline activation request at a time.
The general process is:
1) Generate activation request 2) Input activation request at Nalpeiron and receive an activation certificate 3) Import activation certificate into the Nalpeiron library to activate
Once the process is initiated with step 1 it must be completed through step 3 within 2 weeks, and before generating any new activation request, see https://support.nalpeiron.com/hc/en-us/articles/360005255054-NSL-V10-Offline-Activation
To restart the process, delete the local receipt.
Clearing the local receipt may be done on the client by calling NSLImportCert() with the keyword "clear" in place of the certificate. Alternatively, deleting the workdir will also clear the receipt. If you restart the process in this manner, any certificate received from Nalpeiron in step 2 will no longer be valid for step 3 as there is no receipt to verify against.
The receipt is a security measure to prevent an offline activation from being used multiple times or on different machines. When the library initiates an offline transaction of some sort, it keeps a local record of the fact– the "receipt". That record stores the sort of transaction that has been requested, uniquely identifies the transaction, etc. When it receives the certificate that originated at the Nalpeiron server, it checks the certificate against the receipt. If the check fails an error is returned.
A -1055 error indicates that the receipt (or certificate) is invalid.
Along these lines, a -1114 indicates that the receipt is missing. Similarly, a -1121 indicates that a certificate request has already been initiated, and needs either to be completed or cleared.
Obtain a valid certificate, or start over:
Clear the local receipt on the client by calling NSLImportCert() with the keyword "clear" in place of the certificate, or delete the workdir to also clear the receipt. Generate an activation request to create a new receipt, and fully complete steps 2 and 3 as outlined above to finish the process.