mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Declare oid_xxx_numeric_string only when they are defined
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -489,6 +489,7 @@ size_t mbedtls_x509_crt_parse_cn_inet_pton(const char *cn, void *dst);
|
|||||||
p += (size_t) ret; \
|
p += (size_t) ret; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_X509_USE_C)
|
||||||
/**
|
/**
|
||||||
* \brief Translate an ASN.1 OID into its numeric representation
|
* \brief Translate an ASN.1 OID into its numeric representation
|
||||||
* (e.g. "\x2A\x86\x48\x86\xF7\x0D" into "1.2.840.113549")
|
* (e.g. "\x2A\x86\x48\x86\xF7\x0D" into "1.2.840.113549")
|
||||||
@ -501,7 +502,9 @@ size_t mbedtls_x509_crt_parse_cn_inet_pton(const char *cn, void *dst);
|
|||||||
* PSA_ERROR_BUFFER_TOO_SMALL in case of error
|
* PSA_ERROR_BUFFER_TOO_SMALL in case of error
|
||||||
*/
|
*/
|
||||||
int mbedtls_oid_get_numeric_string(char *buf, size_t size, const mbedtls_asn1_buf *oid);
|
int mbedtls_oid_get_numeric_string(char *buf, size_t size, const mbedtls_asn1_buf *oid);
|
||||||
|
#endif /* MBEDTLS_X509_USE_C */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_X509_CREATE_C)
|
||||||
/**
|
/**
|
||||||
* \brief Translate a string containing a dotted-decimal
|
* \brief Translate a string containing a dotted-decimal
|
||||||
* representation of an ASN.1 OID into its encoded form
|
* representation of an ASN.1 OID into its encoded form
|
||||||
@ -520,6 +523,7 @@ int mbedtls_oid_get_numeric_string(char *buf, size_t size, const mbedtls_asn1_bu
|
|||||||
* allocate oid->buf
|
* allocate oid->buf
|
||||||
*/
|
*/
|
||||||
int mbedtls_oid_from_numeric_string(mbedtls_asn1_buf *oid, const char *oid_str, size_t size);
|
int mbedtls_oid_from_numeric_string(mbedtls_asn1_buf *oid, const char *oid_str, size_t size);
|
||||||
|
#endif /* MBEDTLS_X509_CREATE_C */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -704,7 +704,7 @@ void x509_set_extension_length_check()
|
|||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE depends_on:MBEDTLS_X509_USE_C */
|
/* BEGIN_CASE depends_on:MBEDTLS_X509_CREATE_C */
|
||||||
void oid_from_numeric_string(char *oid_str, int error_ret,
|
void oid_from_numeric_string(char *oid_str, int error_ret,
|
||||||
data_t *exp_oid_buf)
|
data_t *exp_oid_buf)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user