X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fe_camellia.c;h=d6f4a586f6eb9c847ce7a4e657109f707e7a4c32;hb=4ad2d3ac0ef338a064c6df3b5437d974def538ba;hp=e48a090b718fd752e5f5452da2fbcffd2872eb3f;hpb=5b0e3daf50ef64fb36c864560881e0267170ce3c;p=oweals%2Fopenssl.git diff --git a/crypto/evp/e_camellia.c b/crypto/evp/e_camellia.c index e48a090b71..d6f4a586f6 100644 --- a/crypto/evp/e_camellia.c +++ b/crypto/evp/e_camellia.c @@ -177,7 +177,7 @@ static int cmll_t4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, if(ret < 0) { - EVPerr(EVP_F_CAMELLIA_INIT_KEY,EVP_R_CAMELLIA_KEY_SETUP_FAILED); + EVPerr(EVP_F_CMLL_T4_INIT_KEY,EVP_R_CAMELLIA_KEY_SETUP_FAILED); return 0; } @@ -256,7 +256,7 @@ const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void) \ BLOCK_CIPHER_generic(nid,keylen,1,16,cfb128,cfb,CFB,flags|EVP_CIPH_FLAG_DEFAULT_ASN1) \ BLOCK_CIPHER_generic(nid,keylen,1,16,cfb1,cfb1,CFB,flags) \ BLOCK_CIPHER_generic(nid,keylen,1,16,cfb8,cfb8,CFB,flags) -#if 0 +#if 0 /* not yet, missing NID */ BLOCK_CIPHER_generic(nid,keylen,1,16,ctr,ctr,CTR,flags) #endif @@ -305,7 +305,7 @@ static int camellia_cbc_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out, else if (ctx->encrypt) CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block); else - CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block); + CRYPTO_cbc128_decrypt(in,out,len,&dat->ks,ctx->iv,dat->block); return 1; } @@ -378,7 +378,7 @@ static int camellia_cfb1_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out, return 1; } -/* +#if 0 /* not yet, missing NID */ static int camellia_ctr_cipher (EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len) { @@ -394,11 +394,11 @@ static int camellia_ctr_cipher (EVP_CIPHER_CTX *ctx, unsigned char *out, ctx->num = (size_t)num; return 1; } -*/ +#endif -BLOCK_CIPHER_generic_pack(NID_camellia,128,EVP_CIPH_FLAG_FIPS) -BLOCK_CIPHER_generic_pack(NID_camellia,192,EVP_CIPH_FLAG_FIPS) -BLOCK_CIPHER_generic_pack(NID_camellia,256,EVP_CIPH_FLAG_FIPS) +BLOCK_CIPHER_generic_pack(NID_camellia,128,0) +BLOCK_CIPHER_generic_pack(NID_camellia,192,0) +BLOCK_CIPHER_generic_pack(NID_camellia,256,0) #else