diff options
author | Rob Stradling <rob@comodo.com> | 2014-02-20 21:41:12 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-02-20 21:43:54 +0000 |
commit | c74ce24cd22e8c683ba0e5353c0762f8616e597d (patch) | |
tree | f4c7a3cd36a203984b6d1cfbc60b2a1fee5ba67a /crypto/bio | |
parent | 612566e752d31d437370b259488046370897132a (diff) |
Show the contents of the RFC6962 Signed Certificate Timestamp List Certificate/OCSP Extensions.
Add the RFC6962 OIDs to the objects table.
(backport from master branch)
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/b_dump.c | 22 | ||||
-rw-r--r-- | crypto/bio/bio.h | 3 |
2 files changed, 25 insertions, 0 deletions
diff --git a/crypto/bio/b_dump.c b/crypto/bio/b_dump.c index c80ecc4295..b3a5f7d031 100644 --- a/crypto/bio/b_dump.c +++ b/crypto/bio/b_dump.c @@ -185,3 +185,25 @@ int BIO_dump_indent(BIO *bp, const char *s, int len, int indent) return BIO_dump_indent_cb(write_bio, bp, s, len, indent); } +int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data, + int datalen) + { + int i, j = 0; + + if (datalen < 1) + return 1; + + for (i = 0; i < datalen - 1; i++) + { + if (i && !j) BIO_printf(out, "%*s", indent, ""); + + BIO_printf(out, "%02X:", data[i]); + + j = (j + 1) % width; + if (!j) BIO_printf(out, "\n"); + } + + if (i && !j) BIO_printf(out, "%*s", indent, ""); + BIO_printf(out, "%02X", data[datalen - 1]); + return 1; + } diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h index c14009ad0d..8489ff80bb 100644 --- a/crypto/bio/bio.h +++ b/crypto/bio/bio.h @@ -707,6 +707,9 @@ int BIO_dump_indent(BIO *b,const char *bytes,int len,int indent); int BIO_dump_fp(FILE *fp, const char *s, int len); int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent); #endif +int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data, + int datalen); + struct hostent *BIO_gethostbyname(const char *name); /* We might want a thread-safe interface too: * struct hostent *BIO_gethostbyname_r(const char *name, |