From e5b6e7ce24fae5eb85bd876c3dcbfa92b0cce25c Mon Sep 17 00:00:00 2001 From: miod Date: Sat, 12 Jul 2014 20:11:45 +0000 Subject: [PATCH] Remove private_{Camellia,RC4}_set_key FIPS indirection tentacles, as has been done for other symmetric algorithms recently. --- lib/libcrypto/camellia/cmll_locl.h | 4 +- lib/libcrypto/camellia/cmll_misc.c | 39 +++++++------ lib/libcrypto/camellia/cmll_utl.c | 61 --------------------- lib/libcrypto/crypto/Makefile | 5 +- lib/libcrypto/rc4/asm/rc4-586.pl | 4 +- lib/libcrypto/rc4/asm/rc4-parisc.pl | 4 +- lib/libcrypto/rc4/asm/rc4-s390x.pl | 8 +-- lib/libcrypto/rc4/asm/rc4-x86_64.pl | 8 +-- lib/libcrypto/rc4/rc4_skey.c | 4 +- lib/libcrypto/rc4/rc4_utl.c | 59 -------------------- lib/libssl/src/crypto/camellia/cmll_locl.h | 4 +- lib/libssl/src/crypto/camellia/cmll_misc.c | 39 +++++++------ lib/libssl/src/crypto/camellia/cmll_utl.c | 61 --------------------- lib/libssl/src/crypto/rc4/asm/rc4-586.pl | 4 +- lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl | 4 +- lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl | 8 +-- lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl | 8 +-- lib/libssl/src/crypto/rc4/rc4_skey.c | 4 +- lib/libssl/src/crypto/rc4/rc4_utl.c | 59 -------------------- 19 files changed, 73 insertions(+), 314 deletions(-) delete mode 100644 lib/libcrypto/camellia/cmll_utl.c delete mode 100644 lib/libcrypto/rc4/rc4_utl.c delete mode 100644 lib/libssl/src/crypto/camellia/cmll_utl.c delete mode 100644 lib/libssl/src/crypto/rc4/rc4_utl.c diff --git a/lib/libcrypto/camellia/cmll_locl.h b/lib/libcrypto/camellia/cmll_locl.h index 1ee144d4d08..60055b0d18e 100644 --- a/lib/libcrypto/camellia/cmll_locl.h +++ b/lib/libcrypto/camellia/cmll_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmll_locl.h,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ +/* $OpenBSD: cmll_locl.h,v 1.4 2014/07/12 20:11:45 miod Exp $ */ /* ==================================================================== * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . * ALL RIGHTS RESERVED. @@ -81,6 +81,4 @@ void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], const KEY_TABLE_TYPE keyTable, u8 plaintext[]); -int private_Camellia_set_key(const unsigned char *userKey, const int bits, - CAMELLIA_KEY *key); #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ diff --git a/lib/libcrypto/camellia/cmll_misc.c b/lib/libcrypto/camellia/cmll_misc.c index 5caa7a98747..68b8dc44ff2 100644 --- a/lib/libcrypto/camellia/cmll_misc.c +++ b/lib/libcrypto/camellia/cmll_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmll_misc.c,v 1.4 2014/07/09 11:10:50 bcook Exp $ */ +/* $OpenBSD: cmll_misc.c,v 1.5 2014/07/12 20:11:45 miod Exp $ */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * @@ -54,25 +54,28 @@ #include #include "cmll_locl.h" -int private_Camellia_set_key(const unsigned char *userKey, const int bits, - CAMELLIA_KEY *key) - { - if(!userKey || !key) +int +Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key) +{ + if (userKey == NULL || key == NULL) return -1; - if(bits != 128 && bits != 192 && bits != 256) + if (bits != 128 && bits != 192 && bits != 256) return -2; - key->grand_rounds = Camellia_Ekeygen(bits , userKey, key->u.rd_key); + key->grand_rounds = Camellia_Ekeygen(bits, userKey, key->u.rd_key); return 0; - } +} -void Camellia_encrypt(const unsigned char *in, unsigned char *out, - const CAMELLIA_KEY *key) - { - Camellia_EncryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out); - } +void +Camellia_encrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key) +{ + Camellia_EncryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); +} -void Camellia_decrypt(const unsigned char *in, unsigned char *out, - const CAMELLIA_KEY *key) - { - Camellia_DecryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out); - } +void +Camellia_decrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key) +{ + Camellia_DecryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); +} diff --git a/lib/libcrypto/camellia/cmll_utl.c b/lib/libcrypto/camellia/cmll_utl.c deleted file mode 100644 index 198ba8951ad..00000000000 --- a/lib/libcrypto/camellia/cmll_utl.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $OpenBSD: cmll_utl.c,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ -/* ==================================================================== - * Copyright (c) 2011 The OpenSSL Project. All rights reserved. - * - * 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. - * - * 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 acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 OpenSSL PROJECT OR - * ITS 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. - * ==================================================================== - * - */ - -#include -#include -#include -#include "cmll_locl.h" - -int Camellia_set_key(const unsigned char *userKey, const int bits, - CAMELLIA_KEY *key) - { - return private_Camellia_set_key(userKey, bits, key); - } diff --git a/lib/libcrypto/crypto/Makefile b/lib/libcrypto/crypto/Makefile index 79fbd478b3c..fdbafba8528 100644 --- a/lib/libcrypto/crypto/Makefile +++ b/lib/libcrypto/crypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.44 2014/07/11 14:01:38 tedu Exp $ +# $OpenBSD: Makefile,v 1.45 2014/07/12 20:11:45 miod Exp $ LIB= crypto @@ -208,9 +208,6 @@ SRCS+= randfile.c rand_lib.c rand_err.c # rc2/ SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c -# rc4/ -SRCS+= rc4_utl.c - # rc5/ #SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5ofb64.c diff --git a/lib/libcrypto/rc4/asm/rc4-586.pl b/lib/libcrypto/rc4/asm/rc4-586.pl index 5c9ac6ad286..84f1a798cb8 100644 --- a/lib/libcrypto/rc4/asm/rc4-586.pl +++ b/lib/libcrypto/rc4/asm/rc4-586.pl @@ -300,7 +300,7 @@ $ido="ecx"; $idx="edx"; # void RC4_set_key(RC4_KEY *key,int len,const unsigned char *data); -&function_begin("private_RC4_set_key"); +&function_begin("RC4_set_key"); &mov ($out,&wparam(0)); # load key &mov ($idi,&wparam(1)); # load len &mov ($inp,&wparam(2)); # load data @@ -378,7 +378,7 @@ $idx="edx"; &xor ("eax","eax"); &mov (&DWP(-8,$out),"eax"); # key->x=0; &mov (&DWP(-4,$out),"eax"); # key->y=0; -&function_end("private_RC4_set_key"); +&function_end("RC4_set_key"); # const char *RC4_options(void); &function_begin_B("RC4_options"); diff --git a/lib/libcrypto/rc4/asm/rc4-parisc.pl b/lib/libcrypto/rc4/asm/rc4-parisc.pl index 9eca69902e1..7e7974430aa 100644 --- a/lib/libcrypto/rc4/asm/rc4-parisc.pl +++ b/lib/libcrypto/rc4/asm/rc4-parisc.pl @@ -247,9 +247,9 @@ ___ $code.=<<___; - .EXPORT private_RC4_set_key,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR + .EXPORT RC4_set_key,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR .ALIGN 8 -private_RC4_set_key +RC4_set_key .PROC .CALLINFO NO_CALLS .ENTRY diff --git a/lib/libcrypto/rc4/asm/rc4-s390x.pl b/lib/libcrypto/rc4/asm/rc4-s390x.pl index 7528ece13c3..1aa754820c6 100644 --- a/lib/libcrypto/rc4/asm/rc4-s390x.pl +++ b/lib/libcrypto/rc4/asm/rc4-s390x.pl @@ -171,10 +171,10 @@ $ikey="%r7"; $iinp="%r8"; $code.=<<___; -.globl private_RC4_set_key -.type private_RC4_set_key,\@function +.globl RC4_set_key +.type RC4_set_key,\@function .align 64 -private_RC4_set_key: +RC4_set_key: stm${g} %r6,%r8,6*$SIZE_T($sp) lhi $cnt,256 la $idx,0(%r0) @@ -210,7 +210,7 @@ private_RC4_set_key: .Ldone: lm${g} %r6,%r8,6*$SIZE_T($sp) br $rp -.size private_RC4_set_key,.-private_RC4_set_key +.size RC4_set_key,.-RC4_set_key ___ } diff --git a/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/lib/libcrypto/rc4/asm/rc4-x86_64.pl index 2bed1e279fc..197749dda73 100755 --- a/lib/libcrypto/rc4/asm/rc4-x86_64.pl +++ b/lib/libcrypto/rc4/asm/rc4-x86_64.pl @@ -428,10 +428,10 @@ $idx="%r8"; $ido="%r9"; $code.=<<___; -.globl private_RC4_set_key -.type private_RC4_set_key,\@function,3 +.globl RC4_set_key +.type RC4_set_key,\@function,3 .align 16 -private_RC4_set_key: +RC4_set_key: lea 8($dat),$dat lea ($inp,$len),$inp neg $len @@ -498,7 +498,7 @@ private_RC4_set_key: mov %eax,-8($dat) mov %eax,-4($dat) ret -.size private_RC4_set_key,.-private_RC4_set_key +.size RC4_set_key,.-RC4_set_key .globl RC4_options .type RC4_options,\@abi-omnipotent diff --git a/lib/libcrypto/rc4/rc4_skey.c b/lib/libcrypto/rc4/rc4_skey.c index 282ed7cc1b5..455cd44d136 100644 --- a/lib/libcrypto/rc4/rc4_skey.c +++ b/lib/libcrypto/rc4/rc4_skey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc4_skey.c,v 1.11 2014/07/09 11:10:51 bcook Exp $ */ +/* $OpenBSD: rc4_skey.c,v 1.12 2014/07/12 20:11:45 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -83,7 +83,7 @@ const char *RC4_options(void) * Date: Wed, 14 Sep 1994 06:35:31 GMT */ -void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) +void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) { register RC4_INT tmp; register int id1,id2; diff --git a/lib/libcrypto/rc4/rc4_utl.c b/lib/libcrypto/rc4/rc4_utl.c deleted file mode 100644 index 0d02171a3ec..00000000000 --- a/lib/libcrypto/rc4/rc4_utl.c +++ /dev/null @@ -1,59 +0,0 @@ -/* $OpenBSD: rc4_utl.c,v 1.4 2014/06/12 15:49:30 deraadt Exp $ */ -/* ==================================================================== - * Copyright (c) 2011 The OpenSSL Project. All rights reserved. - * - * 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. - * - * 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 acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 OpenSSL PROJECT OR - * ITS 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. - * ==================================================================== - * - */ - -#include -#include -#include - -void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) - { - private_RC4_set_key(key, len, data); - } diff --git a/lib/libssl/src/crypto/camellia/cmll_locl.h b/lib/libssl/src/crypto/camellia/cmll_locl.h index 1ee144d4d08..60055b0d18e 100644 --- a/lib/libssl/src/crypto/camellia/cmll_locl.h +++ b/lib/libssl/src/crypto/camellia/cmll_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmll_locl.h,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ +/* $OpenBSD: cmll_locl.h,v 1.4 2014/07/12 20:11:45 miod Exp $ */ /* ==================================================================== * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . * ALL RIGHTS RESERVED. @@ -81,6 +81,4 @@ void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], const KEY_TABLE_TYPE keyTable, u8 plaintext[]); -int private_Camellia_set_key(const unsigned char *userKey, const int bits, - CAMELLIA_KEY *key); #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ diff --git a/lib/libssl/src/crypto/camellia/cmll_misc.c b/lib/libssl/src/crypto/camellia/cmll_misc.c index 5caa7a98747..68b8dc44ff2 100644 --- a/lib/libssl/src/crypto/camellia/cmll_misc.c +++ b/lib/libssl/src/crypto/camellia/cmll_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmll_misc.c,v 1.4 2014/07/09 11:10:50 bcook Exp $ */ +/* $OpenBSD: cmll_misc.c,v 1.5 2014/07/12 20:11:45 miod Exp $ */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * @@ -54,25 +54,28 @@ #include #include "cmll_locl.h" -int private_Camellia_set_key(const unsigned char *userKey, const int bits, - CAMELLIA_KEY *key) - { - if(!userKey || !key) +int +Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key) +{ + if (userKey == NULL || key == NULL) return -1; - if(bits != 128 && bits != 192 && bits != 256) + if (bits != 128 && bits != 192 && bits != 256) return -2; - key->grand_rounds = Camellia_Ekeygen(bits , userKey, key->u.rd_key); + key->grand_rounds = Camellia_Ekeygen(bits, userKey, key->u.rd_key); return 0; - } +} -void Camellia_encrypt(const unsigned char *in, unsigned char *out, - const CAMELLIA_KEY *key) - { - Camellia_EncryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out); - } +void +Camellia_encrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key) +{ + Camellia_EncryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); +} -void Camellia_decrypt(const unsigned char *in, unsigned char *out, - const CAMELLIA_KEY *key) - { - Camellia_DecryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out); - } +void +Camellia_decrypt(const unsigned char *in, unsigned char *out, + const CAMELLIA_KEY *key) +{ + Camellia_DecryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); +} diff --git a/lib/libssl/src/crypto/camellia/cmll_utl.c b/lib/libssl/src/crypto/camellia/cmll_utl.c deleted file mode 100644 index 198ba8951ad..00000000000 --- a/lib/libssl/src/crypto/camellia/cmll_utl.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $OpenBSD: cmll_utl.c,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ -/* ==================================================================== - * Copyright (c) 2011 The OpenSSL Project. All rights reserved. - * - * 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. - * - * 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 acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 OpenSSL PROJECT OR - * ITS 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. - * ==================================================================== - * - */ - -#include -#include -#include -#include "cmll_locl.h" - -int Camellia_set_key(const unsigned char *userKey, const int bits, - CAMELLIA_KEY *key) - { - return private_Camellia_set_key(userKey, bits, key); - } diff --git a/lib/libssl/src/crypto/rc4/asm/rc4-586.pl b/lib/libssl/src/crypto/rc4/asm/rc4-586.pl index 5c9ac6ad286..84f1a798cb8 100644 --- a/lib/libssl/src/crypto/rc4/asm/rc4-586.pl +++ b/lib/libssl/src/crypto/rc4/asm/rc4-586.pl @@ -300,7 +300,7 @@ $ido="ecx"; $idx="edx"; # void RC4_set_key(RC4_KEY *key,int len,const unsigned char *data); -&function_begin("private_RC4_set_key"); +&function_begin("RC4_set_key"); &mov ($out,&wparam(0)); # load key &mov ($idi,&wparam(1)); # load len &mov ($inp,&wparam(2)); # load data @@ -378,7 +378,7 @@ $idx="edx"; &xor ("eax","eax"); &mov (&DWP(-8,$out),"eax"); # key->x=0; &mov (&DWP(-4,$out),"eax"); # key->y=0; -&function_end("private_RC4_set_key"); +&function_end("RC4_set_key"); # const char *RC4_options(void); &function_begin_B("RC4_options"); diff --git a/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl b/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl index 9eca69902e1..7e7974430aa 100644 --- a/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl +++ b/lib/libssl/src/crypto/rc4/asm/rc4-parisc.pl @@ -247,9 +247,9 @@ ___ $code.=<<___; - .EXPORT private_RC4_set_key,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR + .EXPORT RC4_set_key,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR .ALIGN 8 -private_RC4_set_key +RC4_set_key .PROC .CALLINFO NO_CALLS .ENTRY diff --git a/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl b/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl index 7528ece13c3..1aa754820c6 100644 --- a/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl +++ b/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl @@ -171,10 +171,10 @@ $ikey="%r7"; $iinp="%r8"; $code.=<<___; -.globl private_RC4_set_key -.type private_RC4_set_key,\@function +.globl RC4_set_key +.type RC4_set_key,\@function .align 64 -private_RC4_set_key: +RC4_set_key: stm${g} %r6,%r8,6*$SIZE_T($sp) lhi $cnt,256 la $idx,0(%r0) @@ -210,7 +210,7 @@ private_RC4_set_key: .Ldone: lm${g} %r6,%r8,6*$SIZE_T($sp) br $rp -.size private_RC4_set_key,.-private_RC4_set_key +.size RC4_set_key,.-RC4_set_key ___ } diff --git a/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl b/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl index 2bed1e279fc..197749dda73 100755 --- a/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl +++ b/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl @@ -428,10 +428,10 @@ $idx="%r8"; $ido="%r9"; $code.=<<___; -.globl private_RC4_set_key -.type private_RC4_set_key,\@function,3 +.globl RC4_set_key +.type RC4_set_key,\@function,3 .align 16 -private_RC4_set_key: +RC4_set_key: lea 8($dat),$dat lea ($inp,$len),$inp neg $len @@ -498,7 +498,7 @@ private_RC4_set_key: mov %eax,-8($dat) mov %eax,-4($dat) ret -.size private_RC4_set_key,.-private_RC4_set_key +.size RC4_set_key,.-RC4_set_key .globl RC4_options .type RC4_options,\@abi-omnipotent diff --git a/lib/libssl/src/crypto/rc4/rc4_skey.c b/lib/libssl/src/crypto/rc4/rc4_skey.c index 282ed7cc1b5..455cd44d136 100644 --- a/lib/libssl/src/crypto/rc4/rc4_skey.c +++ b/lib/libssl/src/crypto/rc4/rc4_skey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc4_skey.c,v 1.11 2014/07/09 11:10:51 bcook Exp $ */ +/* $OpenBSD: rc4_skey.c,v 1.12 2014/07/12 20:11:45 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -83,7 +83,7 @@ const char *RC4_options(void) * Date: Wed, 14 Sep 1994 06:35:31 GMT */ -void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) +void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) { register RC4_INT tmp; register int id1,id2; diff --git a/lib/libssl/src/crypto/rc4/rc4_utl.c b/lib/libssl/src/crypto/rc4/rc4_utl.c deleted file mode 100644 index 0d02171a3ec..00000000000 --- a/lib/libssl/src/crypto/rc4/rc4_utl.c +++ /dev/null @@ -1,59 +0,0 @@ -/* $OpenBSD: rc4_utl.c,v 1.4 2014/06/12 15:49:30 deraadt Exp $ */ -/* ==================================================================== - * Copyright (c) 2011 The OpenSSL Project. All rights reserved. - * - * 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. - * - * 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 acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 OpenSSL PROJECT OR - * ITS 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. - * ==================================================================== - * - */ - -#include -#include -#include - -void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) - { - private_RC4_set_key(key, len, data); - } -- 2.20.1