Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typo for include folder #2730

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/hal/library/cryptlib/cryptlib_cert.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**/
Expand Down Expand Up @@ -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.
**/
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions include/hal/library/responder/csrlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 2 additions & 2 deletions include/industry_standard/pcidoe.h
Original file line number Diff line number Diff line change
@@ -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
**/

Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions include/internal/libspdm_common_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/internal/libspdm_requester_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/library/spdm_common_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion include/library/spdm_requester_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
**/

Expand Down
4 changes: 2 additions & 2 deletions library/spdm_common_lib/libspdm_com_context_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions library/spdm_common_lib/libspdm_com_opaque_data.c
Original file line number Diff line number Diff line change
@@ -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
**/

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions library/spdm_requester_lib/libspdm_req_encap_digests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion library/spdm_requester_lib/libspdm_req_get_csr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions os_stub/cryptlib_mbedtls/pk/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**/
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions os_stub/cryptlib_null/pk/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**/
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions os_stub/cryptlib_openssl/pk/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**/
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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,
Expand Down
Loading