diff options
author | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:56:39 +0000 |
---|---|---|
committer | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:56:39 +0000 |
commit | 58964a492275ca9a59a0cd9c8155cb2491b4b909 (patch) | |
tree | c7b16876a5789463bbbb468ef4829c8129b3d718 /crypto/x509/x509_obj.c | |
parent | d02b48c63a58ea4367a0e905979f140b7d090f86 (diff) | |
download | openssl-58964a492275ca9a59a0cd9c8155cb2491b4b909.tar.gz |
Import of old SSLeay release: SSLeay 0.9.0b
Diffstat (limited to 'crypto/x509/x509_obj.c')
-rw-r--r-- | crypto/x509/x509_obj.c | 11 |
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); |