@@ -1173,22 +1173,22 @@ static inline void jwks_freep(jwk_set_t **jwks) {
1173
1173
* @brief Return the index'th jwk_item in the jwk_set
1174
1174
*
1175
1175
* 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.
1178
1178
*
1179
1179
* @param jwk_set An existing jwk_set_t
1180
1180
* @param index Index of the jwk_set
1181
1181
* @return A valid jwk_item_t or NULL if it doesn't exist
1182
1182
*
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 .
1186
1186
*/
1187
1187
JWT_EXPORT
1188
1188
const jwk_item_t * jwks_item_get (const jwk_set_t * jwk_set , size_t index );
1189
1189
1190
1190
/**
1191
- * @brief Whther this key is private (or public)
1191
+ * @brief Whether this key is private (or public)
1192
1192
*
1193
1193
* @param item A JWK Item
1194
1194
* @return 1 for true, 0 for false
@@ -1209,7 +1209,7 @@ int jwks_item_error(const jwk_item_t *item);
1209
1209
* @brief Check the error message for a JWK Item
1210
1210
*
1211
1211
* @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.
1213
1213
*/
1214
1214
JWT_EXPORT
1215
1215
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);
1276
1276
/**
1277
1277
* @brief The PEM generated for the JWK
1278
1278
*
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
1280
1280
* which crypto backend is in use. It is provided as a courtesy.
1281
1281
*
1282
1282
* @param item A JWK Item
@@ -1289,7 +1289,7 @@ const char *jwks_item_pem(const jwk_item_t *item);
1289
1289
* @brief The number of bits in this JWK
1290
1290
*
1291
1291
* 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.
1293
1293
*
1294
1294
* @param item A JWK Item
1295
1295
* @return The number of bits for the key
@@ -1312,7 +1312,7 @@ int jwks_item_free(jwk_set_t *jwk_set, size_t index);
1312
1312
* The jwk_set_t becomes an empty set.
1313
1313
*
1314
1314
* @param jwk_set A JWKS object
1315
- * @return The numbner of items deleted
1315
+ * @return The number of items deleted
1316
1316
*/
1317
1317
JWT_EXPORT
1318
1318
int jwks_item_free_all (jwk_set_t * jwk_set );
0 commit comments