summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/aws-c-cal/source/cal.c
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2025-05-12 15:51:24 +0300
committerthegeorg <[email protected]>2025-05-12 16:06:27 +0300
commitd629bb70c8773d2c0c43f5088ddbb5a86d8c37ea (patch)
tree4f678e0d65ad08c800db21c657d3b0f71fafed06 /contrib/restricted/aws/aws-c-cal/source/cal.c
parent92c4b696d7a1c03d54e13aff7a7c20a078d90dd7 (diff)
Update contrib/restricted/aws libraries to nixpkgs 24.05
commit_hash:f8083acb039e6005e820cdee77b84e0a6b6c6d6d
Diffstat (limited to 'contrib/restricted/aws/aws-c-cal/source/cal.c')
-rw-r--r--contrib/restricted/aws/aws-c-cal/source/cal.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/contrib/restricted/aws/aws-c-cal/source/cal.c b/contrib/restricted/aws/aws-c-cal/source/cal.c
index 13477c8dd3b..5b0f8ba1a69 100644
--- a/contrib/restricted/aws/aws-c-cal/source/cal.c
+++ b/contrib/restricted/aws/aws-c-cal/source/cal.c
@@ -19,7 +19,7 @@ static struct aws_error_info s_errors[] = {
"sign a message with a public key."),
AWS_DEFINE_ERROR_INFO_CAL(
AWS_ERROR_CAL_INVALID_KEY_LENGTH_FOR_ALGORITHM,
- "A key length was used for an algorithm that needs a different key length"),
+ "A key length was used for an algorithm that needs a different key length."),
AWS_DEFINE_ERROR_INFO_CAL(
AWS_ERROR_CAL_UNKNOWN_OBJECT_IDENTIFIER,
"An ASN.1 OID was encountered that wasn't expected or understood. Most likely, an unsupported algorithm was "
@@ -29,10 +29,10 @@ static struct aws_error_info s_errors[] = {
"An ASN.1 DER decoding operation failed on malformed input."),
AWS_DEFINE_ERROR_INFO_CAL(
AWS_ERROR_CAL_MISMATCHED_DER_TYPE,
- "An invalid DER type was requested during encoding/decoding"),
+ "An invalid DER type was requested during encoding/decoding."),
AWS_DEFINE_ERROR_INFO_CAL(
AWS_ERROR_CAL_UNSUPPORTED_ALGORITHM,
- "The specified algorithim is unsupported on this platform."),
+ "The specified algorithm is unsupported on this platform."),
AWS_DEFINE_ERROR_INFO_CAL(
AWS_ERROR_CAL_BUFFER_TOO_LARGE_FOR_ALGORITHM,
"The input passed to a cipher algorithm was too large for that algorithm. Consider breaking the input into "
@@ -40,7 +40,13 @@ static struct aws_error_info s_errors[] = {
AWS_DEFINE_ERROR_INFO_CAL(
AWS_ERROR_CAL_INVALID_CIPHER_MATERIAL_SIZE_FOR_ALGORITHM,
"A cipher material such as an initialization vector or tag was an incorrect size for the selected algorithm."),
-};
+ AWS_DEFINE_ERROR_INFO_CAL(
+ AWS_ERROR_CAL_DER_UNSUPPORTED_NEGATIVE_INT,
+ "DER decoder does support negative integers."),
+ AWS_DEFINE_ERROR_INFO_CAL(AWS_ERROR_CAL_UNSUPPORTED_KEY_FORMAT, "Key format is not supported."),
+ AWS_DEFINE_ERROR_INFO_CAL(
+ AWS_ERROR_CAL_CRYPTO_OPERATION_FAILED,
+ "Unknown error when calling underlying Crypto library.")};
static struct aws_error_info_list s_list = {
.error_list = s_errors,
@@ -60,6 +66,7 @@ static struct aws_log_subject_info s_cal_log_subject_infos[] = {
AWS_LS_CAL_LIBCRYPTO_RESOLVE,
"libcrypto_resolve",
"Subject for libcrypto symbol resolution logging."),
+ DEFINE_LOG_SUBJECT_INFO(AWS_LS_CAL_RSA, "rsa", "Subject for rsa cryptography specific logging."),
};
static struct aws_log_subject_info_list s_cal_log_subject_list = {
@@ -70,6 +77,7 @@ static struct aws_log_subject_info_list s_cal_log_subject_list = {
#ifndef BYO_CRYPTO
extern void aws_cal_platform_init(struct aws_allocator *allocator);
extern void aws_cal_platform_clean_up(void);
+extern void aws_cal_platform_thread_clean_up(void);
#endif /* BYO_CRYPTO */
static bool s_cal_library_initialized = false;
@@ -96,3 +104,9 @@ void aws_cal_library_clean_up(void) {
aws_common_library_clean_up();
}
}
+
+void aws_cal_thread_clean_up(void) {
+#ifndef BYO_CRYPTO
+ aws_cal_platform_thread_clean_up();
+#endif /* BYO_CRYPTO */
+}