diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 1772f87d9b..fe060f3d92 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -66,7 +66,7 @@ int main(void) " output_file=%%s default: cert.req\n" \ " subject_name=%%s default: CN=Cert,O=mbed TLS,C=UK\n" \ " san=%%s default: (none)\n" \ - " Comma-separated-list of values:\n" \ + " Semicolon-separated-list of values:\n" \ " DNS:value\n" \ " URI:value\n" \ " IP:value (Only IPv4 is supported)\n" \ @@ -119,7 +119,7 @@ struct options { static void ip_string_to_bytes(const char *str, uint8_t *bytes, int maxBytes) { for (int i = 0; i < maxBytes; i++) { - bytes[i] = (uint8_t) strtoul(str, NULL, 16); + bytes[i] = (uint8_t) strtoul(str, NULL, 10); str = strchr(str, '.'); if (str == NULL || *str == '\0') { break; diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index c8412fb0f8..717cd396a7 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -136,12 +136,12 @@ int main(void) " Possible values: 0, 1\n" \ " (Considered for v3 only)\n" \ " san=%%s default: (none)\n" \ - " Comma-separated-list of values:\n" \ + " Semicolon-separated-list of values:\n" \ " DNS:value\n" \ " URI:value\n" \ " RFC822:value\n" \ " IP:value (Only IPv4 is supported)\n" \ - " DN:value\n" \ + " DN:list of comma separated key=value pairs\n"\ " authority_identifier=%%s default: 1\n" \ " Possible values: 0, 1\n" \ " (Considered for v3 only)\n" \ @@ -219,7 +219,7 @@ struct options { static void ip_string_to_bytes(const char *str, uint8_t *bytes, int maxBytes) { for (int i = 0; i < maxBytes; i++) { - bytes[i] = (uint8_t) strtoul(str, NULL, 16); + bytes[i] = (uint8_t) strtoul(str, NULL, 10); str = strchr(str, '.'); if (str == NULL || *str == '\0') { break;