@@ -283,19 +283,21 @@ int mbedtls_asn1_write_bitstring( unsigned char **p, unsigned char *start,
283
283
const unsigned char * buf , size_t bits );
284
284
285
285
/**
286
- * \brief Write a named bitstring tag (MBEDTLS_ASN1_BIT_STRING) and
287
- * value in ASN.1 format
288
- * Note: function works backwards in data buffer
286
+ * \brief This function writes a named bitstring tag
287
+ * (#MBEDTLS_ASN1_BIT_STRING) and value in ASN.1 format.
289
288
*
290
- * As stated in RFC5280 Appending B, trailing zeroes are
289
+ * As stated in RFC 5280 Appendix B, trailing zeroes are
291
290
* omitted when encoding named bitstrings in DER.
292
291
*
293
- * \param p Reference to current position pointer.
294
- * \param start Start of the buffer (for bounds-checking).
295
- * \param buf The bitstring.
292
+ * \note This function works backwards within the data buffer.
293
+ *
294
+ * \param p The reference to the current position pointer.
295
+ * \param start The start of the buffer which is used for bounds-checking.
296
+ * \param buf The bitstring to write.
296
297
* \param bits The total number of bits in the bitstring.
297
298
*
298
- * \return The length written or a negative error code.
299
+ * \return The number of bytes written to \p p on success.
300
+ * \return A negative error code on failure.
299
301
*/
300
302
int mbedtls_asn1_write_named_bitstring ( unsigned char * * p ,
301
303
unsigned char * start ,
0 commit comments