mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-24 08:07:39 +00:00
Minor style and documentation improvements
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com> Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
This commit is contained in:
parent
502d4b4510
commit
6e24980cc6
|
@ -310,14 +310,15 @@ int mbedtls_x509_crt_parse_der( mbedtls_x509_crt *chain,
|
||||||
* mbedtls_x509_crt_parse_der_ext() routine when it encounters
|
* mbedtls_x509_crt_parse_der_ext() routine when it encounters
|
||||||
* an unsupported extension.
|
* an unsupported extension.
|
||||||
*
|
*
|
||||||
* \param crt Pointer to the certificate being parsed
|
* \param crt The certificate being parsed.
|
||||||
* \param oid Extension's OID
|
* \param oid The OID of the extension.
|
||||||
* \param critical If the extension is critical (per the RFC's definition)
|
* \param critical Whether the extension is critical.
|
||||||
* \param p On entry \c *p points to the start of the extension ASN.1
|
* \param p On entry, \c *p points to the start of the extension value
|
||||||
* data. On successful completion \c *p must point to the
|
* (the content of the OCTET STRING).
|
||||||
* first byte after it.
|
* On successful completion, \c *p must point to the
|
||||||
* On error, the value of \c *p is undefined.
|
* first byte after the extension value.
|
||||||
* \param end End of extension data.
|
* On error, the value of \c *p is not undefined.
|
||||||
|
* \param end End of extension value.
|
||||||
*
|
*
|
||||||
* \note The callback must fail and return a negative error code if
|
* \note The callback must fail and return a negative error code if
|
||||||
* it can not parse or does not support the extension.
|
* it can not parse or does not support the extension.
|
||||||
|
@ -356,8 +357,7 @@ typedef int (*mbedtls_x509_crt_ext_cb_t)( mbedtls_x509_crt const *crt,
|
||||||
int mbedtls_x509_crt_parse_der_ext( mbedtls_x509_crt *chain,
|
int mbedtls_x509_crt_parse_der_ext( mbedtls_x509_crt *chain,
|
||||||
const unsigned char *buf,
|
const unsigned char *buf,
|
||||||
size_t buflen,
|
size_t buflen,
|
||||||
mbedtls_x509_crt_ext_cb_t cb
|
mbedtls_x509_crt_ext_cb_t cb );
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Parse a single DER formatted certificate and add it
|
* \brief Parse a single DER formatted certificate and add it
|
||||||
|
|
|
@ -957,7 +957,7 @@ static int x509_get_crt_ext( unsigned char **p,
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
/* Give the callback (if any) a chance to handle the extension */
|
/* Give the callback (if any) a chance to handle the extension */
|
||||||
if (cb && cb(crt, &extn_oid, is_critical, p, end_ext_octet) == 0)
|
if( cb != NULL && cb( crt, &extn_oid, is_critical, p, end_ext_octet ) == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* No parser found, skip extension */
|
/* No parser found, skip extension */
|
||||||
|
|
Loading…
Reference in a new issue