Menu

#367 Incompatibility between GPL and RSA md5 license makes codeblocks (exporter plugin) non-distributable

Undefined
fixed
None
Bug_Report
2016-06-15
2016-06-05
Vincent C.
No

Forwarded from https://bugs.debian.org/826379

Codeblocks is licensed under GPL v3, but some files in the source tarball contain code that is licensed as per the terms of RSA Data Security, Inc.'s MD5 Message Digest Algorithm; this license is as follows:

src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfencrypt.cpp
src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfxml.cpp

/*


Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.

License to copy and use this software is granted provided that
it is identified as the "RSA Data Security, Inc. MD5 Message
Digest Algorithm" in all material mentioning or referencing this
software or this function.

License is also granted to make and use derivative works
provided that such works are identified as "derived from the RSA
Data Security, Inc. MD5 Message Digest Algorithm" in all
material mentioning or referencing the derived work.

RSA Data Security, Inc. makes no representations concerning
either the merchantability of this software or the suitability
of this software for any particular purpose. It is provided "as
is" without express or implied warranty of any kind.

These notices must be retained in any copies of any part of this
documentation and/or software.


*/

This license is problematic for codeblocks because while it is free / compatible with Debian's Free Software Guidelines, it contains an advertising clause akin to the original / 4-clause BSD license that renders it incompatible with the GPL, which is what the majority of codeblocks' codebase is licensed under. The GNU project has documented this incompatibility at [1]. There's also some discussion of this issue on debian-legal [2].

I've also found precedent of other GPL-licensed free software projects removing RSA-licensed code from their codebase, so I don't think codeblocks is alone with this issue, e.g. tmemproxy [3] and opie [4], both of which were fixed by using an alternative md5 implementation (both have sample patches). Another freely licensed md5 implementation that can be used is dpkg's implementation [5] (that's supposed to be a drop-in replacement for the RSA implementation?).

[1] http://www.gnu.org/licenses/license-list.html#OriginalBSD
[2] https://lists.debian.org/debian-legal/2016/05/msg00011.html
[3] https://github.com/twitter/twemproxy/issues/120
[4] https://bugs.debian.org/328923
[5] https://sources.debian.net/src/dpkg/1.18.7/lib/compat/md5.c/

Discussion

  • Teodor Petrov

    Teodor Petrov - 2016-06-05

    The problem here is that wxPdfDocument is a bundled library, so you'll have to talk to their maintainers (if they are still active) to fix it and then we can update our copy.

     
  • Ulrich Telle

    Ulrich Telle - 2016-06-11

    I'm the creator and maintainer of wxPdfDocument and I'm definitely still active.

    I was not aware of this license issue, but came across this post by chance. I will take a look at the mentioned dpkg's implementation of the MD5 algorithm. If it can be used as a drop-in replacement I will use it to replace the RSA code in wxPdfDocument.

     
  • Ulrich Telle

    Ulrich Telle - 2016-06-12

    I will replace the lena.jpg by another image in course of fixing the MD5 issue.

     
  • Ulrich Telle

    Ulrich Telle - 2016-06-12

    I replaced the MD5 code by a public domain version and replaced the file lena.jpg by another graphics file, see commit ee44c64 in the wxPdfDocument github repository.

     
    • ollydbg

      ollydbg - 2016-06-13

      Hi, Ulrich, great work, and now I think from C::B source, we can use your git head version now.

       
  • ollydbg

    ollydbg - 2016-06-13

    [[r10867]](https://sourceforge.net/p/codeblocks/code/10867/) should fix the issue.

    * updated wxPDFDoc library to recent GIT version to resolve licensing issues
    
    -------------------------------
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/docs/Doxyfile
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdocdef.h
    A(TP) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/samples/minimal/flower.jpg
    D     : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/samples/minimal/lena.jpg
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/samples/minimal/transparency.cpp
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfencrypt.cpp
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffontdatacore.cpp
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffontdatatype0.cpp
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffontparsertruetype.cpp
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffontparsertype1.cpp
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfkernel.cpp
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfocg.cpp
    M(T ) : /trunk/src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfprint.cpp
    
     
  • Vincent C.

    Vincent C. - 2016-06-15

    Awesome, thanks!

     
  • Morten MacFly

    Morten MacFly - 2016-06-15
    • status: open --> fixed
    • assigned_to: Morten MacFly
     

Log in to post a comment.