diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-11-10 01:00:23 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-11-10 01:00:23 +0000 |
commit | 6757ef89b33231c83faea107c0e2e3ff857d1ca2 (patch) | |
tree | 845fcf06583c4628c28c7a00c99cb5e11717586c /crypto/objects | |
parent | bf6eea653644501e227c8c3df5252296c02ab0fb (diff) |
PR: 2091
Submitted by: Martin Kaiser <lists@kaiser.cx>, Stephen Henson
Approved by: steve@openssl.org
If an OID has no short name or long name return the numerical representation.
Diffstat (limited to 'crypto/objects')
-rw-r--r-- | crypto/objects/obj_dat.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index e999ef7831..8a342ba3eb 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -483,10 +483,13 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) s=OBJ_nid2ln(nid); if (s == NULL) s=OBJ_nid2sn(nid); - if (buf) - BUF_strlcpy(buf,s,buf_len); - n=strlen(s); - return n; + if (s) + { + if (buf) + BUF_strlcpy(buf,s,buf_len); + n=strlen(s); + return n; + } } |