summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rc4/rc4test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rc4/rc4test.c')
-rw-r--r--src/lib/libcrypto/rc4/rc4test.c24
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
64unsigned char keys[7][30]={ 63#ifdef OPENSSL_NO_RC4
64int main(int argc, char *argv[])
65{
66 printf("No RC4 support\n");
67 return(0);
68}
69#else
70#include <openssl/rc4.h>
71
72static 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
73unsigned char data_len[7]={8,8,8,20,28,10}; 81static unsigned char data_len[7]={8,8,8,20,28,10};
74unsigned char data[7][30]={ 82static 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
89unsigned char output[7][30]={ 97static 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
104int main(argc,argv) 112int main(int argc, char *argv[])
105int argc;
106char *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