diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-11-03 18:41:07 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-11-08 07:47:55 +0100 |
commit | 03ee2e5b1ecd1832d99d07fc459ecf62f5a0b168 (patch) | |
tree | e63fb00c0df046d97c8789c3fc60d700e8349793 /apps | |
parent | 4ce64ed79d301939c7f2844a9e5e5fdd2033605f (diff) |
APPS/cmp: make the -sans option support email addresses (type rfc822Name)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16960)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/cmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/cmp.c b/apps/cmp.c index b6e88e64f6..1c97075531 100644 --- a/apps/cmp.c +++ b/apps/cmp.c @@ -836,11 +836,12 @@ static int set_gennames(OSSL_CMP_CTX *ctx, char *names, const char *desc) continue; } - /* try IP address first, then URI or domain name */ + /* try IP address first, then email/URI/domain name */ (void)ERR_set_mark(); n = a2i_GENERAL_NAME(NULL, NULL, NULL, GEN_IPADD, names, 0); if (n == NULL) n = a2i_GENERAL_NAME(NULL, NULL, NULL, + strchr(names, '@') != NULL ? GEN_EMAIL : strchr(names, ':') != NULL ? GEN_URI : GEN_DNS, names, 0); (void)ERR_pop_to_mark(); |