Upgrade libtomcrypt
This commit is contained in:
@@ -24,9 +24,6 @@ int omac_done(omac_state *omac, unsigned char *out, unsigned long *outlen)
|
||||
LTC_ARGCHK(omac != NULL);
|
||||
LTC_ARGCHK(out != NULL);
|
||||
LTC_ARGCHK(outlen != NULL);
|
||||
if ((err = cipher_is_valid(omac->cipher_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if ((omac->buflen > (int)sizeof(omac->block)) || (omac->buflen < 0) ||
|
||||
(omac->blklen > (int)sizeof(omac->block)) || (omac->buflen > omac->blklen)) {
|
||||
@@ -53,10 +50,10 @@ int omac_done(omac_state *omac, unsigned char *out, unsigned long *outlen)
|
||||
}
|
||||
|
||||
/* encrypt it */
|
||||
if ((err = cipher_descriptor[omac->cipher_idx].ecb_encrypt(omac->block, omac->block, &omac->key)) != CRYPT_OK) {
|
||||
if ((err = ecb_encrypt_block(omac->block, omac->block, &omac->key)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
cipher_descriptor[omac->cipher_idx].done(&omac->key);
|
||||
ecb_done(&omac->key);
|
||||
|
||||
/* output it */
|
||||
for (x = 0; x < (unsigned)omac->blklen && x < *outlen; x++) {
|
||||
|
||||
Reference in New Issue
Block a user