Return correct enveloped data type in ASN1 methods.
[openssl.git] / fips / rand / fips_randtest.c
index 77015658380cccd6a8300a71c965b8e3afd987fc..58c1acecf5d3655cc979bea60e18e6144ba07a86 100644 (file)
@@ -137,11 +137,13 @@ typedef struct
        unsigned char R[16];
        } AES_PRNG_MCT;
 
-static unsigned char aes_128_mct_key[16] =
+__fips_constseg
+static const unsigned char aes_128_mct_key[16] =
        {0x9f,0x5b,0x51,0x20,0x0b,0xf3,0x34,0xb5,
         0xd8,0x2b,0xe8,0xc3,0x72,0x55,0xc8,0x48};
 
-static AES_PRNG_MCT aes_128_mct_tv = {
+__fips_constseg
+static const AES_PRNG_MCT aes_128_mct_tv = {
                        /* DT */
        {0x63,0x76,0xbb,0xe5,0x29,0x02,0xba,0x3b,
         0x67,0xc9,0x25,0xfa,0x70,0x1f,0x11,0xac},
@@ -153,12 +155,14 @@ static AES_PRNG_MCT aes_128_mct_tv = {
         0xe4,0x57,0x90,0xd5,0xc3,0xfc,0x9b,0x73}
 };
 
-static unsigned char aes_192_mct_key[24] =
+__fips_constseg
+static const unsigned char aes_192_mct_key[24] =
        {0xb7,0x6c,0x34,0xd1,0x09,0x67,0xab,0x73,
         0x4d,0x5a,0xd5,0x34,0x98,0x16,0x0b,0x91,
         0xbc,0x35,0x51,0x16,0x6b,0xae,0x93,0x8a};
 
-static AES_PRNG_MCT aes_192_mct_tv = {
+__fips_constseg
+static const AES_PRNG_MCT aes_192_mct_tv = {
                        /* DT */
        {0x84,0xce,0x22,0x7d,0x91,0x5a,0xa3,0xc9,
         0x84,0x3c,0x0a,0xb3,0xa9,0x63,0x15,0x52},
@@ -170,13 +174,15 @@ static AES_PRNG_MCT aes_192_mct_tv = {
         0xdd,0x86,0x20,0x32,0x8a,0x29,0x6f,0x47}
 };
 
-static unsigned char aes_256_mct_key[32] =
+__fips_constseg
+static const unsigned char aes_256_mct_key[32] =
        {0x9b,0x05,0xc8,0x68,0xff,0x47,0xf8,0x3a,
         0xa6,0x3a,0xa8,0xcb,0x4e,0x71,0xb2,0xe0,
         0xb8,0x7e,0xf1,0x37,0xb6,0xb4,0xf6,0x6d,
         0x86,0x32,0xfc,0x1f,0x5e,0x1d,0x1e,0x50};
 
-static AES_PRNG_MCT aes_256_mct_tv = {
+__fips_constseg
+static const AES_PRNG_MCT aes_256_mct_tv = {
                        /* DT */
        {0x31,0x6e,0x35,0x9a,0xb1,0x44,0xf0,0xee,
         0x62,0x6d,0x04,0x46,0xe0,0xa3,0x92,0x4c},
@@ -214,7 +220,8 @@ static void compare(const unsigned char *result,const unsigned char *expected,
     }
 
 
-static void run_test(unsigned char *key, int keylen, AES_PRNG_MCT *tv)
+static void run_test(const unsigned char *key, int keylen,
+                                                       const AES_PRNG_MCT *tv)
     {
     unsigned char buf[16], dt[16];
     int i, j;