Skip to content

Commit

Permalink
Merge branch 'collab_dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucas9 committed Feb 8, 2022
2 parents 1c06f16 + ccd44fc commit f83919d
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ static int32_t cryptography_authenticate(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_mac_open error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
return status;
}
Expand All @@ -588,6 +589,7 @@ static int32_t cryptography_authenticate(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_mac_setkey error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
gcry_mac_close(tmp_mac_hd);
return status;
Expand All @@ -600,6 +602,7 @@ static int32_t cryptography_authenticate(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_mac_setiv error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERROR;
return status;
}
Expand All @@ -625,6 +628,7 @@ static int32_t cryptography_authenticate(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_mac_read error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_MAC_RETRIEVAL_ERROR;
return status;
}
Expand Down Expand Up @@ -669,6 +673,7 @@ static int32_t cryptography_validate_authentication(uint8_t* data_out, size_t le
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_mac_open error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
return status;
}
Expand All @@ -686,6 +691,7 @@ static int32_t cryptography_validate_authentication(uint8_t* data_out, size_t le
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_mac_setkey error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
gcry_mac_close(tmp_mac_hd);
return status;
Expand All @@ -697,6 +703,7 @@ static int32_t cryptography_validate_authentication(uint8_t* data_out, size_t le
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_mac_setiv error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERROR;
return status;
}
Expand All @@ -721,6 +728,7 @@ static int32_t cryptography_validate_authentication(uint8_t* data_out, size_t le
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_mac_read error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_MAC_RETRIEVAL_ERROR;
return status;
}
Expand Down Expand Up @@ -752,6 +760,7 @@ static int32_t cryptography_aead_encrypt(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_cipher_open error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
return status;
}
Expand All @@ -769,6 +778,7 @@ static int32_t cryptography_aead_encrypt(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_cipher_setkey error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
gcry_cipher_close(tmp_hd);
return status;
Expand All @@ -777,6 +787,7 @@ static int32_t cryptography_aead_encrypt(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_cipher_setiv error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
gcry_cipher_close(tmp_hd);
return status;
Expand Down Expand Up @@ -832,6 +843,7 @@ static int32_t cryptography_aead_encrypt(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_cipher_encrypt error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERROR;
gcry_cipher_close(tmp_hd);
return status;
Expand Down Expand Up @@ -859,6 +871,7 @@ static int32_t cryptography_aead_encrypt(uint8_t* data_out, size_t len_data_out,
{
printf(KRED "ERROR: gcry_cipher_checktag error code %d\n" RESET,
gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_MAC_RETRIEVAL_ERROR;
gcry_cipher_close(tmp_hd);
return status;
Expand Down Expand Up @@ -904,13 +917,15 @@ static int32_t cryptography_aead_decrypt(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_cipher_open error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
return status;
}
gcry_error = gcry_cipher_setkey(tmp_hd, key_ptr, len_key);
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_cipher_setkey error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
gcry_cipher_close(tmp_hd);
return status;
Expand All @@ -919,6 +934,7 @@ static int32_t cryptography_aead_decrypt(uint8_t* data_out, size_t len_data_out,
if ((gcry_error & GPG_ERR_CODE_MASK) != GPG_ERR_NO_ERROR)
{
printf(KRED "ERROR: gcry_cipher_setiv error code %d\n" RESET, gcry_error & GPG_ERR_CODE_MASK);
printf(KRED "Failure: %s/%s\n", gcry_strsource(gcry_error), gcry_strerror(gcry_error));
status = CRYPTO_LIB_ERR_LIBGCRYPT_ERROR;
gcry_cipher_close(tmp_hd);
return status;
Expand Down

0 comments on commit f83919d

Please sign in to comment.