cert_write: Support write any for extended key usage

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
This commit is contained in:
Pengyu Lv 2023-05-18 17:18:36 +08:00
parent 5b91dc7265
commit b078607f04

View file

@ -530,6 +530,8 @@ usage:
SET_OID(ext_key_usage->buf, MBEDTLS_OID_TIME_STAMPING); SET_OID(ext_key_usage->buf, MBEDTLS_OID_TIME_STAMPING);
} else if (strcmp(q, "OCSPSigning") == 0) { } else if (strcmp(q, "OCSPSigning") == 0) {
SET_OID(ext_key_usage->buf, MBEDTLS_OID_OCSP_SIGNING); SET_OID(ext_key_usage->buf, MBEDTLS_OID_OCSP_SIGNING);
} else if (strcmp(q, "any") == 0) {
SET_OID(ext_key_usage->buf, MBEDTLS_OID_ANY_EXTENDED_KEY_USAGE);
} else { } else {
mbedtls_printf("Invalid argument for option %s\n", p); mbedtls_printf("Invalid argument for option %s\n", p);
goto usage; goto usage;