Latest update
This commit is contained in:
+2
-1
@@ -412,7 +412,7 @@ static int afalg_start_cipher_sk(afalg_ctx *actx, const unsigned char *in,
|
||||
size_t inl, const unsigned char *iv,
|
||||
unsigned int enc)
|
||||
{
|
||||
struct msghdr msg = { 0 };
|
||||
struct msghdr msg;
|
||||
struct cmsghdr *cmsg;
|
||||
struct iovec iov;
|
||||
ssize_t sbytes;
|
||||
@@ -421,6 +421,7 @@ static int afalg_start_cipher_sk(afalg_ctx *actx, const unsigned char *in,
|
||||
# endif
|
||||
char cbuf[CMSG_SPACE(ALG_IV_LEN(ALG_AES_IV_LEN)) + CMSG_SPACE(ALG_OP_LEN)];
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
memset(cbuf, 0, sizeof(cbuf));
|
||||
msg.msg_control = cbuf;
|
||||
msg.msg_controllen = sizeof(cbuf);
|
||||
|
||||
@@ -353,7 +353,7 @@ static int cipher_ctrl(EVP_CIPHER_CTX *ctx, int type, int p1, void* p2)
|
||||
to_cipher_ctx =
|
||||
(struct cipher_ctx *)EVP_CIPHER_CTX_get_cipher_data(to_ctx);
|
||||
memset(&to_cipher_ctx->sess, 0, sizeof(to_cipher_ctx->sess));
|
||||
return cipher_init(to_ctx, cipher_ctx->sess.key, EVP_CIPHER_CTX_iv(ctx),
|
||||
return cipher_init(to_ctx, (void *)cipher_ctx->sess.key, EVP_CIPHER_CTX_iv(ctx),
|
||||
(cipher_ctx->op == COP_ENCRYPT));
|
||||
|
||||
case EVP_CTRL_INIT:
|
||||
|
||||
Reference in New Issue
Block a user