mirror of https://github.com/wolfSSL/wolfssl.git
fix EVP_CipherFinal outlen for stream cipher
parent
27a9b23d2b
commit
6fd949279d
|
@ -413,7 +413,7 @@ WOLFSSL_API int wolfSSL_EVP_CipherFinal(WOLFSSL_EVP_CIPHER_CTX *ctx,
|
|||
|
||||
PRINT_BUF(out, ctx->block_size);
|
||||
*outl = ctx->block_size;
|
||||
}
|
||||
} else *outl = 0;
|
||||
} else {
|
||||
if (ctx->block_size == 1){
|
||||
*outl = 0; return WOLFSSL_SUCCESS;
|
||||
|
@ -423,8 +423,8 @@ WOLFSSL_API int wolfSSL_EVP_CipherFinal(WOLFSSL_EVP_CIPHER_CTX *ctx,
|
|||
if ((fl = checkPad(ctx, ctx->lastBlock)) >= 0) {
|
||||
XMEMCPY(out, ctx->lastBlock, fl);
|
||||
*outl = fl;
|
||||
} else return WOLFSSL_FAILURE;
|
||||
}
|
||||
} else return 0;
|
||||
} else *outl = 0;
|
||||
}
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue