mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Enforce and explicit some const casting
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1300)
This commit is contained in:
parent
e83f154f6c
commit
d3d5dc607a
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user