Enforce and explicit some const casting
authorFdaSilvaYY <fdasilvayy@gmail.com>
Thu, 7 Jul 2016 22:43:32 +0000 (00:43 +0200)
committerRich Salz <rsalz@openssl.org>
Mon, 25 Jul 2016 12:20:00 +0000 (08:20 -0400)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1300)

crypto/asn1/tasn_prn.c
crypto/x509v3/v3_prn.c
ssl/ssl_txt.c
ssl/t1_trce.c

index 096c8415df0eabc88a591af94e0936e40f7aa32a..c79ecb587af9f7bce7ff9fe470c9e821643a56e4 100644 (file)
@@ -423,7 +423,7 @@ static int asn1_print_obstring(BIO *out, ASN1_STRING *str, int indent)
     } else if (BIO_puts(out, "\n") <= 0)
         return 0;
     if ((str->length > 0)
-        && BIO_dump_indent(out, (char *)str->data, str->length,
+        && BIO_dump_indent(out, (const char *)str->data, str->length,
                            indent + 2) <= 0)
         return 0;
     return 1;
index 86666363a1062ec8f241ddee2a82c61386af5cb2..3048b67588e57e00656df88e54cb5b5455277f90 100644 (file)
@@ -188,7 +188,7 @@ static int unknown_ext_print(BIO *out, const unsigned char *ext, int extlen,
     case X509V3_EXT_PARSE_UNKNOWN:
         return ASN1_parse_dump(out, ext, extlen, indent, -1);
     case X509V3_EXT_DUMP_UNKNOWN:
-        return BIO_dump_indent(out, (char *)ext, extlen, indent);
+        return BIO_dump_indent(out, (const char *)ext, extlen, indent);
 
     default:
         return 1;
index df7c74b4f31a40b16df1480bb48f8925d1419539..2da3c0a86b2e1a3a09ac07370efa3d3b6840324d 100644 (file)
@@ -128,7 +128,7 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x)
     if (x->tlsext_tick) {
         if (BIO_puts(bp, "\n    TLS session ticket:\n") <= 0)
             goto err;
-        if (BIO_dump_indent(bp, (char *)x->tlsext_tick, x->tlsext_ticklen, 4)
+        if (BIO_dump_indent(bp, (const char *)x->tlsext_tick, x->tlsext_ticklen, 4)
             <= 0)
             goto err;
     }
index 562ac09e85fc315fe60fc845092d490c8e320d49..ab6cfa2d6c3e1ad7dc5800dd36662e62605280cb 100644 (file)
@@ -728,7 +728,7 @@ static int ssl_print_extension(BIO *bio, int indent, int server, int extype,
         break;
 
     default:
-        BIO_dump_indent(bio, (char *)ext, extlen, indent + 2);
+        BIO_dump_indent(bio, (const char *)ext, extlen, indent + 2);
     }
     return 1;
 }
@@ -1257,7 +1257,7 @@ static int ssl_print_handshake(BIO *bio, SSL *ssl,
     default:
         BIO_indent(bio, indent + 2, 80);
         BIO_puts(bio, "Unsupported, hex dump follows:\n");
-        BIO_dump_indent(bio, (char *)msg, msglen, indent + 4);
+        BIO_dump_indent(bio, (const char *)msg, msglen, indent + 4);
     }
     return 1;
 }