Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm looking for a simple licensing software solution that works on Linux - a library that can generate and consume license keys.

From what I was able to find were some behemoth license servers, something that is just way above what I require.

Are there libraries in particular you can recommend?

share|improve this question

closed as off-topic by MichaelT, gnat, Yannis Rizos Dec 14 at 18:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – MichaelT, gnat, Yannis Rizos
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Have you considered how difficule to break this license scheme needs to be? –  user1249 May 2 '11 at 8:11
    
@Thorbjørn Yes, I have. As a (former reverse engineer) - it's an endless cat and mouse game - if someone wants to break my software - they will, and there is really nothing that can be truly done about it. This is a commercial product, and I'm not really worried about someone breaking it. I'm just looking for a way to create licenses for it. –  Igal Tabachnik May 2 '11 at 8:32
    
What I think @Thorbjørn wanted to know is whether you have a specification of the strength of the method you are looking for, since that will determine what solution may be right for you. –  Deckard May 2 '11 at 9:25

1 Answer 1

The problem with having license checks in a separate lib is that it's trivial to replace with a custom lib which just return true for any security checks. That is probably the reason why you cannot find any simple libs which does that for you.

If piracy is not a concern of yours, I'd look into OpenSSL which can easily do the job with keys. That will stop casual users from trying to abuse your system at least.

The way I've managed software licenses is to add support inside the main application binary. You need to integrate the checks using carefully crafted code that makes it hard(er) for an attacker to reverse the binary and find your function which does the checking. This also means obfuscating parts of your code on purpose.

My general advice though is to include a license agreement with your code and handle this as a legal issue.

share|improve this answer
1  
I don't think the obfuscation is necessary. It won't stop the determined license cracker, and just including it in one of the main files will stop casual copying. –  David Thornley May 2 '11 at 14:10
    
@David: The license file must be encrypted somehow and the encryption/decryption algorithm must be inside your program using your own algorithm and key. It would be smart to scramble that key so it's not easy to find with strings for instance. That's how I've done it at least. –  Martin Wickman May 2 '11 at 14:30
1  
Doing something to make the key not stand out would be a good idea, but that's fairly easy to do, and doesn't require obfuscation. You can't stop crackers, all you can do is raise the bar, and that hits diminishing returns fast. –  David Thornley May 2 '11 at 15:24
    
@David: Separating the key into X pieces spread across several files and then pieced together when needed is obfuscated code in my book. Anything fit for OCCC helps here really :) But, yes, there is a limit to how much it's worth doing. –  Martin Wickman May 2 '11 at 15:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.