dependency to openssl

Linus Torvalds torvalds at linux-foundation.org
Fri Feb 15 16:53:48 PST 2013


On Fri, Feb 15, 2013 at 3:09 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> Lovely. Linus, since you imho are quite clearly the sole copyright holder of
> the code using openssl, would you prefer to issue an exception or would you
> rather switch to gnutls (assuming that's even an option, I'm on my phone and
> haven't checked if the necessary functions are supported by that...)

Christ, this is the kind of idiotic "technical people do legal
analysis" that I detest. We don't even use openssl, we just use the
standard SHA1 routines, and openssl just happens to be the common
source for that. But certainly not the only one.

If we really care, just copy the files from git. They are GLPL2 there,
and I wrote them. It has some history dating back to the mozilla SHA1
implementation, but (a) none of that code remains and (b) the MPLv2 is
GPL-compatible anyway, so we wouldn't care if it did.

Just copy the two files in git/block-sha1, and then replace
"SHA1_init()" with "blk_SHA1_init()" etc. The silly thing is optimized
C - to the point that it actually beats the openssl hand-runed
assembler version on most CPUs.

Of course, our use of SHA1 is so small that performance doesn't even
matter, but it's always good to note that at least we copy from the
best (ie me ;)

                Linus


More information about the subsurface mailing list