Latest update.
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
|
||||
/* Dispatch functions for ccm mode */
|
||||
|
||||
#include "cipher_locl.h"
|
||||
#include "internal/ciphers/cipher_ccm.h"
|
||||
#include "internal/providercommonerr.h"
|
||||
#include "prov/ciphercommon.h"
|
||||
#include "prov/cipher_ccm.h"
|
||||
#include "prov/providercommonerr.h"
|
||||
|
||||
static int ccm_cipher_internal(PROV_CCM_CTX *ctx, unsigned char *out,
|
||||
size_t *padlen, const unsigned char *in,
|
||||
@@ -213,7 +213,6 @@ static int ccm_init(void *vctx, const unsigned char *key, size_t keylen,
|
||||
ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IVLEN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(ctx->iv, iv, ivlen);
|
||||
ctx->iv_set = 1;
|
||||
}
|
||||
@@ -279,11 +278,11 @@ int ccm_cipher(void *vctx,
|
||||
|
||||
if (outsize < inl) {
|
||||
ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ccm_cipher_internal(ctx, out, outl, in, inl) <= 0)
|
||||
return -1;
|
||||
return 0;
|
||||
|
||||
*outl = inl;
|
||||
return 1;
|
||||
@@ -420,7 +419,3 @@ void ccm_initctx(PROV_CCM_CTX *ctx, size_t keybits, const PROV_CCM_HW *hw)
|
||||
ctx->hw = hw;
|
||||
}
|
||||
|
||||
void ccm_finalctx(PROV_CCM_CTX *ctx)
|
||||
{
|
||||
OPENSSL_cleanse(ctx->iv, sizeof(ctx->iv));
|
||||
}
|
||||
Reference in New Issue
Block a user