use the variable 'err'
This commit is contained in:
parent
31f88a9c9b
commit
79d6e61aca
@ -38,7 +38,7 @@ int ccm_add_aad(ccm_state *ccm,
|
|||||||
if (ccm->x == 16) {
|
if (ccm->x == 16) {
|
||||||
/* full block so let's encrypt it */
|
/* full block so let's encrypt it */
|
||||||
if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) {
|
if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) {
|
||||||
return CRYPT_ERROR;
|
return err;
|
||||||
}
|
}
|
||||||
ccm->x = 0;
|
ccm->x = 0;
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ int ccm_add_aad(ccm_state *ccm,
|
|||||||
if (ccm->aadlen == ccm->current_aadlen) {
|
if (ccm->aadlen == ccm->current_aadlen) {
|
||||||
if (ccm->x != 0) {
|
if (ccm->x != 0) {
|
||||||
if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) {
|
if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) {
|
||||||
return CRYPT_ERROR;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ccm->x = 0;
|
ccm->x = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user