diff options
author | Jan-Frederik Rieckers <rieckers@uni-bremen.de> | 2019-12-09 15:33:32 +0100 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2019-12-11 22:29:19 +0300 |
commit | f5e77bb0fa25b2fd87c879eb5bfa3e7945731675 (patch) | |
tree | 041460f304ef32d27bbd9e5563924179c1b36ce9 /crypto/x509 | |
parent | 77fedcdc8cf5446354a1e7ff9123d8ada5b79b06 (diff) |
Add support for otherName:NAIRealm in output
This commit adds support for displaying RFC 7585 otherName:NAIRealm in
the text output of openssl
CLA: trivial
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/10594)
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/v3_alt.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/x509/v3_alt.c b/crypto/x509/v3_alt.c index f31b884db1..a910d5d718 100644 --- a/crypto/x509/v3_alt.c +++ b/crypto/x509/v3_alt.c @@ -113,6 +113,13 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, &ret)) return NULL; break; + case NID_NAIRealm: + if (gen->d.otherName->value->type != V_ASN1_UTF8STRING + || !X509V3_add_value_uchar("othername: NAIRealm:", + gen->d.otherName->value->value.utf8string->data, + &ret)) + return NULL; + break; default: if (!X509V3_add_value("othername", "<unsupported>", &ret)) return NULL; @@ -217,6 +224,10 @@ int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen) BIO_printf(out, "othername:UPN:%s", gen->d.otherName->value->value.utf8string->data); break; + case NID_NAIRealm: + BIO_printf(out, "othername:NAIRealm:%s", + gen->d.otherName->value->value.utf8string->data); + break; default: BIO_printf(out, "othername:<unsupported>"); break; |