Skip to content

Comment on Ask HN: Software licensing excluding military use?

Comments

No. However, there's nothing preventing you from taking the BSD license and adding a fourth clause:

4. This software cannot be used for military purposes under this license. You must negotiate for a license from the original author, AUTHOR NAME.

There is also nothing preventing you from rolling your own crypto. It doesn't mean you should do it. Actually in both cases, you should not, for pretty much the same reasons: if you have no idea about what you are doing, it is likely you are doing it wrong, with bad consequences looming.

Couldn't you ad another clause to any license?

I guess that would become harder the longer the license gets.

Say you wanted to add a clause to the apache license (AL2) or GPLv3 - Then you would also have to make sure that your new clause does not contradict anything in the rest of the license.

Edit: And that clause would probably prevent even others who are not in the military from using your code. Just because there's a chance your license is incompatible with the GPL.

Very much this.

The longer the license, the more likely it is that you have not understood the effects.

The simplest license is abandonment to the public domain; that won't work. You need something that establishes that you are the original author (so that you own the rights) and that you are offering certain specific rights to most people (now it's open source, though not Open Source) and that keeps the same restrictions for people making derivative works -- and now you have the BSD 3-clause.

So that's the simplest license which can possibly work for the OP's purposes.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.