From 6cb59c55c32fbd077dfd2db6732f116fd2484aea Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Mon, 6 Mar 2023 09:57:16 +0100 Subject: [PATCH] ip_string_to_bytes: remove status, add info about supported ip version Signed-off-by: Przemek Stekiel --- programs/x509/cert_req.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 1588be164..74ade34d5 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -67,7 +67,7 @@ int main(void) " Comma-separated-list of values:\n" \ " DNS:value\n" \ " URI:value\n" \ - " IP:value\n" \ + " IP:value (Only IPv4 is supported)\n" \ " key_usage=%%s default: (empty)\n" \ " Comma-separated-list of values:\n" \ " digital_signature\n" \ @@ -114,7 +114,7 @@ struct options { mbedtls_md_type_t md_alg; /* Hash algorithm used for signature. */ } opt; -static int ip_string_to_bytes(const char *str, uint8_t *bytes, int maxBytes) +static void ip_string_to_bytes(const char *str, uint8_t *bytes, int maxBytes) { for (int i = 0; i < maxBytes; i++) { bytes[i] = strtoul(str, NULL, 16); @@ -124,7 +124,6 @@ static int ip_string_to_bytes(const char *str, uint8_t *bytes, int maxBytes) } str++; } - return 0; } int write_certificate_request(mbedtls_x509write_csr *req, const char *output_file,