X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Frc5%2Frc5test.c;h=ce3d0cc16f322e1ef346b0d898eeb4d77d48d0ca;hb=da01515c404fcfc389d437fc07ac6734e9aea20d;hp=d24da3c3812a692c5c9d85da21c23dabb26d628a;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a;p=oweals%2Fopenssl.git diff --git a/crypto/rc5/rc5test.c b/crypto/rc5/rc5test.c index d24da3c381..ce3d0cc16f 100644 --- a/crypto/rc5/rc5test.c +++ b/crypto/rc5/rc5test.c @@ -62,9 +62,19 @@ #include #include #include + +#include "../e_os.h" + +#ifdef OPENSSL_NO_RC5 +int main(int argc, char *argv[]) +{ + printf("No RC5 support\n"); + return(0); +} +#else #include -unsigned char RC5key[5][16]={ +static unsigned char RC5key[5][16]={ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0x91,0x5f,0x46,0x19,0xbe,0x41,0xb2,0x51, @@ -77,7 +87,7 @@ unsigned char RC5key[5][16]={ 0x24,0x97,0x57,0x4d,0x7f,0x15,0x31,0x25}, }; -unsigned char RC5plain[5][8]={ +static unsigned char RC5plain[5][8]={ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0x21,0xA5,0xDB,0xEE,0x15,0x4B,0x8F,0x6D}, {0xF7,0xC0,0x13,0xAC,0x5B,0x2B,0x89,0x52}, @@ -85,7 +95,7 @@ unsigned char RC5plain[5][8]={ {0x65,0xC1,0x78,0xB2,0x84,0xD1,0x97,0xCC}, }; -unsigned char RC5cipher[5][8]={ +static unsigned char RC5cipher[5][8]={ {0x21,0xA5,0xDB,0xEE,0x15,0x4B,0x8F,0x6D}, {0xF7,0xC0,0x13,0xAC,0x5B,0x2B,0x89,0x52}, {0x2F,0x42,0xB3,0xB7,0x03,0x69,0xFC,0x92}, @@ -94,7 +104,7 @@ unsigned char RC5cipher[5][8]={ }; #define RC5_CBC_NUM 27 -unsigned char rc5_cbc_cipher[RC5_CBC_NUM][8]={ +static unsigned char rc5_cbc_cipher[RC5_CBC_NUM][8]={ {0x7a,0x7b,0xba,0x4d,0x79,0x11,0x1d,0x1e}, {0x79,0x7b,0xba,0x4d,0x78,0x11,0x1d,0x1e}, {0x7a,0x7b,0xba,0x4d,0x79,0x11,0x1d,0x1f}, @@ -124,7 +134,7 @@ unsigned char rc5_cbc_cipher[RC5_CBC_NUM][8]={ {0x7f,0xd1,0xa0,0x23,0xa5,0xbb,0xa2,0x17}, }; -unsigned char rc5_cbc_key[RC5_CBC_NUM][17]={ +static unsigned char rc5_cbc_key[RC5_CBC_NUM][17]={ { 1,0x00}, { 1,0x00}, { 1,0x00}, @@ -157,7 +167,7 @@ unsigned char rc5_cbc_key[RC5_CBC_NUM][17]={ { 5,0x01,0x02,0x03,0x04,0x05}, }; -unsigned char rc5_cbc_plain[RC5_CBC_NUM][8]={ +static unsigned char rc5_cbc_plain[RC5_CBC_NUM][8]={ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, @@ -187,14 +197,14 @@ unsigned char rc5_cbc_plain[RC5_CBC_NUM][8]={ {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x01}, }; -int rc5_cbc_rounds[RC5_CBC_NUM]={ +static int rc5_cbc_rounds[RC5_CBC_NUM]={ 0, 0, 0, 0, 0, 1, 2, 2, 8, 8,12,16, 8,12,16,12, 8,12,16, 8,12,16,12, 8, 8, 8, 8, }; -unsigned char rc5_cbc_iv[RC5_CBC_NUM][8]={ +static unsigned char rc5_cbc_iv[RC5_CBC_NUM][8]={ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, @@ -310,7 +320,7 @@ int main(int argc, char *argv[]) } if (err == 0) printf("cbc RC5 ok\n"); - exit(err); + EXIT(err); return(err); } @@ -373,3 +383,4 @@ static char *pt(unsigned char *p) } #endif +#endif