*/
#include <stdio.h>
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#endif
#include "evp_locl.h"
-const char EVP_version[] = "EVP" OPENSSL_VERSION_PTEXT;
-
void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx)
{
memset(ctx, 0, sizeof(*ctx));
ctx->cipher = cipher;
if (ctx->cipher->ctx_size) {
- ctx->cipher_data = OPENSSL_malloc(ctx->cipher->ctx_size);
+ ctx->cipher_data = OPENSSL_zalloc(ctx->cipher->ctx_size);
if (!ctx->cipher_data) {
EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE);
return 0;
}
- memset(ctx->cipher_data, 0, ctx->cipher->ctx_size);
} else {
ctx->cipher_data = NULL;
}