Skip to content

Commit

Permalink
Fix spelling errors
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Bellock <[email protected]>
  • Loading branch information
steven-bellock committed Dec 4, 2024
1 parent de580ad commit 7782bff
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion include/hal/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* the 64-bit definition defined in libspdm and generates compile errors. */

/* To workaround this issue, LIBSPDM_OPENSSL_STDINT_WORKAROUND was created
* that is only defined for compilation via tha makefile of the OpenSSL library
* that is only defined for compilation via the makefile of the OpenSSL library
* portion of libspdm. */

/* This will lead to _WIN32 and _WIN64 to be NOT defined when reaching the OpenSSL
Expand Down
4 changes: 2 additions & 2 deletions include/hal/library/cryptlib/cryptlib_cert.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ extern bool libspdm_x509_get_extension_data(const uint8_t *cert, size_t cert_siz
* @param[out] to notAfter Pointer to date_time object.
* @param[in,out] to_size notAfter date_time object size.
*
* Note: libspdm_x509_compare_date_time to compare date_time oject
* Note: libspdm_x509_compare_date_time to compare date_time object
* x509SetDateTime to get a date_time object from a date_time_str
*
* @retval true if the from_size and from_size are not equal 0.
Expand Down Expand Up @@ -200,7 +200,7 @@ extern bool libspdm_x509_set_date_time(const char *date_time_str, void *date_tim
* If date_time1 > date_time2, then return 1
* If date_time1 < date_time2, then return -1
*
* @param[in] date_time1 Pointer to a date_time Ojbect
* @param[in] date_time1 Pointer to a date_time Object
* @param[in] date_time2 Pointer to a date_time Object
*
* @retval 0 If date_time1 == date_time2
Expand Down
2 changes: 1 addition & 1 deletion include/industry_standard/spdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ typedef struct {
typedef struct {
spdm_message_header_t header;
/* param1 == RSVD (supported_slot_mask in 1.3)
* param2 == slot_mask (provisioned_slot_mask in 1.3) determing slot_count
* param2 == slot_mask (provisioned_slot_mask in 1.3) determine slot_count
* cert slot state:
* 1) not exist: supported_slot_mask[slot_id] = 0
* 2) exist and empty: supported_slot_mask[slot_id] = 1 && provisioned_slot_mask[slot_id] = 0
Expand Down
18 changes: 9 additions & 9 deletions include/library/spdm_common_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ typedef libspdm_return_t (*libspdm_device_receive_message_func)(void *spdm_conte
* This function must be called after libspdm_init_context, and before any SPDM communication.
*
* @param spdm_context A pointer to the SPDM context.
* @param send_message The fuction to send an SPDM transport layer message.
* @param receive_message The fuction to receive an SPDM transport layer message.
* @param send_message The function to send an SPDM transport layer message.
* @param receive_message The function to receive an SPDM transport layer message.
**/
void libspdm_register_device_io_func(
void *spdm_context, libspdm_device_send_message_func send_message,
Expand Down Expand Up @@ -628,10 +628,10 @@ typedef void (*libspdm_device_release_receiver_buffer_func)(void *spdm_context,
* @param spdm_context A pointer to the SPDM context.
* @param sender_buffer_size Size in bytes of the sender buffer.
* @param receiver_buffer_size Size in bytes of the receiver buffer.
* @param acquire_sender_buffer The fuction to acquire transport layer sender buffer.
* @param release_sender_buffer The fuction to release transport layer sender buffer.
* @param acquire_receiver_buffer The fuction to acquire transport layer receiver buffer.
* @param release_receiver_buffer The fuction to release transport layer receiver buffer.
* @param acquire_sender_buffer The function to acquire transport layer sender buffer.
* @param release_sender_buffer The function to release transport layer sender buffer.
* @param acquire_receiver_buffer The function to acquire transport layer receiver buffer.
* @param release_receiver_buffer The function to release transport layer receiver buffer.
**/
void libspdm_register_device_buffer_func(
void *spdm_context,
Expand Down Expand Up @@ -732,8 +732,8 @@ typedef uint32_t (*libspdm_transport_get_header_size_func)(void *spdm_context);
* This function must be called after libspdm_init_context, and before any SPDM communication.
*
* @param spdm_context A pointer to the SPDM context.
* @param transport_encode_message The fuction to encode an SPDM or APP message to a transport layer message.
* @param transport_decode_message The fuction to decode an SPDM or APP message from a transport layer message.
* @param transport_encode_message The function to encode an SPDM or APP message to a transport layer message.
* @param transport_decode_message The function to decode an SPDM or APP message from a transport layer message.
**/
void libspdm_register_transport_layer_func(
void *spdm_context,
Expand Down Expand Up @@ -827,7 +827,7 @@ typedef bool (*libspdm_verify_spdm_cert_chain_func)(
* This function must be called after libspdm_init_context, and before any SPDM communication.
*
* @param spdm_context A pointer to the SPDM context.
* @param verify_certificate The fuction to verify an SPDM certificate after GET_CERTIFICATE.
* @param verify_certificate The function to verify an SPDM certificate after GET_CERTIFICATE.
**/
void libspdm_register_verify_spdm_cert_chain_func(
void *spdm_context,
Expand Down
18 changes: 9 additions & 9 deletions library/spdm_common_lib/libspdm_com_context_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -2403,8 +2403,8 @@ bool libspdm_is_encap_supported(const libspdm_context_t *spdm_context)
* This function must be called after libspdm_init_context, and before any SPDM communication.
*
* @param spdm_context A pointer to the SPDM context.
* @param send_message The fuction to send an SPDM transport layer message.
* @param receive_message The fuction to receive an SPDM transport layer message.
* @param send_message The function to send an SPDM transport layer message.
* @param receive_message The function to receive an SPDM transport layer message.
**/
void libspdm_register_device_io_func(
void *spdm_context, libspdm_device_send_message_func send_message,
Expand Down Expand Up @@ -2455,10 +2455,10 @@ void libspdm_register_device_io_func(
* @param spdm_context A pointer to the SPDM context.
* @param sender_buffer_size Size in bytes of the sender buffer.
* @param receiver_buffer_size Size in bytes of the receiver buffer.
* @param acquire_sender_buffer The fuction to acquire transport layer sender buffer.
* @param release_sender_buffer The fuction to release transport layer sender buffer.
* @param acquire_receiver_buffer The fuction to acquire transport layer receiver buffer.
* @param release_receiver_buffer The fuction to release transport layer receiver buffer.
* @param acquire_sender_buffer The function to acquire transport layer sender buffer.
* @param release_sender_buffer The function to release transport layer sender buffer.
* @param acquire_receiver_buffer The function to acquire transport layer receiver buffer.
* @param release_receiver_buffer The function to release transport layer receiver buffer.
**/
void libspdm_register_device_buffer_func(
void *spdm_context,
Expand Down Expand Up @@ -2502,8 +2502,8 @@ void libspdm_register_device_buffer_func(
* This function must be called after libspdm_init_context, and before any SPDM communication.
*
* @param spdm_context A pointer to the SPDM context.
* @param transport_encode_message The fuction to encode an SPDM or APP message to a transport layer message.
* @param transport_decode_message The fuction to decode an SPDM or APP message from a transport layer message.
* @param transport_encode_message The function to encode an SPDM or APP message to a transport layer message.
* @param transport_decode_message The function to decode an SPDM or APP message from a transport layer message.
**/
void libspdm_register_transport_layer_func(
void *spdm_context,
Expand Down Expand Up @@ -2552,7 +2552,7 @@ void libspdm_register_transport_layer_func(
* This function must be called after libspdm_init_context, and before any SPDM communication.
*
* @param context A pointer to the SPDM context.
* @param verify_spdm_cert_chain The fuction to verify an SPDM certificate after GET_CERTIFICATE.
* @param verify_spdm_cert_chain The function to verify an SPDM certificate after GET_CERTIFICATE.
**/
void libspdm_register_verify_spdm_cert_chain_func(
void *spdm_context,
Expand Down
6 changes: 3 additions & 3 deletions library/spdm_crypt_lib/libspdm_crypt_cert.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static uint32_t libspdm_get_public_key_algo_OID_len(uint32_t base_asym_algo)
* @param[in,out] oid_other Other SPDM public key encryption algorithm OID
* because of ASN1 code for integer
*
* @retval true get OID sucessful.
* @retval true get OID successful.
* @retval false get OID fail.
**/
static bool libspdm_get_public_key_algo_OID(uint32_t base_asym_algo, uint8_t *oid,
Expand Down Expand Up @@ -1495,9 +1495,9 @@ bool libspdm_get_dmtf_subject_alt_name_from_bytes(
return false;
}

/* the src and dst adress are overlap,
/* the src and dst address are overlap,
* When the function is called by libspdm_get_dmtf_subject_alt_name.
* libspdm_copy_mem can not be uesed */
* libspdm_copy_mem can not be used */
if ((name_buffer != NULL) && (ptr != NULL)) {
dst = (volatile uint8_t*) name_buffer;
src = (const volatile uint8_t*) ptr;
Expand Down
2 changes: 1 addition & 1 deletion library/spdm_requester_lib/libspdm_req_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ libspdm_return_t libspdm_process_opaque_data_version_selection_data(libspdm_cont
opaque_element_table_header = (const secured_message_opaque_element_table_header_t*)
get_element_ptr;

/*check for selection vesion data*/
/* Check for selection version data. */
if ((opaque_element_table_header->vendor_len != 0) ||
(opaque_element_table_header->opaque_element_data_len !=
sizeof(secured_message_opaque_element_version_selection_t))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ libspdm_return_t libspdm_handle_simple_error_response(libspdm_context_t *spdm_co
* On input, it means the size in bytes of response data buffer.
* On output, it means the size in bytes of copied response data buffer if RETURN_SUCCESS is returned.
* @param response The SPDM response message.
* @param original_request_code Indicate the orginal request code.
* @param original_request_code Indicate the original request code.
* @param expected_response_code Indicate the expected response code.
*
* @retval RETURN_SUCCESS The RESPOND_IF_READY is sent and an expected SPDM response is received.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static libspdm_return_t libspdm_try_negotiate_algorithms(libspdm_context_t *spdm
sizeof(uint32_t) * spdm_response->ext_hash_sel_count);
if (spdm_response->header.spdm_version >= SPDM_MESSAGE_VERSION_11) {
alg_type_pre = struct_table->alg_type;
/* header.param1 is implictly checked through spdm_response_size. */
/* header.param1 is implicitly checked through spdm_response_size. */
for (index = 0; index < spdm_response->header.param1; index++) {
if ((size_t)spdm_response + spdm_response_size < (size_t)struct_table) {
status = LIBSPDM_STATUS_INVALID_MSG_SIZE;
Expand Down
2 changes: 1 addition & 1 deletion library/spdm_responder_lib/libspdm_rsp_chunk_send_ack.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ libspdm_return_t libspdm_get_response_chunk_send(libspdm_context_t *spdm_context
}

if (spdm_context->chunk_context.get.chunk_in_use) {
/* Spec does not support simultanious chunk send and chunk get */
/* Specification does not support simultaneous chunk send and chunk get. */
return libspdm_generate_error_response(
spdm_context, SPDM_ERROR_CODE_UNEXPECTED_REQUEST, 0,
response_size, response);
Expand Down
4 changes: 2 additions & 2 deletions os_stub/cryptlib_mbedtls/pk/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ bool libspdm_x509_get_extension_data(const uint8_t *cert, size_t cert_size,
* @param[out] to notAfter Pointer to date_time object.
* @param[in,out] to_size notAfter date_time object size.
*
* Note: libspdm_x509_compare_date_time to compare date_time oject
* Note: libspdm_x509_compare_date_time to compare date_time object
* x509SetDateTime to get a date_time object from a date_time_str
*
* @retval true The certificate Validity retrieved successfully.
Expand Down Expand Up @@ -1659,7 +1659,7 @@ bool libspdm_x509_set_date_time(const char *date_time_str, void *date_time, size
* If date_time1 > date_time2, then return 1
* If date_time1 < date_time2, then return -1
*
* @param[in] date_time1 Pointer to a date_time Ojbect
* @param[in] date_time1 Pointer to a date_time Object
* @param[in] date_time2 Pointer to a date_time Object
*
* @retval 0 If date_time1 == date_time2
Expand Down
4 changes: 2 additions & 2 deletions os_stub/cryptlib_null/pk/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ bool libspdm_x509_get_extension_data(const uint8_t *cert, size_t cert_size,
* @param[out] to notAfter Pointer to date_time object.
* @param[in,out] to_size notAfter date_time object size.
*
* Note: libspdm_x509_compare_date_time to compare date_time oject
* Note: libspdm_x509_compare_date_time to compare date_time object
* x509SetDateTime to get a date_time object from a date_time_str
*
* @retval true The certificate Validity retrieved successfully.
Expand Down Expand Up @@ -712,7 +712,7 @@ bool libspdm_x509_set_date_time(const char *date_time_str, void *date_time, size
* If date_time1 > date_time2, then return 1
* If date_time1 < date_time2, then return -1
*
* @param[in] date_time1 Pointer to a date_time Ojbect
* @param[in] date_time1 Pointer to a date_time Object
* @param[in] date_time2 Pointer to a date_time Object
*
* @retval 0 If date_time1 == date_time2
Expand Down
4 changes: 2 additions & 2 deletions os_stub/cryptlib_openssl/pk/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ bool libspdm_x509_get_signature_algorithm(const uint8_t *cert,
* @param[out] to notAfter Pointer to date_time object.
* @param[in,out] to_size notAfter date_time object size.
*
* Note: libspdm_x509_compare_date_time to compare date_time oject
* Note: libspdm_x509_compare_date_time to compare date_time object
* x509SetDateTime to get a date_time object from a date_time_str
*
* @retval true The certificate Validity retrieved successfully.
Expand Down Expand Up @@ -1248,7 +1248,7 @@ bool libspdm_x509_set_date_time(const char *date_time_str, void *date_time, size
* If date_time1 > date_time2, then return 1
* If date_time1 < date_time2, then return -1
*
* @param[in] date_time1 Pointer to a date_time Ojbect
* @param[in] date_time1 Pointer to a date_time Object
* @param[in] date_time2 Pointer to a date_time Object
*
* @retval 0 If date_time1 == date_time2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @param spdm_context A pointer to the SPDM context.
* @param slot_id The number of slot for the certificate chain.
* This params is not uesed, just for compatible in this function.
* This params is not used, just for compatible in this function.
* @param cert_chain_size size in bytes of the certificate chain buffer.
* @param cert_chain Certificate chain buffer including spdm_cert_chain_t header.
* @param trust_anchor A buffer to hold the trust_anchor which is used to validate the peer certificate, if not NULL.
Expand Down
16 changes: 8 additions & 8 deletions unit_test/test_spdm_common/context_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -1564,21 +1564,21 @@ int libspdm_common_context_data_test_main(void)

cmocka_unit_test(libspdm_test_set_data_case9),

/* Successful response V1.1 for multi element opaque data supported vesion, element number is 2*/
/* Successful response V1.1 for multi element opaque data supported version, element number is 2*/
cmocka_unit_test(libspdm_test_process_opaque_data_supported_version_data_case10),
/* Failed response V1.1 for multi element opaque data supported vesion, element id is wrong*/
/* Failed response V1.1 for multi element opaque data supported version, element id is wrong*/
cmocka_unit_test(libspdm_test_process_opaque_data_supported_version_data_case11),
/* Successful response V1.2 for multi element opaque data supported vesion, element number is 2*/
/* Successful response V1.2 for multi element opaque data supported version, element number is 2*/
cmocka_unit_test(libspdm_test_process_opaque_data_supported_version_data_case12),
/* Failed response V1.2 for multi element opaque data supported vesion, element id is wrong*/
/* Failed response V1.2 for multi element opaque data supported version, element id is wrong*/
cmocka_unit_test(libspdm_test_process_opaque_data_supported_version_data_case13),
/* Successful response V1.1 for multi element opaque data selecetion vesion, element number is 2*/
/* Successful response V1.1 for multi element opaque data selection version, element number is 2*/
cmocka_unit_test(libspdm_test_process_opaque_data_selection_version_data_case14),
/* Failed response V1.1 for multi element opaque data selecetion vesion, element number is wrong*/
/* Failed response V1.1 for multi element opaque data selection version, element number is wrong*/
cmocka_unit_test(libspdm_test_process_opaque_data_selection_version_data_case15),
/* Successful response V1.2 for multi element opaque data selecetion vesion, element number is 2*/
/* Successful response V1.2 for multi element opaque data selection version, element number is 2*/
cmocka_unit_test(libspdm_test_process_opaque_data_selection_version_data_case16),
/* Failed response V1.2 for multi element opaque data selecetion vesion, element number is wrong*/
/* Failed response V1.2 for multi element opaque data selection version, element number is wrong*/
cmocka_unit_test(libspdm_test_process_opaque_data_selection_version_data_case17),

/* Successful initialization and setting of secured message context location. */
Expand Down
2 changes: 1 addition & 1 deletion unit_test/test_spdm_requester/get_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ static void libspdm_test_requester_get_version_case10(void **state)
*/

/**
* Test 15: receiving a VERSION message with unordered vesion list.
* Test 15: receiving a VERSION message with unordered version list.
* Requester list:5.5, 0.9, 1.0, 1.1
* Responder list:4.2, 5.2, 1.2, 1.1, 1.0
* Expected behavior: client returns a status of LIBSPDM_STATUS_SUCCESS and right negotiated version 1.1.
Expand Down

0 comments on commit 7782bff

Please sign in to comment.