Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Remove MKCRYPTO_RC5. Unconditionally include RC5 in libcryp...



details:   https://anonhg.NetBSD.org/src/rev/73318b61b423
branches:  trunk
changeset: 353758:73318b61b423
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun May 21 14:20:44 2017 +0000

description:
Remove MKCRYPTO_RC5.  Unconditionally include RC5 in libcrypto.so.

This option existed only because RC5 is covered by patents that, twenty
years ago, we had reason to suspect the patent holder, RSA, Inc., might
litigate.  The two US patents in question are 5,724,428 and 5,835,600.

According to the USPTO Patent Term Calculator web site at
<https://www.uspto.gov/patent/laws-and-regulations/patent-term-calculator#heading-5>
(retrieved 2017-05-21), patents filed after 1995-06-07 expire twenty
years after the filing date.

number          filing date
5,724,428       1995-11-01
5,835,600       1997-04-21

Thus, these patents appear to be expired.

As proposed on tech-crypto and tech-security:

https://mail-index.netbsd.org/tech-crypto/2017/05/05/msg000718.html
https://mail-index.netbsd.org/tech-security/2017/05/05/msg000927.html

diffstat:

 crypto/external/bsd/openssl/bin/Makefile                    |   14 +-
 crypto/external/bsd/openssl/lib/Makefile                    |    6 +-
 crypto/external/bsd/openssl/lib/libcrypto/rc5.inc           |    7 +-
 crypto/external/bsd/openssl/lib/libcrypto/rc5_enc_dummy.c   |  109 ------------
 crypto/external/bsd/openssl/lib/libcrypto/rc5_skey_dummy.c  |   83 ---------
 crypto/external/bsd/openssl/lib/libcrypto_rc5/Makefile      |   42 ----
 crypto/external/bsd/openssl/lib/libcrypto_rc5/shlib_version |    5 -
 distrib/sets/lists/base/shl.mi                              |    8 +-
 distrib/sets/lists/comp/mi                                  |    8 +-
 distrib/sets/lists/comp/shl.mi                              |    4 +-
 distrib/sets/lists/debug/mi                                 |    6 +-
 distrib/sets/lists/debug/shl.mi                             |    4 +-
 distrib/sets/lists/tests/mi                                 |    4 +-
 share/man/man3/intro.3                                      |    6 +-
 share/man/man5/mk.conf.5                                    |    8 +-
 share/mk/bsd.README                                         |    6 +-
 share/mk/bsd.own.mk                                         |    4 +-
 share/mk/bsd.prog.mk                                        |    3 +-
 tests/crypto/libcrypto/Makefile                             |    5 +-
 tests/crypto/libcrypto/rc5/Makefile                         |    9 +-
 tests/crypto/libcrypto/t_ciphers.sh                         |    5 +-
 usr.sbin/racoon/Makefile                                    |    6 +-
 22 files changed, 33 insertions(+), 319 deletions(-)

diffs (truncated from 647 to 300 lines):

diff -r 1d4caa54a248 -r 73318b61b423 crypto/external/bsd/openssl/bin/Makefile
--- a/crypto/external/bsd/openssl/bin/Makefile  Sun May 21 09:13:46 2017 +0000
+++ b/crypto/external/bsd/openssl/bin/Makefile  Sun May 21 14:20:44 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.6 2012/07/13 19:32:51 christos Exp $
+#      $NetBSD: Makefile,v 1.7 2017/05/21 14:20:44 riastradh Exp $
 
 WARNS?=        2       # XXX -Wcast-qual
 
@@ -10,7 +10,7 @@
 USE_FORT?= yes # cryptographic software
 
 # RCSid:
-#      $Id: Makefile,v 1.6 2012/07/13 19:32:51 christos Exp $
+#      $Id: Makefile,v 1.7 2017/05/21 14:20:44 riastradh Exp $
 #
 #      @(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -40,16 +40,6 @@
 
 CPPFLAGS+= -DMONOLITH -DUSE_SSL -I${OPENSSLSRC}
 
-# with normal OpenSSL, OPENSSL_NO_RC5 changes ABI due to change in
-# struct/union.  we nuked it in our header files and it is now safe.
-.if ${MKCRYPTO_RC5} == "no"
-CPPFLAGS+= -DOPENSSL_NO_RC5
-.else
-LDADD+=        -lcrypto_rc5
-DPADD+=        ${LIBCRYPTO_RC5}
-.endif
-
-# this must be _after_ the libcrypto_rc5/libcrypto_idea entries.
 LDADD+=        -lssl -lcrypto -lcrypt
 DPADD+=        ${LIBSSL} ${LIBCRYPTO} ${LIBCRYPT}
 
diff -r 1d4caa54a248 -r 73318b61b423 crypto/external/bsd/openssl/lib/Makefile
--- a/crypto/external/bsd/openssl/lib/Makefile  Sun May 21 09:13:46 2017 +0000
+++ b/crypto/external/bsd/openssl/lib/Makefile  Sun May 21 14:20:44 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2012/07/11 18:50:23 christos Exp $
+#      $NetBSD: Makefile,v 1.3 2017/05/21 14:20:44 riastradh Exp $
 
 .include "bsd.own.mk"
 
@@ -7,10 +7,6 @@
 # OpenSSL libraries.
 SUBDIR= libcrypto libdes
 
-.if (${MKCRYPTO_RC5} != "no")
-SUBDIR+= libcrypto_rc5
-.endif # MKCRYPTO_RC5 != no
-
 SUBDIR+= .WAIT libssl          # depends on libcrypto
 
 .endif # MKCRYPTO != no
