Thorsten Glaser wrote:
Recently I've discovered Frank (IIRC) telling us that the MD5 unit is, in contrast to all other units (I just double-checked), not licenced under the GNU LGPL, or GPL with library exception clause, but rather plain GPL because it contains code from Ulrich Drepper's glibc imple- mentation of the MD5 algorithm.
I took the time and prepared a new, BSD-licenced, implementation of the code, while preserving the old framework (ie, interface), and having as few diffs against existing code as possible.
Unfortunately this seems to be the original BSD license with the "obnoxious advertising clause". I don't like it, and it isn't even GPL compatible.
On the other hand, since a few of the old functions continue to exist, would please the original author of the md5.pas file
That would be me (for the new routines, and for the, mostly trivial, Pascal translation of the C code).
As for md5c.c - it depends on <sys/types.h> to exist (I think that's OK per ANSI/ISO C), and checks for a definition LITTLE_ENDIAN (if it's not defined, big endian is assumed) - that might be a portability problem to be solved.
That's one reason why I ported it to Pascal where (in GPC, of course) such things (types of a given size and endianness conditionals such as `__BYTES_LITTLE_ENDIAN__') are readily available.
Since you are far better in gcc and non-BSD environments than myself, I'll leave that to you.
I personally don't have much interest to support non-free programs, so I'm not going to do a substantial amount of work here.
For these three reasons, if you want the license changed, I suggest you find someone (who hasn't studied either the libc or the RSA code closely; possibly yourself if you haven't) to write a new implementation and release it under the LGPL (or a "new BSD style" license), i.e. a "clean room implementation".
You/they can, and should, of course, compare the results of the current and new units, to verify that they match, but not copy any code, directly or "mentally".
For reference you can use RFC 1321 which contains a precise description of the algorithm, *without* looking at the "Reference Implementation" in appendix A which is just that code under the OBSD license.
For such a unit, I'll give permission to include my code from the interface (in fact, I'd ask for using the same interface for compatibility) and the implementation of my new routines `MD5File' .. `MD5Compose'.
(And, BTW, if you want it included in the GPC distribution, please note the GPC Coding Standards. If I'd have to reformat the code or do other significant work with it, I won't do it, see above. Also, please don't change `* $10' to `shl 4' etc., as you did. Write high-level code and leave the low-level optimizations to the compiler.)
Frank