diff options
| -rw-r--r-- | src/lib/libssl/src/bugs/MS | 7 | ||||
| -rw-r--r-- | src/lib/libssl/src/bugs/SSLv3 | 49 | ||||
| -rw-r--r-- | src/lib/libssl/src/bugs/alpha.c | 91 | ||||
| -rw-r--r-- | src/lib/libssl/src/bugs/dggccbug.c | 45 | ||||
| -rw-r--r-- | src/lib/libssl/src/bugs/sgiccbug.c | 57 | ||||
| -rw-r--r-- | src/lib/libssl/src/bugs/sslref.dif | 26 | ||||
| -rw-r--r-- | src/lib/libssl/src/bugs/stream.c | 131 | ||||
| -rw-r--r-- | src/lib/libssl/src/bugs/ultrixcc.c | 45 |
8 files changed, 0 insertions, 451 deletions
diff --git a/src/lib/libssl/src/bugs/MS b/src/lib/libssl/src/bugs/MS deleted file mode 100644 index a1dcfb90de..0000000000 --- a/src/lib/libssl/src/bugs/MS +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | If you use the function that does an fopen inside the DLL, it's malloc | ||
| 2 | will be used and when the function is then written inside, more | ||
| 3 | hassles | ||
| 4 | .... | ||
| 5 | |||
| 6 | |||
| 7 | think about it. | ||
diff --git a/src/lib/libssl/src/bugs/SSLv3 b/src/lib/libssl/src/bugs/SSLv3 deleted file mode 100644 index a75a1652d9..0000000000 --- a/src/lib/libssl/src/bugs/SSLv3 +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | So far... | ||
| 2 | |||
| 3 | ssl3.netscape.com:443 does not support client side dynamic | ||
| 4 | session-renegotiation. | ||
| 5 | |||
| 6 | ssl3.netscape.com:444 (asks for client cert) sends out all the CA RDN | ||
| 7 | in an invalid format (the outer sequence is removed). | ||
| 8 | |||
| 9 | Netscape-Commerce/1.12, when talking SSLv2, accepts a 32 byte | ||
| 10 | challenge but then appears to only use 16 bytes when generating the | ||
| 11 | encryption keys. Using 16 bytes is ok but it should be ok to use 32. | ||
| 12 | According to the SSLv3 spec, one should use 32 bytes for the challenge | ||
| 13 | when opperating in SSLv2/v3 compatablity mode, but as mentioned above, | ||
| 14 | this breaks this server so 16 bytes is the way to go. | ||
| 15 | |||
| 16 | www.microsoft.com - when talking SSLv2, if session-id reuse is | ||
| 17 | performed, the session-id passed back in the server-finished message | ||
| 18 | is different from the one decided upon. | ||
| 19 | |||
| 20 | ssl3.netscape.com:443, first a connection is established with RC4-MD5. | ||
| 21 | If it is then resumed, we end up using DES-CBC3-SHA. It should be | ||
| 22 | RC4-MD5 according to 7.6.1.3, 'cipher_suite'. | ||
| 23 | Netscape-Enterprise/2.01 (https://merchant.netscape.com) has this bug. | ||
| 24 | It only really shows up when connecting via SSLv2/v3 then reconnecting | ||
| 25 | via SSLv3. The cipher list changes.... | ||
| 26 | NEW INFORMATION. Try connecting with a cipher list of just | ||
| 27 | DES-CBC-SHA:RC4-MD5. For some weird reason, each new connection uses | ||
| 28 | RC4-MD5, but a re-connect tries to use DES-CBC-SHA. So netscape, when | ||
| 29 | doing a re-connect, always takes the first cipher in the cipher list. | ||
| 30 | |||
| 31 | If we accept a netscape connection, demand a client cert, have a | ||
| 32 | non-self-signed CA which does not have it's CA in netscape, and the | ||
| 33 | browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta | ||
| 34 | |||
| 35 | Netscape browsers do not really notice the server sending a | ||
| 36 | close notify message. I was sending one, and then some invalid data. | ||
| 37 | netscape complained of an invalid mac. (a fork()ed child doing a | ||
| 38 | SSL_shutdown() and still sharing the socket with its parent). | ||
| 39 | |||
| 40 | Netscape, when using export ciphers, will accept a 1024 bit temporary | ||
| 41 | RSA key. It is supposed to only accept 512. | ||
| 42 | |||
| 43 | If Netscape connects to a server which requests a client certificate | ||
| 44 | it will frequently hang after the user has selected one and never | ||
| 45 | complete the connection. Hitting "Stop" and reload fixes this and | ||
| 46 | all subsequent connections work fine. This appears to be because | ||
| 47 | Netscape wont read any new records in when it is awaiting a server | ||
| 48 | done message at this point. The fix is to send the certificate request | ||
| 49 | and server done messages in one record. | ||
diff --git a/src/lib/libssl/src/bugs/alpha.c b/src/lib/libssl/src/bugs/alpha.c deleted file mode 100644 index 701d6a7c74..0000000000 --- a/src/lib/libssl/src/bugs/alpha.c +++ /dev/null | |||
| @@ -1,91 +0,0 @@ | |||
| 1 | /* bugs/alpha.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* while not exactly a bug (ASN1 C leaves this undefined) it is | ||
| 60 | * something to watch out for. This was fine on linux/NT/Solaris but not | ||
| 61 | * Alpha */ | ||
| 62 | |||
| 63 | /* it is basically an example of | ||
| 64 | * func(*(a++),*(a++)) | ||
| 65 | * which parameter is evaluated first? It is not defined in ASN1 C. | ||
| 66 | */ | ||
| 67 | |||
| 68 | #include <stdio.h> | ||
| 69 | |||
| 70 | #define TYPE unsigned int | ||
| 71 | |||
| 72 | void func(a,b) | ||
| 73 | TYPE *a; | ||
| 74 | TYPE b; | ||
| 75 | { | ||
| 76 | printf("%ld -1 == %ld\n",a[0],b); | ||
| 77 | } | ||
| 78 | |||
| 79 | main() | ||
| 80 | { | ||
| 81 | TYPE data[5]={1L,2L,3L,4L,5L}; | ||
| 82 | TYPE *p; | ||
| 83 | int i; | ||
| 84 | |||
| 85 | p=data; | ||
| 86 | |||
| 87 | for (i=0; i<4; i++) | ||
| 88 | { | ||
| 89 | func(p,*(p++)); | ||
| 90 | } | ||
| 91 | } | ||
diff --git a/src/lib/libssl/src/bugs/dggccbug.c b/src/lib/libssl/src/bugs/dggccbug.c deleted file mode 100644 index 30e07a60ea..0000000000 --- a/src/lib/libssl/src/bugs/dggccbug.c +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | /* NOCW */ | ||
| 2 | /* dggccbug.c */ | ||
| 3 | /* bug found by Eric Young (eay@cryptsoft.com) - May 1995 */ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | |||
| 7 | /* There is a bug in | ||
| 8 | * gcc version 2.5.8 (88open OCS/BCS, DG-2.5.8.3, Oct 14 1994) | ||
| 9 | * as shipped with DGUX 5.4R3.10 that can be bypassed by defining | ||
| 10 | * DG_GCC_BUG in my code. | ||
| 11 | * The bug manifests itself by the vaule of a pointer that is | ||
| 12 | * used only by reference, not having it's value change when it is used | ||
| 13 | * to check for exiting the loop. Probably caused by there being 2 | ||
| 14 | * copies of the valiable, one in a register and one being an address | ||
| 15 | * that is passed. */ | ||
| 16 | |||
| 17 | /* compare the out put from | ||
| 18 | * gcc dggccbug.c; ./a.out | ||
| 19 | * and | ||
| 20 | * gcc -O dggccbug.c; ./a.out | ||
| 21 | * compile with -DFIXBUG to remove the bug when optimising. | ||
| 22 | */ | ||
| 23 | |||
| 24 | void inc(a) | ||
| 25 | int *a; | ||
| 26 | { | ||
| 27 | (*a)++; | ||
| 28 | } | ||
| 29 | |||
| 30 | main() | ||
| 31 | { | ||
| 32 | int p=0; | ||
| 33 | #ifdef FIXBUG | ||
| 34 | int dummy; | ||
| 35 | #endif | ||
| 36 | |||
| 37 | while (p<3) | ||
| 38 | { | ||
| 39 | fprintf(stderr,"%08X\n",p); | ||
| 40 | inc(&p); | ||
| 41 | #ifdef FIXBUG | ||
| 42 | dummy+=p; | ||
| 43 | #endif | ||
| 44 | } | ||
| 45 | } | ||
diff --git a/src/lib/libssl/src/bugs/sgiccbug.c b/src/lib/libssl/src/bugs/sgiccbug.c deleted file mode 100644 index 178239d492..0000000000 --- a/src/lib/libssl/src/bugs/sgiccbug.c +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | /* NOCW */ | ||
| 2 | /* sgibug.c */ | ||
| 3 | /* bug found by Eric Young (eay@mincom.oz.au) May 95 */ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | |||
| 7 | /* This compiler bug it present on IRIX 5.3, 5.1 and 4.0.5 (these are | ||
| 8 | * the only versions of IRIX I have access to. | ||
| 9 | * defining FIXBUG removes the bug. | ||
| 10 | * (bug is still present in IRIX 6.3 according to | ||
| 11 | * Gage <agage@forgetmenot.Mines.EDU> | ||
| 12 | */ | ||
| 13 | |||
| 14 | /* Compare the output from | ||
| 15 | * cc sgiccbug.c; ./a.out | ||
| 16 | * and | ||
| 17 | * cc -O sgiccbug.c; ./a.out | ||
| 18 | */ | ||
| 19 | |||
| 20 | static unsigned long a[4]={0x01234567,0x89ABCDEF,0xFEDCBA98,0x76543210}; | ||
| 21 | static unsigned long b[4]={0x89ABCDEF,0xFEDCBA98,0x76543210,0x01234567}; | ||
| 22 | static unsigned long c[4]={0x77777778,0x8ACF1357,0x88888888,0x7530ECA9}; | ||
| 23 | |||
| 24 | main() | ||
| 25 | { | ||
| 26 | unsigned long r[4]; | ||
| 27 | sub(r,a,b); | ||
| 28 | fprintf(stderr,"input a= %08X %08X %08X %08X\n",a[3],a[2],a[1],a[0]); | ||
| 29 | fprintf(stderr,"input b= %08X %08X %08X %08X\n",b[3],b[2],b[1],b[0]); | ||
| 30 | fprintf(stderr,"output = %08X %08X %08X %08X\n",r[3],r[2],r[1],r[0]); | ||
| 31 | fprintf(stderr,"correct= %08X %08X %08X %08X\n",c[3],c[2],c[1],c[0]); | ||
| 32 | } | ||
| 33 | |||
| 34 | int sub(r,a,b) | ||
| 35 | unsigned long *r,*a,*b; | ||
| 36 | { | ||
| 37 | register unsigned long t1,t2,*ap,*bp,*rp; | ||
| 38 | int i,carry; | ||
| 39 | #ifdef FIXBUG | ||
| 40 | unsigned long dummy; | ||
| 41 | #endif | ||
| 42 | |||
| 43 | ap=a; | ||
| 44 | bp=b; | ||
| 45 | rp=r; | ||
| 46 | carry=0; | ||
| 47 | for (i=0; i<4; i++) | ||
| 48 | { | ||
| 49 | t1= *(ap++); | ||
| 50 | t2= *(bp++); | ||
| 51 | t1=(t1-t2); | ||
| 52 | #ifdef FIXBUG | ||
| 53 | dummy=t1; | ||
| 54 | #endif | ||
| 55 | *(rp++)=t1&0xffffffff; | ||
| 56 | } | ||
| 57 | } | ||
diff --git a/src/lib/libssl/src/bugs/sslref.dif b/src/lib/libssl/src/bugs/sslref.dif deleted file mode 100644 index 0aa92bfe6d..0000000000 --- a/src/lib/libssl/src/bugs/sslref.dif +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | The February 9th, 1995 version of the SSL document differs from | ||
| 2 | https://www.netscape.com in the following ways. | ||
| 3 | ===== | ||
| 4 | The key material for generating a SSL_CK_DES_64_CBC_WITH_MD5 key is | ||
| 5 | KEY-MATERIAL-0 = MD5[MASTER-KEY,"0",CHALLENGE,CONNECTION-ID] | ||
| 6 | not | ||
| 7 | KEY-MATERIAL-0 = MD5[MASTER-KEY,CHALLENGE,CONNECTION-ID] | ||
| 8 | as specified in the documentation. | ||
| 9 | ===== | ||
| 10 | From the section 2.6 Server Only Protocol Messages | ||
| 11 | |||
| 12 | If the SESSION-ID-HIT flag is non-zero then the CERTIFICATE-TYPE, | ||
| 13 | CERTIFICATE-LENGTH and CIPHER-SPECS-LENGTH fields will be zero. | ||
| 14 | |||
| 15 | This is not true for https://www.netscape.com. The CERTIFICATE-TYPE | ||
| 16 | is returned as 1. | ||
| 17 | ===== | ||
| 18 | I have not tested the following but it is reported by holtzman@mit.edu. | ||
| 19 | |||
| 20 | SSLref clients wait to recieve a server-verify before they send a | ||
| 21 | client-finished. Besides this not being evident from the examples in | ||
| 22 | 2.2.1, it makes more sense to always send all packets you can before | ||
| 23 | reading. SSLeay was waiting in the server to recieve a client-finish | ||
| 24 | before sending the server-verify :-). I have changed SSLeay to send a | ||
| 25 | server-verify before trying to read the client-finished. | ||
| 26 | |||
diff --git a/src/lib/libssl/src/bugs/stream.c b/src/lib/libssl/src/bugs/stream.c deleted file mode 100644 index c3b5e867d2..0000000000 --- a/src/lib/libssl/src/bugs/stream.c +++ /dev/null | |||
| @@ -1,131 +0,0 @@ | |||
| 1 | /* bugs/stream.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <openssl/rc4.h> | ||
| 61 | #ifdef OPENSSL_NO_DES | ||
| 62 | #include <des.h> | ||
| 63 | #else | ||
| 64 | #include <openssl/des.h> | ||
| 65 | #endif | ||
| 66 | |||
| 67 | /* show how stream ciphers are not very good. The mac has no affect | ||
| 68 | * on RC4 while it does for cfb DES | ||
| 69 | */ | ||
| 70 | |||
| 71 | main() | ||
| 72 | { | ||
| 73 | fprintf(stderr,"rc4\n"); | ||
| 74 | rc4(); | ||
| 75 | fprintf(stderr,"cfb des\n"); | ||
| 76 | des(); | ||
| 77 | } | ||
| 78 | |||
| 79 | int des() | ||
| 80 | { | ||
| 81 | des_key_schedule ks; | ||
| 82 | des_cblock iv,key; | ||
| 83 | int num; | ||
| 84 | static char *keystr="01234567"; | ||
| 85 | static char *in1="0123456789ABCEDFdata 12345"; | ||
| 86 | static char *in2="9876543210abcdefdata 12345"; | ||
| 87 | unsigned char out[100]; | ||
| 88 | int i; | ||
| 89 | |||
| 90 | des_set_key((des_cblock *)keystr,ks); | ||
| 91 | |||
| 92 | num=0; | ||
| 93 | memset(iv,0,8); | ||
| 94 | des_cfb64_encrypt(in1,out,26,ks,(des_cblock *)iv,&num,1); | ||
| 95 | for (i=0; i<26; i++) | ||
| 96 | fprintf(stderr,"%02X ",out[i]); | ||
| 97 | fprintf(stderr,"\n"); | ||
| 98 | |||
| 99 | num=0; | ||
| 100 | memset(iv,0,8); | ||
| 101 | des_cfb64_encrypt(in2,out,26,ks,(des_cblock *)iv,&num,1); | ||
| 102 | for (i=0; i<26; i++) | ||
| 103 | fprintf(stderr,"%02X ",out[i]); | ||
| 104 | fprintf(stderr,"\n"); | ||
| 105 | } | ||
| 106 | |||
| 107 | int rc4() | ||
| 108 | { | ||
| 109 | static char *keystr="0123456789abcdef"; | ||
| 110 | RC4_KEY key; | ||
| 111 | unsigned char in[100],out[100]; | ||
| 112 | int i; | ||
| 113 | |||
| 114 | RC4_set_key(&key,16,keystr); | ||
| 115 | in[0]='\0'; | ||
| 116 | strcpy(in,"0123456789ABCEDFdata 12345"); | ||
| 117 | RC4(key,26,in,out); | ||
| 118 | |||
| 119 | for (i=0; i<26; i++) | ||
| 120 | fprintf(stderr,"%02X ",out[i]); | ||
| 121 | fprintf(stderr,"\n"); | ||
| 122 | |||
| 123 | RC4_set_key(&key,16,keystr); | ||
| 124 | in[0]='\0'; | ||
| 125 | strcpy(in,"9876543210abcdefdata 12345"); | ||
| 126 | RC4(key,26,in,out); | ||
| 127 | |||
| 128 | for (i=0; i<26; i++) | ||
| 129 | fprintf(stderr,"%02X ",out[i]); | ||
| 130 | fprintf(stderr,"\n"); | ||
| 131 | } | ||
diff --git a/src/lib/libssl/src/bugs/ultrixcc.c b/src/lib/libssl/src/bugs/ultrixcc.c deleted file mode 100644 index 7ba75b140f..0000000000 --- a/src/lib/libssl/src/bugs/ultrixcc.c +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | |||
| 3 | /* This is a cc optimiser bug for ultrix 4.3, mips CPU. | ||
| 4 | * What happens is that the compiler, due to the (a)&7, | ||
| 5 | * does | ||
| 6 | * i=a&7; | ||
| 7 | * i--; | ||
| 8 | * i*=4; | ||
| 9 | * Then uses i as the offset into a jump table. | ||
| 10 | * The problem is that a value of 0 generates an offset of | ||
| 11 | * 0xfffffffc. | ||
| 12 | */ | ||
| 13 | |||
| 14 | main() | ||
| 15 | { | ||
| 16 | f(5); | ||
| 17 | f(0); | ||
| 18 | } | ||
| 19 | |||
| 20 | int f(a) | ||
| 21 | int a; | ||
| 22 | { | ||
| 23 | switch(a&7) | ||
| 24 | { | ||
| 25 | case 7: | ||
| 26 | printf("7\n"); | ||
| 27 | case 6: | ||
| 28 | printf("6\n"); | ||
| 29 | case 5: | ||
| 30 | printf("5\n"); | ||
| 31 | case 4: | ||
| 32 | printf("4\n"); | ||
| 33 | case 3: | ||
| 34 | printf("3\n"); | ||
| 35 | case 2: | ||
| 36 | printf("2\n"); | ||
| 37 | case 1: | ||
| 38 | printf("1\n"); | ||
| 39 | #ifdef FIX_BUG | ||
| 40 | case 0: | ||
| 41 | ; | ||
| 42 | #endif | ||
| 43 | } | ||
| 44 | } | ||
| 45 | |||