diff -r 1d4caa54a248 -r 73318b61b423 crypto/external/bsd/openssl/lib/libcrypto/rc5.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/rc5.inc Sun May 21 09:13:46 2017 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/rc5.inc Sun May 21 14:20:44 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: rc5.inc,v 1.1 2009/07/19 23:30:44 christos Exp $
+#      $NetBSD: rc5.inc,v 1.2 2017/05/21 14:20:44 riastradh Exp $
 #
 #      @(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -9,10 +9,7 @@
 
 
 RC5_SRCS = rc5_ecb.c rc5cfb64.c rc5ofb64.c
-# RC5 is a patented algorithm; abort().
-# see ../libcrypto_rc5
-RC5_SRCS += rc5_skey_dummy.c rc5_enc_dummy.c
-#SRCS+=rc5_skey.c rc5_enc.c
+RC5_SRCS += rc5_skey.c rc5_enc.c
 SRCS += ${RC5_SRCS}
 
 .for cryptosrc in ${RC5_SRCS}
diff -r 1d4caa54a248 -r 73318b61b423 crypto/external/bsd/openssl/lib/libcrypto/rc5_enc_dummy.c
--- a/crypto/external/bsd/openssl/lib/libcrypto/rc5_enc_dummy.c Sun May 21 09:13:46 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/* crypto/rc5/rc5_enc.c */
-/* Copyright (C) 1995-1998 Eric Young (eay%cryptsoft.com@localhost)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay%cryptsoft.com@localhost).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh%cryptsoft.com@localhost).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay%cryptsoft.com@localhost)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh%cryptsoft.com@localhost)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#include <openssl/rc5.h>
-#include "rc5_locl.h"
-
-#include <sys/cdefs.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef __weak_alias
-#define RC5_32_cbc_encrypt     _RC5_32_cbc_encrypt
-#define RC5_32_encrypt _RC5_32_encrypt
-#define RC5_32_decrypt _RC5_32_decrypt
-
-__weak_alias(RC5_32_cbc_encrypt,_RC5_32_cbc_encrypt)
-__weak_alias(RC5_32_encrypt,_RC5_32_encrypt)
-__weak_alias(RC5_32_decrypt,_RC5_32_decrypt)
-#endif
-
-__warn_references(RC5_32_cbc_encrypt,
-    "RC5 is a patented algorithm; link against libcrypto_rc5")
-__warn_references(RC5_32_encrypt,
-    "RC5 is a patented algorithm; link against libcrypto_rc5")
-__warn_references(RC5_32_decrypt,
-    "RC5 is a patented algorithm; link against libcrypto_rc5")
-
-void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out,
-       long length, RC5_32_KEY *ks, unsigned char *iv, int encrypt)
-{
-
-       fprintf(stderr,
-           "RC5 is a patented algorithm; link against libcrypto_rc5. "
-           "Exiting...\n");
-       exit(1);
-}
-
-void RC5_32_encrypt(RC5_32_INT *d, RC5_32_KEY *key)
-{
-
-       fprintf(stderr,
-           "RC5 is a patented algorithm; link against libcrypto_rc5. "
-           "Exiting...\n");
-       exit(1);
-}
-
-void RC5_32_decrypt(RC5_32_INT *d, RC5_32_KEY *key)
-{
-
-       fprintf(stderr,
-           "RC5 is a patented algorithm; link against libcrypto_rc5. "
-           "Exiting...\n");
-       exit(1);
-}
diff -r 1d4caa54a248 -r 73318b61b423 crypto/external/bsd/openssl/lib/libcrypto/rc5_skey_dummy.c
--- a/crypto/external/bsd/openssl/lib/libcrypto/rc5_skey_dummy.c        Sun May 21 09:13:46 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/* crypto/rc5/rc5_skey.c */
-/* Copyright (C) 1995-1998 Eric Young (eay%cryptsoft.com@localhost)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay%cryptsoft.com@localhost).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh%cryptsoft.com@localhost).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay%cryptsoft.com@localhost)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh%cryptsoft.com@localhost)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#include <openssl/rc5.h>
-#include "rc5_locl.h"
-
-#include <sys/cdefs.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef __weak_alias
-#define RC5_32_set_key _RC5_32_set_key
-
-__weak_alias(RC5_32_set_key,_RC5_32_set_key)
-#endif
-
-__warn_references(RC5_32_set_key,
-    "RC5 is a patented algorithm; link against libcrypto_rc5")
-
-void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
-            int rounds)
-{
-
-       fprintf(stderr,
-           "RC5 is a patented algorithm; link against libcrypto_rc5. "
-           "Exiting...\n");
-       exit(1);
-}
diff -r 1d4caa54a248 -r 73318b61b423 crypto/external/bsd/openssl/lib/libcrypto_rc5/Makefile
--- a/crypto/external/bsd/openssl/lib/libcrypto_rc5/Makefile    Sun May 21 09:13:46 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#      $NetBSD: Makefile,v 1.3 2012/07/10 18:59:22 christos Exp $
-
-# RCSid:
-#      Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
-#
-#      @(#) Copyright (c) 1994 Simon J. Gerraty
-#
-#      This file is provided in the hope that it will
-#      be of use.  There is absolutely NO WARRANTY.
-#      Permission to copy, redistribute or otherwise
-#      use this file is hereby granted provided that 
-#      the above copyright notice and this notice are
-#      left intact. 
-#      
-#      Please send copies of changes and bug-fixes to:
-#      sjg%quick.com.au@localhost
-#
-
-#NOPIC=                # defined
-#NOPROFILE=    # defined



Home | Main Index | Thread Index | Old Index