Fix eckey_priv_encode()
[openssl.git] / crypto / rc5 / rc5test.c
index d8192846077c7bb11d121ac3b7f3f84136d3c4c8..ce3d0cc16f322e1ef346b0d898eeb4d77d48d0ca 100644 (file)
@@ -63,7 +63,9 @@
 #include <string.h>
 #include <stdlib.h>
 
-#ifdef NO_RC5
+#include "../e_os.h"
+
+#ifdef OPENSSL_NO_RC5
 int main(int argc, char *argv[])
 {
     printf("No RC5 support\n");
@@ -72,7 +74,7 @@ int main(int argc, char *argv[])
 #else
 #include <openssl/rc5.h>
 
-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,
@@ -85,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},
@@ -93,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},
@@ -102,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},
@@ -132,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},
@@ -165,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},
@@ -195,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},
@@ -318,7 +320,7 @@ int main(int argc, char *argv[])
                }
        if (err == 0) printf("cbc RC5 ok\n");
 
-       exit(err);
+       EXIT(err);
        return(err);
        }