From 81387fd4043cc2918852b2092afe90d04be4ea24 Mon Sep 17 00:00:00 2001 From: Wenxing Hou Date: Tue, 18 Jun 2024 11:26:05 +0800 Subject: [PATCH] Fix some typo for include folder Signed-off-by: Wenxing Hou --- include/hal/library/cryptlib/cryptlib_cert.h | 6 +++--- include/hal/library/responder/csrlib.h | 4 ++-- include/industry_standard/pcidoe.h | 4 ++-- include/internal/libspdm_common_lib.h | 6 +++--- include/internal/libspdm_requester_lib.h | 2 +- include/library/spdm_common_lib.h | 2 +- include/library/spdm_requester_lib.h | 2 +- library/spdm_common_lib/libspdm_com_context_data.c | 4 ++-- library/spdm_common_lib/libspdm_com_opaque_data.c | 6 +++--- library/spdm_requester_lib/libspdm_req_encap_digests.c | 4 ++-- library/spdm_requester_lib/libspdm_req_get_csr.c | 2 +- os_stub/cryptlib_mbedtls/pk/x509.c | 6 +++--- os_stub/cryptlib_null/pk/x509.c | 6 +++--- os_stub/cryptlib_openssl/pk/x509.c | 6 +++--- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/include/hal/library/cryptlib/cryptlib_cert.h b/include/hal/library/cryptlib/cryptlib_cert.h index dbcd5ecce22..71f4f34317a 100644 --- a/include/hal/library/cryptlib/cryptlib_cert.h +++ b/include/hal/library/cryptlib/cryptlib_cert.h @@ -36,7 +36,7 @@ extern bool libspdm_asn1_get_tag(uint8_t **ptr, const uint8_t *end, size_t *leng * and the size of buffer returned cert_subject on output. * * @retval true If the subject_size is not equal 0. The certificate subject retrieved successfully. - * @retval true If the subject_size is equal 0. The certificate parse successful. But the cert doen't have subject. + * @retval true If the subject_size is equal 0. The certificate parse successful. But the cert doesn't have subject. * @retval false If the subject_size is not equal 0. The certificate subject retrieved successfully.But the subject_size is too small for the result. * @retval false If the subject_size is equal 0. Invalid certificate. **/ @@ -94,7 +94,7 @@ extern bool libspdm_x509_get_serial_number(const uint8_t *cert, size_t cert_size * and the size of buffer returned cert_issuer on output. * * @retval true If the issuer_size is not equal 0. The certificate issuer retrieved successfully. - * @retval true If the issuer_size is equal 0. The certificate parse successful. But the cert doen't have issuer. + * @retval true If the issuer_size is equal 0. The certificate parse successful. But the cert doesn't have issuer. * @retval false If the issuer_size is not equal 0. The certificate issuer retrieved successfully. But the issuer_size is too small for the result. * @retval false If the issuer_size is equal 0. Invalid certificate. **/ @@ -198,7 +198,7 @@ extern int32_t libspdm_x509_compare_date_time(const void *date_time1, const void * @param[out] usage Key usage (LIBSPDM_CRYPTO_X509_KU_*) * * @retval true if the usage is no equal 0. The certificate key usage retrieved successfully. - * @retval true if the usage is equal 0. The certificate parse successfully, but the cert doen't have key usage. + * @retval true if the usage is equal 0. The certificate parse successfully, but the cert doesn't have key usage. * @retval false Invalid certificate, or usage is NULL. **/ extern bool libspdm_x509_get_key_usage(const uint8_t *cert, size_t cert_size, size_t *usage); diff --git a/include/hal/library/responder/csrlib.h b/include/hal/library/responder/csrlib.h index 8f77a13568c..67b33dcc7bc 100644 --- a/include/hal/library/responder/csrlib.h +++ b/include/hal/library/responder/csrlib.h @@ -58,10 +58,10 @@ extern bool libspdm_gen_csr( bool is_device_cert_model); /** - * Gen CSR, which is uesd for SPDM 1.3 + * Gen CSR, which is used for SPDM 1.3 * * If the device need reset to gen csr, the all case is in the table. - * | Overwrite | Req CSRTtrackingTag | Pending CSR | Reset | Res Action | + * | Overwrite | Req CSRTrackingTag | Pending CSR | Reset | Res Action | * |-----------|---------------------|-------------|-------|------------------------------| * | No | 0 | No | - | ResetRequired | * | No | 0 | Yes | - | ResetRequired or Busy | diff --git a/include/industry_standard/pcidoe.h b/include/industry_standard/pcidoe.h index 133f28c376b..ad2515d225f 100644 --- a/include/industry_standard/pcidoe.h +++ b/include/industry_standard/pcidoe.h @@ -1,6 +1,6 @@ /** * Copyright Notice: - * Copyright 2021-2022 DMTF. All rights reserved. + * Copyright 2021-2024 DMTF. All rights reserved. * License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md **/ @@ -24,7 +24,7 @@ typedef struct { uint16_t vendor_id; uint8_t data_object_type; uint8_t reserved; - /* length of the data object being transfered in number of DW, including the header (2 DW) + /* length of the data object being transferred in number of DW, including the header (2 DW) * It only includes bit[0~17], bit[18~31] are reserved. * A value of 00000h indicate 2^18 DW == 2^20 byte.*/ uint32_t length; diff --git a/include/internal/libspdm_common_lib.h b/include/internal/libspdm_common_lib.h index ffe80f7d242..a9c803cb050 100644 --- a/include/internal/libspdm_common_lib.h +++ b/include/internal/libspdm_common_lib.h @@ -431,7 +431,7 @@ typedef struct { #define LIBSPDM_MAX_ENCAP_REQUEST_OP_CODE_SEQUENCE_COUNT 3 typedef struct { - /* Valid OpCode: GET_DIEGST/GET_CERTIFICATE/CHALLENGE/KEY_UPDATE + /* Valid OpCode: GET_DIGEST/GET_CERTIFICATE/CHALLENGE/KEY_UPDATE * The last one is 0x00, as terminator.*/ uint8_t request_op_code_sequence[LIBSPDM_MAX_ENCAP_REQUEST_OP_CODE_SEQUENCE_COUNT + 1]; uint8_t request_op_code_count; @@ -766,7 +766,7 @@ libspdm_return_t libspdm_append_managed_buffer(void *managed_buffer, * The max_buffer_size is unchanged. * The buffer is not freed. * - * @param managed_buffer The managed buffer to be shrinked. + * @param managed_buffer The managed buffer. **/ void libspdm_reset_managed_buffer(void *managed_buffer); @@ -1047,7 +1047,7 @@ bool libspdm_calculate_l1l2_hash(libspdm_context_t *spdm_context, * @param[in] data_in A pointer to the multi element opaque data. * @param[in] element_id Element id. * @param[in] sm_data_id ID for the Secured Message data type. - * @param[out] get_element_ptr Pointer to store finded element. + * @param[out] get_element_ptr Pointer to store found element. * * @retval true Get element successfully * @retval false Get element failed diff --git a/include/internal/libspdm_requester_lib.h b/include/internal/libspdm_requester_lib.h index a55e4400251..5e810d3e00b 100644 --- a/include/internal/libspdm_requester_lib.h +++ b/include/internal/libspdm_requester_lib.h @@ -375,7 +375,7 @@ libspdm_return_t libspdm_send_receive_end_session(libspdm_context_t *spdm_contex * @param session_id Indicate if the encapsulated request is a secured message. * If session_id is NULL, it is a normal message. * If session_id is NOT NULL, it is a secured message. - * @param mut_auth_requested Indicate of the mut_auth_requested through KEY_EXCHANGE or CHALLENG response. + * @param mut_auth_requested Indicate of the mut_auth_requested through KEY_EXCHANGE or CHALLENGE response. * @param req_slot_id_param req_slot_id_param from the RESPONSE_PAYLOAD_TYPE_REQ_SLOT_NUMBER. * * @retval RETURN_SUCCESS The SPDM Encapsulated requests are sent and the responses are received. diff --git a/include/library/spdm_common_lib.h b/include/library/spdm_common_lib.h index f3392589ba5..c761b6ee253 100644 --- a/include/library/spdm_common_lib.h +++ b/include/library/spdm_common_lib.h @@ -808,7 +808,7 @@ void libspdm_get_scratch_buffer ( * @param trust_anchor_size A buffer to hold the trust_anchor_size, if not NULL. * * @retval RETURN_SUCCESS The cert chain verification pass. - * @retval RETURN_SECURIY_VIOLATION The cert chain verification fail. + * @retval RETURN_SECURITY_VIOLATION The cert chain verification fail. **/ typedef bool (*libspdm_verify_spdm_cert_chain_func)( void *spdm_context, uint8_t slot_id, diff --git a/include/library/spdm_requester_lib.h b/include/library/spdm_requester_lib.h index 1b42dda6f01..090ae20c80c 100644 --- a/include/library/spdm_requester_lib.h +++ b/include/library/spdm_requester_lib.h @@ -706,7 +706,7 @@ libspdm_return_t libspdm_get_csr(void *spdm_context, * @param[in] request_attribute Set certificate request attributes. This field is only used for SPDM 1.3 and above. * @param[in] key_pair_id The value of this field shall be the unique key pair number identifying the desired * asymmetric key pair to associate with SlotID. - * @param[out] available_csr_tracking_tag available CSRTrackingTag when the Responder sends a ResetRequired error messag + * @param[out] available_csr_tracking_tag available CSRTrackingTag when the Responder sends a ResetRequired error message * **/ diff --git a/library/spdm_common_lib/libspdm_com_context_data.c b/library/spdm_common_lib/libspdm_com_context_data.c index cd47a2b0d46..3052220df42 100644 --- a/library/spdm_common_lib/libspdm_com_context_data.c +++ b/library/spdm_common_lib/libspdm_com_context_data.c @@ -2793,9 +2793,9 @@ libspdm_return_t libspdm_init_fips_selftest_context(void *fips_selftest_context) context = fips_selftest_context; - /*No tested for every uesd algo*/ + /*No tested for every used algo*/ context->tested_algo = 0; - /*self_test reuslt is false for every uesd algo*/ + /*self_test result is false for every used algo*/ context->self_test_result = 0; return LIBSPDM_STATUS_SUCCESS; diff --git a/library/spdm_common_lib/libspdm_com_opaque_data.c b/library/spdm_common_lib/libspdm_com_opaque_data.c index 6dcbbc10155..8bc19c4e3cf 100644 --- a/library/spdm_common_lib/libspdm_com_opaque_data.c +++ b/library/spdm_common_lib/libspdm_com_opaque_data.c @@ -1,6 +1,6 @@ /** * Copyright Notice: - * Copyright 2021-2022 DMTF. All rights reserved. + * Copyright 2021-2024 DMTF. All rights reserved. * License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md **/ @@ -104,8 +104,8 @@ size_t libspdm_get_untrusted_opaque_data_supported_version_data_size( * @param[in] data_in_size size of multi element opaque data. * @param[in] data_in A pointer to the multi element opaque data. * @param[in] element_id element id. - * @param[in] sm_data_id sm_data_id to identifiy for the Secured Message data type. - * @param[out] get_element_ptr pointer to store finded element + * @param[in] sm_data_id sm_data_id to identify for the Secured Message data type. + * @param[out] get_element_ptr pointer to store found element * * @retval true get element successfully * @retval false get element failed diff --git a/library/spdm_requester_lib/libspdm_req_encap_digests.c b/library/spdm_requester_lib/libspdm_req_encap_digests.c index 92b7c065361..0c4c6df3816 100644 --- a/library/spdm_requester_lib/libspdm_req_encap_digests.c +++ b/library/spdm_requester_lib/libspdm_req_encap_digests.c @@ -23,9 +23,9 @@ libspdm_return_t libspdm_get_encap_response_digest(void *spdm_context, libspdm_context_t *context; libspdm_return_t status; bool result; - /*total populated solt count*/ + /*total populated slot count*/ uint8_t slot_count; - /*populated solt index*/ + /*populated slot index*/ uint8_t slot_index; uint32_t session_id; libspdm_session_info_t *session_info; diff --git a/library/spdm_requester_lib/libspdm_req_get_csr.c b/library/spdm_requester_lib/libspdm_req_get_csr.c index 41b0aedd842..90961afec56 100644 --- a/library/spdm_requester_lib/libspdm_req_get_csr.c +++ b/library/spdm_requester_lib/libspdm_req_get_csr.c @@ -26,7 +26,7 @@ * @param[in] request_attribute Set certificate request attributes. This field is only used for SPDM 1.3 and above. * @param[in] key_pair_id The value of this field shall be the unique key pair number identifying the desired * asymmetric key pair to associate with SlotID . - * @param[out] available_csr_tracking_tag available CSRTrackingTag when the Responder sends a ResetRequired error messag + * @param[out] available_csr_tracking_tag available CSRTrackingTag when the Responder sends a ResetRequired error message * * @retval RETURN_SUCCESS The measurement is got successfully. * @retval RETURN_DEVICE_ERROR A device error occurs when communicates with the device. diff --git a/os_stub/cryptlib_mbedtls/pk/x509.c b/os_stub/cryptlib_mbedtls/pk/x509.c index 2c6e01b7c05..496873aa3f8 100644 --- a/os_stub/cryptlib_mbedtls/pk/x509.c +++ b/os_stub/cryptlib_mbedtls/pk/x509.c @@ -261,7 +261,7 @@ bool libspdm_asn1_get_tag(uint8_t **ptr, const uint8_t *end, size_t *length, * If subject_size is NULL, then return false. * * @retval true If the subject_size is not equal 0. The certificate subject retrieved successfully. - * @retval true If the subject_size is equal 0. The certificate parse successful. But the cert doen't have subject. + * @retval true If the subject_size is equal 0. The certificate parse successful. But the cert doesn't have subject. * @retval false If the subject_size is not equal 0. The certificate subject retrieved successfully.But the subject_size is too small for the result. * @retval false If the subject_size is equal 0. Invalid certificate. **/ @@ -982,7 +982,7 @@ bool libspdm_x509_get_serial_number(const uint8_t *cert, size_t cert_size, * and the size of buffer returned cert_issuer on output. * * @retval true If the issuer_size is not equal 0. The certificate issuer retrieved successfully. - * @retval true If the issuer_size is equal 0. The certificate parse successful. But the cert doen't have issuer. + * @retval true If the issuer_size is equal 0. The certificate parse successful. But the cert doesn't have issuer. * @retval false If the issuer_size is not equal 0. The certificate issuer retrieved successfully. But the issuer_size is too small for the result. * @retval false If the issuer_size is equal 0. Invalid certificate. * @@ -1423,7 +1423,7 @@ bool libspdm_x509_get_validity(const uint8_t *cert, size_t cert_size, * @param[out] usage key usage (LIBSPDM_CRYPTO_X509_KU_*) * * @retval true if the usage is no equal 0. The certificate key usage retrieved successfully. - * @retval true if the usage is equal 0. The certificate parse successfully, but the cert doen't have key usage. + * @retval true if the usage is equal 0. The certificate parse successfully, but the cert doesn't have key usage. * @retval false Invalid certificate, or usage is NULL. **/ bool libspdm_x509_get_key_usage(const uint8_t *cert, size_t cert_size, diff --git a/os_stub/cryptlib_null/pk/x509.c b/os_stub/cryptlib_null/pk/x509.c index 73d637e8a5e..5ba413ffce0 100644 --- a/os_stub/cryptlib_null/pk/x509.c +++ b/os_stub/cryptlib_null/pk/x509.c @@ -110,7 +110,7 @@ bool libspdm_asn1_get_tag(uint8_t **ptr, const uint8_t *end, size_t *length, * If subject_size is NULL, then return false. * * @retval true If the subject_size is not equal 0. The certificate subject retrieved successfully. - * @retval true If the subject_size is equal 0. The certificate parse successful. But the cert doen't have subject. + * @retval true If the subject_size is equal 0. The certificate parse successful. But the cert doesn't have subject. * @retval false If the subject_size is not equal 0. The certificate subject retrieved successfully.But the subject_size is too small for the result. * @retval false If the subject_size is equal 0. Invalid certificate. **/ @@ -451,7 +451,7 @@ bool libspdm_x509_get_serial_number(const uint8_t *cert, size_t cert_size, * and the size of buffer returned cert_issuer on output. * * @retval true If the issuer_size is not equal 0. The certificate issuer retrieved successfully. - * @retval true If the issuer_size is equal 0. The certificate parse successful. But the cert doen't have issuer. + * @retval true If the issuer_size is equal 0. The certificate parse successful. But the cert doesn't have issuer. * @retval false If the issuer_size is not equal 0. The certificate issuer retrieved successfully. But the issuer_size is too small for the result. * @retval false If the issuer_size is equal 0. Invalid certificate. * @@ -622,7 +622,7 @@ bool libspdm_x509_get_validity(const uint8_t *cert, size_t cert_size, * @param[out] usage key usage (LIBSPDM_CRYPTO_X509_KU_*) * * @retval true if the usage is no equal 0. The certificate key usage retrieved successfully. - * @retval true if the usage is equal 0. The certificate parse successfully, but the cert doen't have key usage. + * @retval true if the usage is equal 0. The certificate parse successfully, but the cert doesn't have key usage. * @retval false Invalid certificate, or usage is NULL. **/ bool libspdm_x509_get_key_usage(const uint8_t *cert, size_t cert_size, diff --git a/os_stub/cryptlib_openssl/pk/x509.c b/os_stub/cryptlib_openssl/pk/x509.c index c77ab4cfe4b..c9d7607933b 100644 --- a/os_stub/cryptlib_openssl/pk/x509.c +++ b/os_stub/cryptlib_openssl/pk/x509.c @@ -302,7 +302,7 @@ bool libspdm_asn1_get_tag(uint8_t **ptr, const uint8_t *end, size_t *length, * If subject_size is NULL, then return false. * * @retval true If the subject_size is not equal 0. The certificate subject retrieved successfully. - * @retval true If the subject_size is equal 0. The certificate parse successful. But the cert doen't have subject. + * @retval true If the subject_size is equal 0. The certificate parse successful. But the cert doesn't have subject. * @retval false If the subject_size is not equal 0. The certificate subject retrieved successfully.But the subject_size is too small for the result. * @retval false If the subject_size is equal 0. Invalid certificate. **/ @@ -847,7 +847,7 @@ bool libspdm_x509_get_serial_number(const uint8_t *cert, size_t cert_size, * and the size of buffer returned cert_issuer on output. * * @retval true If the issuer_size is not equal 0. The certificate issuer retrieved successfully. - * @retval true If the issuer_size is equal 0. The certificate parse successful. But the cert doen't have issuer. + * @retval true If the issuer_size is equal 0. The certificate parse successful. But the cert doesn't have issuer. * @retval false If the issuer_size is not equal 0. The certificate issuer retrieved successfully. But the issuer_size is too small for the result. * @retval false If the issuer_size is equal 0. Invalid certificate. * @@ -1274,7 +1274,7 @@ int32_t libspdm_x509_compare_date_time(const void *date_time1, const void *date_ * @param[out] usage key usage (LIBSPDM_CRYPTO_X509_KU_*) * * @retval true if the usage is no equal 0. The certificate key usage retrieved successfully. - * @retval true if the usage is equal 0. The certificate parse successfully, but the cert doen't have key usage. + * @retval true if the usage is equal 0. The certificate parse successfully, but the cert doesn't have key usage. * @retval false Invalid certificate, or usage is NULL. **/ bool libspdm_x509_get_key_usage(const uint8_t *cert, size_t cert_size,