ip_string_to_bytes: remove status, add info about supported ip version
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
57207711d8
commit
6cb59c55c3
1 changed files with 2 additions and 3 deletions
|
@ -67,7 +67,7 @@ int main(void)
|
||||||
" Comma-separated-list of values:\n" \
|
" Comma-separated-list of values:\n" \
|
||||||
" DNS:value\n" \
|
" DNS:value\n" \
|
||||||
" URI:value\n" \
|
" URI:value\n" \
|
||||||
" IP:value\n" \
|
" IP:value (Only IPv4 is supported)\n" \
|
||||||
" key_usage=%%s default: (empty)\n" \
|
" key_usage=%%s default: (empty)\n" \
|
||||||
" Comma-separated-list of values:\n" \
|
" Comma-separated-list of values:\n" \
|
||||||
" digital_signature\n" \
|
" digital_signature\n" \
|
||||||
|
@ -114,7 +114,7 @@ struct options {
|
||||||
mbedtls_md_type_t md_alg; /* Hash algorithm used for signature. */
|
mbedtls_md_type_t md_alg; /* Hash algorithm used for signature. */
|
||||||
} opt;
|
} 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++) {
|
for (int i = 0; i < maxBytes; i++) {
|
||||||
bytes[i] = strtoul(str, NULL, 16);
|
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++;
|
str++;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int write_certificate_request(mbedtls_x509write_csr *req, const char *output_file,
|
int write_certificate_request(mbedtls_x509write_csr *req, const char *output_file,
|
||||||
|
|
Loading…
Reference in a new issue