diff options
| author | markus <> | 2002-09-05 12:51:52 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-05 12:51:52 +0000 |
| commit | 5514995a9d5ed91db089875adb509c7781357c0e (patch) | |
| tree | 2484410a46ba6c05ef94c253da36fbceef990b64 /src/lib/libcrypto/rc4/rc4test.c | |
| parent | fd9566423b542798f5c8b06e68101a9ea5bb9885 (diff) | |
| download | openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.gz openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.bz2 openbsd-5514995a9d5ed91db089875adb509c7781357c0e.zip | |
import openssl-0.9.7-beta1
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/rc4/rc4test.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/lib/libcrypto/rc4/rc4test.c b/src/lib/libcrypto/rc4/rc4test.c index 041e1aff95..a28d457c8d 100644 --- a/src/lib/libcrypto/rc4/rc4test.c +++ b/src/lib/libcrypto/rc4/rc4test.c | |||
| @@ -59,9 +59,17 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
| 61 | #include <string.h> | 61 | #include <string.h> |
| 62 | #include "rc4.h" | ||
| 63 | 62 | ||
| 64 | unsigned char keys[7][30]={ | 63 | #ifdef OPENSSL_NO_RC4 |
| 64 | int main(int argc, char *argv[]) | ||
| 65 | { | ||
| 66 | printf("No RC4 support\n"); | ||
| 67 | return(0); | ||
| 68 | } | ||
| 69 | #else | ||
| 70 | #include <openssl/rc4.h> | ||
| 71 | |||
| 72 | static unsigned char keys[7][30]={ | ||
| 65 | {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, | 73 | {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, |
| 66 | {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, | 74 | {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, |
| 67 | {8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, | 75 | {8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, |
| @@ -70,8 +78,8 @@ unsigned char keys[7][30]={ | |||
| 70 | {4,0xef,0x01,0x23,0x45}, | 78 | {4,0xef,0x01,0x23,0x45}, |
| 71 | }; | 79 | }; |
| 72 | 80 | ||
| 73 | unsigned char data_len[7]={8,8,8,20,28,10}; | 81 | static unsigned char data_len[7]={8,8,8,20,28,10}; |
| 74 | unsigned char data[7][30]={ | 82 | static unsigned char data[7][30]={ |
| 75 | {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xff}, | 83 | {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xff}, |
| 76 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, | 84 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, |
| 77 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, | 85 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, |
| @@ -86,7 +94,7 @@ unsigned char data[7][30]={ | |||
| 86 | {0}, | 94 | {0}, |
| 87 | }; | 95 | }; |
| 88 | 96 | ||
| 89 | unsigned char output[7][30]={ | 97 | static unsigned char output[7][30]={ |
| 90 | {0x75,0xb7,0x87,0x80,0x99,0xe0,0xc5,0x96,0x00}, | 98 | {0x75,0xb7,0x87,0x80,0x99,0xe0,0xc5,0x96,0x00}, |
| 91 | {0x74,0x94,0xc2,0xe7,0x10,0x4b,0x08,0x79,0x00}, | 99 | {0x74,0x94,0xc2,0xe7,0x10,0x4b,0x08,0x79,0x00}, |
| 92 | {0xde,0x18,0x89,0x41,0xa3,0x37,0x5d,0x3a,0x00}, | 100 | {0xde,0x18,0x89,0x41,0xa3,0x37,0x5d,0x3a,0x00}, |
| @@ -101,9 +109,7 @@ unsigned char output[7][30]={ | |||
| 101 | {0}, | 109 | {0}, |
| 102 | }; | 110 | }; |
| 103 | 111 | ||
| 104 | int main(argc,argv) | 112 | int main(int argc, char *argv[]) |
| 105 | int argc; | ||
| 106 | char *argv[]; | ||
| 107 | { | 113 | { |
| 108 | int i,err=0; | 114 | int i,err=0; |
| 109 | int j; | 115 | int j; |
| @@ -192,4 +198,4 @@ char *argv[]; | |||
| 192 | exit(err); | 198 | exit(err); |
| 193 | return(0); | 199 | return(0); |
| 194 | } | 200 | } |
| 195 | 201 | #endif | |
