-/* $OpenBSD: evp_enc.c,v 1.56 2023/11/29 21:35:57 tb Exp $ */
+/* $OpenBSD: evp_enc.c,v 1.57 2023/12/01 06:53:18 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
{
if (ctx->encrypt)
return EVP_EncryptUpdate(ctx, out, outl, in, inl);
- else
- return EVP_DecryptUpdate(ctx, out, outl, in, inl);
+
+ return EVP_DecryptUpdate(ctx, out, outl, in, inl);
}
int
{
if (ctx->encrypt)
return EVP_EncryptFinal_ex(ctx, out, outl);
- else
- return EVP_DecryptFinal_ex(ctx, out, outl);
+
+ return EVP_DecryptFinal_ex(ctx, out, outl);
}
__warn_references(EVP_CipherFinal,
int
EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
{
- int ret;
if (ctx->encrypt)
- ret = EVP_EncryptFinal_ex(ctx, out, outl);
- else
- ret = EVP_DecryptFinal_ex(ctx, out, outl);
- return ret;
+ return EVP_EncryptFinal_ex(ctx, out, outl);
+
+ return EVP_DecryptFinal_ex(ctx, out, outl);
}
int
int
EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
{
- int ret;
-
- ret = EVP_EncryptFinal_ex(ctx, out, outl);
- return ret;
+ return EVP_EncryptFinal_ex(ctx, out, outl);
}
int
int
EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
{
- int ret;
-
- ret = EVP_DecryptFinal_ex(ctx, out, outl);
- return ret;
+ return EVP_DecryptFinal_ex(ctx, out, outl);
}
int