-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to generate license-keys? #2
Comments
Here is a recipe I concocted … hopefully all of it is standard on OS X:
Let me know whether or not it works for you. |
I use Objective-C on the server-side. This is how part of it looks like: Note: the implementations of methods -SHA1Data and -base32String are not shown. |
The principle of generating a serial key is:
|
Thanks sellout (this sounded weird) and konstantin. What I currently do is:
Note: Remove "="-symbols? Are they like control symbols, not holding any part of the uniqueness of the signature? If I have to get the sha-1 of the string and sign that, this (above) wouldn't be working, right Konstantin? Are you sure there is such a step involved? I read the code, and sha1 is only used when checking with the server, if such license is generated by the app owner (I guess this is the way to check if it was made by a custom generator). I will try that today and will further test something else that's bothering me and will probably make a separate issue about it, eventually - only the tested curves (these that are in the unit tests) work. I tried probably 10 other curves, but an exception occurs during parsing the serial. I will elaborate on that if there doesn't seem to be anything wrong on my end. |
The "=" sign seem to be used for padding (towards reaching a certain length). About the sha1, I didn't believe my eyes (so I made a screen reader repeat it, haha 😄 ), but Watchdog recognises serials derived through either of the procedure (with or without SHA1)... I am definitely missing something here... Update:
#requires data.txt.
#not -base64.
#doesn't matter if you get sha or not - still verifies it
$ openssl dgst -sha1 -sign private.pem data.txt > serial.txt
$ openssl dgst -verify public.pem -signature serial.txt data.txt
#without sha1
$ openssl dgst -sign private.pem data.txt > serial.txt
$ openssl dgst -verify public.pem -signature serial.txt data.txt |
There is no documentation on creating the licenses.
The text was updated successfully, but these errors were encountered: