/* crypto/x509/x509_obj.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
BUF_MEM *b=NULL;
static char hex[17]="0123456789ABCDEF";
int gs_doit[4];
+ char tmp_buf[80];
if (a == NULL) return("NO X509_NAME");
if (buf == NULL)
{
ne=(X509_NAME_ENTRY *)sk_value(a->entries,i);
n=OBJ_obj2nid(ne->object);
- if (n == NID_undef)
- s="UNKNOWN";
- else
+ if ((n == NID_undef) || ((s=OBJ_nid2sn(n)) == NULL))
{
- s=OBJ_nid2sn(n);
- if (s == NULL) s="UNKNOWN2";
+ i2t_ASN1_OBJECT(tmp_buf,sizeof(tmp_buf),ne->object);
+ s=tmp_buf;
}
l1=strlen(s);