aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_obj.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509/x509_obj.c')
-rw-r--r--crypto/x509/x509_obj.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/crypto/x509/x509_obj.c b/crypto/x509/x509_obj.c
index 2b53af1e61..c0576fd6f6 100644
--- a/crypto/x509/x509_obj.c
+++ b/crypto/x509/x509_obj.c
@@ -1,5 +1,5 @@
/* 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
@@ -76,6 +76,7 @@ int len;
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)
@@ -92,12 +93,10 @@ int len;
{
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);