Author: abartlet Date: 2008-03-18 01:10:15 +0000 (Tue, 18 Mar 2008) New Revision: 790
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=790 Log: This patch looks *really* odd, but this is due to pulling in the GPL, rather than BSD-like licence for the camellia cypher from http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/camellia-GPL-1.2.0.tar.gz Andrew Bartlett Modified: trunk/heimdal/heimdal-lorikeet.diff Changeset: Modified: trunk/heimdal/heimdal-lorikeet.diff =================================================================== --- trunk/heimdal/heimdal-lorikeet.diff 2008-03-18 01:02:30 UTC (rev 789) +++ trunk/heimdal/heimdal-lorikeet.diff 2008-03-18 01:10:15 UTC (rev 790) @@ -87,3 +87,186 @@ &tmp_principal, rep->kdc_rep.cname, rep->kdc_rep.crealm); +--- /data/heimdal-svn/lib/hcrypto/camellia.h 2007-08-07 09:21:33.000000000 +1000 ++++ lib/hcrypto/camellia.h 2008-03-18 11:37:04.000000000 +1100 +@@ -36,6 +36,7 @@ + #ifndef HEIM_CAMELLIA_H + #define HEIM_CAMELLIA_H 1 + ++#include <krb5-types.h> + #include "camellia-ntt.h" + + /* symbol renaming */ +--- /data/heimdal-svn/lib/hcrypto/camellia-ntt.h 2007-08-07 09:21:33.000000000 +1000 ++++ lib/hcrypto/camellia-ntt.h 2007-01-11 18:27:37.000000000 +1100 +@@ -1,28 +1,21 @@ +-/* camellia.h ver 1.2.0 ++/* camellia.h ver 1.2.0 + * +- * Copyright (c) 2006,2007 +- * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. ++ * Copyright (C) 2006,2007 ++ * NTT (Nippon Telegraph and Telephone Corporation). + * +- * 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 above copyright +- * notice, this list of conditions and the following disclaimer as +- * the first lines of this file unmodified. +- * 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. ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. + * +- * THIS SOFTWARE IS PROVIDED BY NTT ``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 NTT 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. ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + #ifndef HEADER_CAMELLIA_H +--- /data/heimdal-svn/lib/hcrypto/camellia-ntt.c 2007-08-07 09:21:33.000000000 +1000 ++++ lib/hcrypto/camellia-ntt.c 2007-01-11 18:28:12.000000000 +1100 +@@ -1,28 +1,21 @@ +-/* camellia.c ver 1.2.0 ++/* camellia.h ver 1.2.0 + * +- * Copyright (c) 2006,2007 +- * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. ++ * Copyright (C) 2006,2007 ++ * NTT (Nippon Telegraph and Telephone Corporation). + * +- * 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 above copyright +- * notice, this list of conditions and the following disclaimer as +- * the first lines of this file unmodified. +- * 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. ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. + * +- * THIS SOFTWARE IS PROVIDED BY NTT ``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 NTT 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. ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + /* +@@ -30,15 +23,13 @@ + * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html + */ + +- + #include <string.h> + #include <stdlib.h> + +-#include <krb5-types.h> +-#include "camellia-ntt.h" ++#include "camellia.h" + + /* u32 must be 32bit word */ +-typedef uint32_t u32; ++typedef unsigned int u32; + typedef unsigned char u8; + + /* key constants */ +@@ -453,7 +444,7 @@ + #define subl(x) subL[(x)] + #define subr(x) subR[(x)] + +-static void camellia_setup128(const unsigned char *key, u32 *subkey) ++void camellia_setup128(const unsigned char *key, u32 *subkey) + { + u32 kll, klr, krl, krr; + u32 il, ir, t0, t1, w0, w1; +@@ -664,7 +655,7 @@ + return; + } + +-static void camellia_setup256(const unsigned char *key, u32 *subkey) ++void camellia_setup256(const unsigned char *key, u32 *subkey) + { + u32 kll,klr,krl,krr; /* left half of key */ + u32 krll,krlr,krrl,krrr; /* right half of key */ +@@ -950,7 +941,7 @@ + return; + } + +-static void camellia_setup192(const unsigned char *key, u32 *subkey) ++void camellia_setup192(const unsigned char *key, u32 *subkey) + { + unsigned char kk[32]; + u32 krll, krlr, krrl,krrr; +@@ -972,7 +963,7 @@ + * + * "io" must be 4byte aligned and big-endian data. + */ +-static void camellia_encrypt128(const u32 *subkey, u32 *io) ++void camellia_encrypt128(const u32 *subkey, u32 *io) + { + u32 il, ir, t0, t1; + +@@ -1062,7 +1053,7 @@ + return; + } + +-static void camellia_decrypt128(const u32 *subkey, u32 *io) ++void camellia_decrypt128(const u32 *subkey, u32 *io) + { + u32 il,ir,t0,t1; /* temporary valiables */ + +@@ -1155,7 +1146,7 @@ + /** + * stuff for 192 and 256bit encryption/decryption + */ +-static void camellia_encrypt256(const u32 *subkey, u32 *io) ++void camellia_encrypt256(const u32 *subkey, u32 *io) + { + u32 il,ir,t0,t1; /* temporary valiables */ + +@@ -1269,7 +1260,7 @@ + return; + } + +-static void camellia_decrypt256(const u32 *subkey, u32 *io) ++void camellia_decrypt256(const u32 *subkey, u32 *io) + { + u32 il,ir,t0,t1; /* temporary valiables */ +