Skip to content

Commit 716973e

Browse files
committed
Documentation cleanups
Signed-off-by: Ben Collins <[email protected]>
1 parent 8e54449 commit 716973e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/jwt.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -1173,22 +1173,22 @@ static inline void jwks_freep(jwk_set_t **jwks) {
11731173
* @brief Return the index'th jwk_item in the jwk_set
11741174
*
11751175
* Allows you to obtain the raw jwk_item. NOTE, this is not a copy of the item,
1176-
* so any changes to it will be reflected to it in the jwk_set. This also means
1177-
* if the jwk_set is freed, then this data is freed and cannot be used.
1176+
* which means if the jwk_set is freed, then this data is freed and cannot be
1177+
* used.
11781178
*
11791179
* @param jwk_set An existing jwk_set_t
11801180
* @param index Index of the jwk_set
11811181
* @return A valid jwk_item_t or NULL if it doesn't exist
11821182
*
1183-
* @remark It's also worth pointing out that the index of a specific jwk_item
1184-
* in a jwk_set can and will change if items are added or removed from the
1185-
* jwk_set.
1183+
* @warning The index of an item in a keyring can change if items are deleted.
1184+
* Effort is made to add new JWK to the end of the set, so this should not
1185+
* affect the index of previous items.
11861186
*/
11871187
JWT_EXPORT
11881188
const jwk_item_t *jwks_item_get(const jwk_set_t *jwk_set, size_t index);
11891189

11901190
/**
1191-
* @brief Whther this key is private (or public)
1191+
* @brief Whether this key is private (or public)
11921192
*
11931193
* @param item A JWK Item
11941194
* @return 1 for true, 0 for false
@@ -1209,7 +1209,7 @@ int jwks_item_error(const jwk_item_t *item);
12091209
* @brief Check the error message for a JWK Item
12101210
*
12111211
* @param item A JWK Item
1212-
* @return A string message. Empty string if not error.
1212+
* @return A string message. Empty string if no error.
12131213
*/
12141214
JWT_EXPORT
12151215
const char *jwks_item_error_msg(const jwk_item_t *item);
@@ -1276,7 +1276,7 @@ jwk_key_op_t jwks_item_key_ops(const jwk_item_t *item);
12761276
/**
12771277
* @brief The PEM generated for the JWK
12781278
*
1279-
* THis is an optional field that may or may not be supported depending on
1279+
* This is an optional field that may or may not be supported depending on
12801280
* which crypto backend is in use. It is provided as a courtesy.
12811281
*
12821282
* @param item A JWK Item
@@ -1289,7 +1289,7 @@ const char *jwks_item_pem(const jwk_item_t *item);
12891289
* @brief The number of bits in this JWK
12901290
*
12911291
* This is relevant to the key type (kty). E.g. an RSA key would have atleast
1292-
* 2048 bits, and EC key would be 256, 384, or 521 bits, etc.
1292+
* 2048 bits, and an EC key would be 256, 384, or 521 bits, etc.
12931293
*
12941294
* @param item A JWK Item
12951295
* @return The number of bits for the key
@@ -1312,7 +1312,7 @@ int jwks_item_free(jwk_set_t *jwk_set, size_t index);
13121312
* The jwk_set_t becomes an empty set.
13131313
*
13141314
* @param jwk_set A JWKS object
1315-
* @return The numbner of items deleted
1315+
* @return The number of items deleted
13161316
*/
13171317
JWT_EXPORT
13181318
int jwks_item_free_all(jwk_set_t *jwk_set);

0 commit comments

Comments
 (0)