Revert "version skew" patches that break FIPS compilation.
[openssl.git] / crypto / camellia / cmll_misc.c
index 8edead8db8456bd9559061345d53e9f40587dddb..f44d48564c2a28a2efd9c84857e73ca0574c60c7 100644 (file)
  */
  
 #include <openssl/opensslv.h>
+#include <openssl/crypto.h>
 #include <openssl/camellia.h>
 #include "cmll_locl.h"
 
- const char *CAMELLIA_version="CAMELLIA" OPENSSL_VERSION_PTEXT;
+const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT;
 
-int Camellia_set_key(const unsigned char *userKey, const int bits,
+int private_Camellia_set_key(const unsigned char *userKey, const int bits,
        CAMELLIA_KEY *key)
        {
        if(!userKey || !key)
                return -1;
        if(bits != 128 && bits != 192 && bits != 256)
                return -2;
-       Camellia_Ekeygen(bits , userKey, key->rd_key);
-       key->bitLength = bits;
+       key->grand_rounds = Camellia_Ekeygen(bits , userKey, key->u.rd_key);
        return 0;
        }
 
 void Camellia_encrypt(const unsigned char *in, unsigned char *out,
        const CAMELLIA_KEY *key)
        {
-       Camellia_EncryptBlock(key->bitLength, in , key->rd_key , out);
+       Camellia_EncryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out);
        }
 
 void Camellia_decrypt(const unsigned char *in, unsigned char *out,
        const CAMELLIA_KEY *key)
        {
-       Camellia_DecryptBlock(key->bitLength, in , key->rd_key , out);
+       Camellia_DecryptBlock_Rounds(key->grand_rounds, in , key->u.rd_key , out);
        }
-