Latest update.
This commit is contained in:
+39
-3
@@ -71,8 +71,28 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
|
||||
|
||||
switch (gen->type) {
|
||||
case GEN_OTHERNAME:
|
||||
if (!X509V3_add_value("othername", "<unsupported>", &ret))
|
||||
return NULL;
|
||||
switch (OBJ_obj2nid(gen->d.otherName->type_id)) {
|
||||
case NID_id_on_SmtpUTF8Mailbox:
|
||||
if (!X509V3_add_value_uchar("othername: SmtpUTF8Mailbox:", gen->d.otherName->value->value.utf8string->data, &ret))
|
||||
return NULL;
|
||||
break;
|
||||
case NID_XmppAddr:
|
||||
if (!X509V3_add_value_uchar("othername: XmppAddr:", gen->d.otherName->value->value.utf8string->data, &ret))
|
||||
return NULL;
|
||||
break;
|
||||
case NID_SRVName:
|
||||
if (!X509V3_add_value_uchar("othername: SRVName:", gen->d.otherName->value->value.ia5string->data, &ret))
|
||||
return NULL;
|
||||
break;
|
||||
case NID_ms_upn:
|
||||
if (!X509V3_add_value_uchar("othername: UPN:", gen->d.otherName->value->value.utf8string->data, &ret))
|
||||
return NULL;
|
||||
break;
|
||||
default:
|
||||
if (!X509V3_add_value("othername", "<unsupported>", &ret))
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case GEN_X400:
|
||||
@@ -144,7 +164,23 @@ int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen)
|
||||
int i;
|
||||
switch (gen->type) {
|
||||
case GEN_OTHERNAME:
|
||||
BIO_printf(out, "othername:<unsupported>");
|
||||
switch (OBJ_obj2nid(gen->d.otherName->type_id)) {
|
||||
case NID_id_on_SmtpUTF8Mailbox:
|
||||
BIO_printf(out, "othername:SmtpUTF8Mailbox:%s", gen->d.otherName->value->value.utf8string->data);
|
||||
break;
|
||||
case NID_XmppAddr:
|
||||
BIO_printf(out, "othername:XmppAddr:%s", gen->d.otherName->value->value.utf8string->data);
|
||||
break;
|
||||
case NID_SRVName:
|
||||
BIO_printf(out, "othername:SRVName:%s", gen->d.otherName->value->value.ia5string->data);
|
||||
break;
|
||||
case NID_ms_upn:
|
||||
BIO_printf(out, "othername:UPN:%s", gen->d.otherName->value->value.utf8string->data);
|
||||
break;
|
||||
default:
|
||||
BIO_printf(out, "othername:<unsupported>");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case GEN_X400:
|
||||
|
||||
Reference in New Issue
Block a user