提交 d3d5dc60 编写于 作者: F FdaSilvaYY 提交者: Rich Salz

Enforce and explicit some const casting

Reviewed-by: NMatt Caswell <matt@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1300)
上级 e83f154f
...@@ -423,7 +423,7 @@ static int asn1_print_obstring(BIO *out, ASN1_STRING *str, int indent) ...@@ -423,7 +423,7 @@ static int asn1_print_obstring(BIO *out, ASN1_STRING *str, int indent)
} else if (BIO_puts(out, "\n") <= 0) } else if (BIO_puts(out, "\n") <= 0)
return 0; return 0;
if ((str->length > 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) indent + 2) <= 0)
return 0; return 0;
return 1; return 1;
......
...@@ -188,7 +188,7 @@ static int unknown_ext_print(BIO *out, const unsigned char *ext, int extlen, ...@@ -188,7 +188,7 @@ static int unknown_ext_print(BIO *out, const unsigned char *ext, int extlen,
case X509V3_EXT_PARSE_UNKNOWN: case X509V3_EXT_PARSE_UNKNOWN:
return ASN1_parse_dump(out, ext, extlen, indent, -1); return ASN1_parse_dump(out, ext, extlen, indent, -1);
case X509V3_EXT_DUMP_UNKNOWN: 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: default:
return 1; return 1;
......
...@@ -128,7 +128,7 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) ...@@ -128,7 +128,7 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x)
if (x->tlsext_tick) { if (x->tlsext_tick) {
if (BIO_puts(bp, "\n TLS session ticket:\n") <= 0) if (BIO_puts(bp, "\n TLS session ticket:\n") <= 0)
goto err; 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) <= 0)
goto err; goto err;
} }
......
...@@ -728,7 +728,7 @@ static int ssl_print_extension(BIO *bio, int indent, int server, int extype, ...@@ -728,7 +728,7 @@ static int ssl_print_extension(BIO *bio, int indent, int server, int extype,
break; break;
default: default:
BIO_dump_indent(bio, (char *)ext, extlen, indent + 2); BIO_dump_indent(bio, (const char *)ext, extlen, indent + 2);
} }
return 1; return 1;
} }
...@@ -1257,7 +1257,7 @@ static int ssl_print_handshake(BIO *bio, SSL *ssl, ...@@ -1257,7 +1257,7 @@ static int ssl_print_handshake(BIO *bio, SSL *ssl,
default: default:
BIO_indent(bio, indent + 2, 80); BIO_indent(bio, indent + 2, 80);
BIO_puts(bio, "Unsupported, hex dump follows:\n"); 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; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册