Skip to content

Commit 2e4c9bf

Browse files
Delete redundant Doxygen comments from .c files
Fix #1273. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Steven Bellock <sbellock@nvidia.com>
1 parent 7f63f60 commit 2e4c9bf

35 files changed

+0
-1699
lines changed

library/spdm_common_lib/libspdm_com_context_data.c

Lines changed: 0 additions & 328 deletions
Large diffs are not rendered by default.

library/spdm_common_lib/libspdm_com_context_data_session.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66

77
#include "internal/libspdm_secured_message_lib.h"
88

9-
/**
10-
* This function initializes the session info.
11-
*
12-
* @param spdm_context A pointer to the SPDM context.
13-
* @param session_id The SPDM session ID.
14-
**/
159
void libspdm_session_info_init(libspdm_context_t *spdm_context,
1610
libspdm_session_info_t *session_info,
1711
uint32_t session_id, spdm_version_number_t secured_message_version,
@@ -136,14 +130,6 @@ void libspdm_session_info_set_psk_hint(libspdm_session_info_t *session_info,
136130
}
137131
#endif /* LIBSPDM_ENABLE_CAPABILITY_PSK_CAP */
138132

139-
/**
140-
* This function gets the session info via session ID.
141-
*
142-
* @param spdm_context A pointer to the SPDM context.
143-
* @param session_id The SPDM session ID.
144-
*
145-
* @return session info.
146-
**/
147133
void *libspdm_get_session_info_via_session_id(void *spdm_context, uint32_t session_id)
148134
{
149135
libspdm_context_t *context;
@@ -171,14 +157,6 @@ void *libspdm_get_session_info_via_session_id(void *spdm_context, uint32_t sessi
171157
return NULL;
172158
}
173159

174-
/**
175-
* This function gets the secured message context via session ID.
176-
*
177-
* @param spdm_context A pointer to the SPDM context.
178-
* @param session_id The SPDM session ID.
179-
*
180-
* @return secured message context.
181-
**/
182160
void *libspdm_get_secured_message_context_via_session_id(void *spdm_context, uint32_t session_id)
183161
{
184162
libspdm_session_info_t *session_info;
@@ -191,13 +169,6 @@ void *libspdm_get_secured_message_context_via_session_id(void *spdm_context, uin
191169
}
192170
}
193171

194-
/**
195-
* This function gets the secured message context via session ID.
196-
*
197-
* @param spdm_session_info A pointer to the SPDM context.
198-
*
199-
* @return secured message context.
200-
**/
201172
void *libspdm_get_secured_message_context_via_session_info(void *spdm_session_info)
202173
{
203174
libspdm_session_info_t *session_info;
@@ -210,14 +181,6 @@ void *libspdm_get_secured_message_context_via_session_info(void *spdm_session_in
210181
}
211182
}
212183

213-
/**
214-
* This function generate a new session ID by concatenating req_session_id and rsp_session_id.
215-
*
216-
* @param[in] req_session_id
217-
* @param[in] rsp_session_id
218-
*
219-
* @return this new session ID.
220-
**/
221184
uint32_t libspdm_generate_session_id(uint16_t req_session_id, uint16_t rsp_session_id)
222185
{
223186
uint32_t session_id;
@@ -264,12 +227,6 @@ libspdm_session_info_t *libspdm_assign_session_id(libspdm_context_t *spdm_contex
264227
return NULL;
265228
}
266229

267-
/**
268-
* This function frees a session ID.
269-
*
270-
* @param spdm_context A pointer to the SPDM context.
271-
* @param session_id The SPDM session ID.
272-
**/
273230
void libspdm_free_session_id(libspdm_context_t *spdm_context, uint32_t session_id)
274231
{
275232
libspdm_session_info_t *session_info;

library/spdm_common_lib/libspdm_com_crypto_service.c

Lines changed: 0 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66

77
#include "internal/libspdm_common_lib.h"
88

9-
/**
10-
* Map slot ID to key pair ID.
11-
*
12-
* @param spdm_context A pointer to the SPDM context.
13-
* @param slot_id The slot ID.
14-
* @param is_requester Indicate of the key generation for a requester or a responder.
15-
*
16-
* @return key pair ID.
17-
*/
189
uint8_t libspdm_slot_id_to_key_pair_id (
1910
void *spdm_context,
2011
uint8_t slot_id,
@@ -73,16 +64,6 @@ void libspdm_get_peer_cert_chain_data(void *spdm_context,
7364
}
7465
#endif /* LIBSPDM_RECORD_TRANSCRIPT_DATA_SUPPORT */
7566

76-
/**
77-
* This function returns local used certificate chain buffer including spdm_cert_chain_t header.
78-
*
79-
* @param spdm_context A pointer to the SPDM context.
80-
* @param cert_chain_buffer Certificate chain buffer including spdm_cert_chain_t header.
81-
* @param cert_chain_buffer_size size in bytes of the certificate chain buffer.
82-
*
83-
* @retval true Local used certificate chain buffer including spdm_cert_chain_t header is returned.
84-
* @retval false Local used certificate chain buffer including spdm_cert_chain_t header is not found.
85-
**/
8667
void libspdm_get_local_cert_chain_buffer(void *spdm_context,
8768
uint8_t slot_id,
8869
const void **cert_chain_buffer,
@@ -99,16 +80,6 @@ void libspdm_get_local_cert_chain_buffer(void *spdm_context,
9980
*cert_chain_buffer_size = context->local_context.local_cert_chain_provision_size[slot_id];
10081
}
10182

102-
/**
103-
* This function returns local used certificate chain data without spdm_cert_chain_t header.
104-
*
105-
* @param spdm_context A pointer to the SPDM context.
106-
* @param cert_chain_data Certificate chain data without spdm_cert_chain_t header.
107-
* @param cert_chain_data_size size in bytes of the certificate chain data.
108-
*
109-
* @retval true Local used certificate chain data without spdm_cert_chain_t header is returned.
110-
* @retval false Local used certificate chain data without spdm_cert_chain_t header is not found.
111-
**/
11283
bool libspdm_get_local_cert_chain_data(void *spdm_context,
11384
uint8_t slot_id,
11485
const void **cert_chain_data,
@@ -129,16 +100,6 @@ bool libspdm_get_local_cert_chain_data(void *spdm_context,
129100
return true;
130101
}
131102

132-
/**
133-
* This function returns peer public key buffer.
134-
*
135-
* @param spdm_context A pointer to the SPDM context.
136-
* @param peer_public_key_buffer Peer public key buffer.
137-
* @param peer_public_key_buffer_size Size in bytes of peer public key buffer.
138-
*
139-
* @retval true Peer public key buffer is returned.
140-
* @retval false Peer public key buffer is not found.
141-
**/
142103
bool libspdm_get_peer_public_key_buffer(void *spdm_context,
143104
const void **peer_public_key_buffer,
144105
size_t *peer_public_key_buffer_size)
@@ -154,16 +115,6 @@ bool libspdm_get_peer_public_key_buffer(void *spdm_context,
154115
return false;
155116
}
156117

157-
/**
158-
* This function returns local public key buffer.
159-
*
160-
* @param spdm_context A pointer to the SPDM context.
161-
* @param local_public_key_buffer Local public key buffer.
162-
* @param local_public_key_buffer_size Size in bytes of local public key buffer.
163-
*
164-
* @retval true Local public key buffer is returned.
165-
* @retval false Local public key buffer is not found.
166-
**/
167118
bool libspdm_get_local_public_key_buffer(void *spdm_context,
168119
const void **local_public_key_buffer,
169120
size_t *local_public_key_buffer_size)
@@ -634,16 +585,6 @@ static bool libspdm_calculate_il1il2_hash(libspdm_context_t *spdm_context,
634585
}
635586
#endif /* LIBSPDM_RECORD_TRANSCRIPT_DATA_SUPPORT */
636587

637-
/**
638-
* This function generates the certificate chain hash.
639-
*
640-
* @param spdm_context A pointer to the SPDM context.
641-
* @param slot_id The slot index of the certificate chain.
642-
* @param signature The buffer to store the certificate chain hash.
643-
*
644-
* @retval true certificate chain hash is generated.
645-
* @retval false certificate chain hash is not generated.
646-
**/
647588
bool libspdm_generate_cert_chain_hash(libspdm_context_t *spdm_context,
648589
size_t slot_id, uint8_t *hash)
649590
{
@@ -654,15 +595,6 @@ bool libspdm_generate_cert_chain_hash(libspdm_context_t *spdm_context,
654595
spdm_context->local_context.local_cert_chain_provision_size[slot_id], hash);
655596
}
656597

657-
/**
658-
* This function generates the public key hash.
659-
*
660-
* @param spdm_context A pointer to the SPDM context.
661-
* @param hash The buffer to store the public key hash.
662-
*
663-
* @retval true public key hash is generated.
664-
* @retval false public key hash is not generated.
665-
**/
666598
bool libspdm_generate_public_key_hash(libspdm_context_t *spdm_context,
667599
uint8_t *hash)
668600
{
@@ -672,13 +604,6 @@ bool libspdm_generate_public_key_hash(libspdm_context_t *spdm_context,
672604
spdm_context->local_context.local_public_key_provision_size, hash);
673605
}
674606

675-
/**
676-
* Get the certificate slot mask
677-
*
678-
* @param[in] context A pointer to the SPDM context.
679-
*
680-
* @retval slot_mask get slot mask
681-
**/
682607
uint8_t libspdm_get_cert_slot_mask(libspdm_context_t *spdm_context)
683608
{
684609
size_t index;
@@ -694,13 +619,6 @@ uint8_t libspdm_get_cert_slot_mask(libspdm_context_t *spdm_context)
694619
return slot_mask;
695620
}
696621

697-
/**
698-
* Get the certificate slot count
699-
*
700-
* @param[in] context A pointer to the SPDM context.
701-
*
702-
* @retval slot_count get slot count
703-
**/
704622
uint8_t libspdm_get_cert_slot_count(libspdm_context_t *spdm_context)
705623
{
706624
size_t index;
@@ -717,17 +635,6 @@ uint8_t libspdm_get_cert_slot_count(libspdm_context_t *spdm_context)
717635
}
718636

719637
#if LIBSPDM_CERT_PARSE_SUPPORT
720-
/**
721-
* This function verifies the integrity of peer certificate chain buffer including
722-
* spdm_cert_chain_t header.
723-
*
724-
* @param spdm_context A pointer to the SPDM context.
725-
* @param cert_chain_buffer Certificate chain buffer including spdm_cert_chain_t header.
726-
* @param cert_chain_buffer_size size in bytes of the certificate chain buffer.
727-
*
728-
* @retval true Peer certificate chain buffer integrity verification passed.
729-
* @retval false Peer certificate chain buffer integrity verification failed.
730-
**/
731638
bool libspdm_verify_peer_cert_chain_buffer_integrity(libspdm_context_t *spdm_context,
732639
const void *cert_chain_buffer,
733640
size_t cert_chain_buffer_size)
@@ -768,19 +675,6 @@ bool libspdm_verify_peer_cert_chain_buffer_integrity(libspdm_context_t *spdm_con
768675
return result;
769676
}
770677

771-
/**
772-
* This function verifies peer certificate chain authority.
773-
*
774-
* @param spdm_context A pointer to the SPDM context.
775-
* @param cert_chain_buffer Certificate chain buffer including spdm_cert_chain_t header.
776-
* @param cert_chain_buffer_size size in bytes of the certificate chain buffer.
777-
* @param trust_anchor A buffer to hold the trust_anchor which is used to validate the peer certificate, if not NULL.
778-
* @param trust_anchor_size A buffer to hold the trust_anchor_size, if not NULL.
779-
*
780-
* @retval true Peer certificate chain buffer authority verification passed.
781-
* Or there is no root_cert in local_context.
782-
* @retval false Peer certificate chain buffer authority verification failed.
783-
**/
784678
bool libspdm_verify_peer_cert_chain_buffer_authority(libspdm_context_t *spdm_context,
785679
const void *cert_chain_buffer,
786680
size_t cert_chain_buffer_size,
@@ -881,16 +775,6 @@ bool libspdm_verify_peer_cert_chain_buffer_authority(libspdm_context_t *spdm_con
881775
}
882776
#endif
883777

884-
/**
885-
* This function generates the challenge signature based upon m1m2 for authentication.
886-
*
887-
* @param spdm_context A pointer to the SPDM context.
888-
* @param is_requester Indicate of the signature generation for a requester or a responder.
889-
* @param signature The buffer to store the challenge signature.
890-
*
891-
* @retval true challenge signature is generated.
892-
* @retval false challenge signature is not generated.
893-
**/
894778
bool libspdm_generate_challenge_auth_signature(libspdm_context_t *spdm_context,
895779
bool is_requester,
896780
uint8_t slot_id,
@@ -995,16 +879,6 @@ bool libspdm_generate_challenge_auth_signature(libspdm_context_t *spdm_context,
995879
return result;
996880
}
997881

998-
/**
999-
* This function verifies the certificate chain hash.
1000-
*
1001-
* @param spdm_context A pointer to the SPDM context.
1002-
* @param certificate_chain_hash The certificate chain hash data buffer.
1003-
* @param certificate_chain_hash_size size in bytes of the certificate chain hash data buffer.
1004-
*
1005-
* @retval true hash verification pass.
1006-
* @retval false hash verification fail.
1007-
**/
1008882
bool libspdm_verify_certificate_chain_hash(libspdm_context_t *spdm_context,
1009883
uint8_t slot_id,
1010884
const void *certificate_chain_hash,
@@ -1063,16 +937,6 @@ bool libspdm_verify_certificate_chain_hash(libspdm_context_t *spdm_context,
1063937
return true;
1064938
}
1065939

1066-
/**
1067-
* This function verifies the public key hash.
1068-
*
1069-
* @param spdm_context A pointer to the SPDM context.
1070-
* @param public_key_hash The public key hash data buffer.
1071-
* @param public_key_hash_size size in bytes of the public key hash data buffer.
1072-
*
1073-
* @retval true hash verification pass.
1074-
* @retval false hash verification fail.
1075-
**/
1076940
bool libspdm_verify_public_key_hash(libspdm_context_t *spdm_context,
1077941
const void *public_key_hash,
1078942
size_t public_key_hash_size)
@@ -1107,17 +971,6 @@ bool libspdm_verify_public_key_hash(libspdm_context_t *spdm_context,
1107971
return true;
1108972
}
1109973

1110-
/**
1111-
* This function verifies the challenge signature based upon m1m2.
1112-
*
1113-
* @param spdm_context A pointer to the SPDM context.
1114-
* @param is_requester Indicate of the signature verification for a requester or a responder.
1115-
* @param sign_data The signature data buffer.
1116-
* @param sign_data_size size in bytes of the signature data buffer.
1117-
*
1118-
* @retval true signature verification pass.
1119-
* @retval false signature verification fail.
1120-
**/
1121974
bool libspdm_verify_challenge_auth_signature(libspdm_context_t *spdm_context,
1122975
bool is_requester,
1123976
uint8_t slot_id,
@@ -1333,16 +1186,6 @@ bool libspdm_verify_challenge_auth_signature(libspdm_context_t *spdm_context,
13331186
return true;
13341187
}
13351188

1336-
/**
1337-
* This function calculate the measurement summary hash size.
1338-
*
1339-
* @param spdm_context A pointer to the SPDM context.
1340-
* @param is_requester Is the function called from a requester.
1341-
* @param measurement_summary_hash_type The type of the measurement summary hash.
1342-
*
1343-
* @return 0 measurement summary hash type is invalid, NO_MEAS hash type or no MEAS capabilities.
1344-
* @return measurement summary hash size according to type.
1345-
**/
13461189
uint32_t
13471190
libspdm_get_measurement_summary_hash_size(libspdm_context_t *spdm_context,
13481191
bool is_requester,
@@ -1370,17 +1213,6 @@ libspdm_get_measurement_summary_hash_size(libspdm_context_t *spdm_context,
13701213
}
13711214

13721215
#if LIBSPDM_ENABLE_CAPABILITY_ENDPOINT_INFO_CAP
1373-
/**
1374-
* This function generates the endpoint info signature based upon il1il2 for authentication.
1375-
*
1376-
* @param spdm_context A pointer to the SPDM context.
1377-
* @param session_info A pointer to the SPDM session context.
1378-
* @param is_requester Indicate of the signature generation for a requester or a responder.
1379-
* @param signature The buffer to store the endpoint info signature.
1380-
*
1381-
* @retval true challenge signature is generated.
1382-
* @retval false challenge signature is not generated.
1383-
**/
13841216
bool libspdm_generate_endpoint_info_signature(libspdm_context_t *spdm_context,
13851217
libspdm_session_info_t *session_info,
13861218
bool is_requester,
@@ -1482,18 +1314,6 @@ bool libspdm_generate_endpoint_info_signature(libspdm_context_t *spdm_context,
14821314
}
14831315
#endif /* LIBSPDM_ENABLE_CAPABILITY_ENDPOINT_INFO_CAP */
14841316

1485-
/**
1486-
* This function verifies the endpoint info signature based upon il1il2.
1487-
*
1488-
* @param spdm_context A pointer to the SPDM context.
1489-
* @param session_info A pointer to the SPDM session context.
1490-
* @param is_requester Indicate of the signature verification for a requester or a responder.
1491-
* @param sign_data The signature data buffer.
1492-
* @param sign_data_size size in bytes of the signature data buffer.
1493-
*
1494-
* @retval true signature verification pass.
1495-
* @retval false signature verification fail.
1496-
**/
14971317
bool libspdm_verify_endpoint_info_signature(libspdm_context_t *spdm_context,
14981318
libspdm_session_info_t *session_info,
14991319
bool is_requester,

0 commit comments

Comments
 (0)