Fix contness of debug_print_buf()
diff --git a/library/debug.c b/library/debug.c
index bb497b8..ade98d4 100644
--- a/library/debug.c
+++ b/library/debug.c
@@ -120,7 +120,7 @@
void debug_print_buf( const ssl_context *ssl, int level,
const char *file, int line, const char *text,
- unsigned char *buf, size_t len )
+ const unsigned char *buf, size_t len )
{
char str[512];
char txt[17];
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index 09d5cf8..2b94af8 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -1118,7 +1118,7 @@
* opaque cookie<0..2^8-1>;
* } HelloVerifyRequest;
*/
- SSL_DEBUG_BUF( 3, "server version", (unsigned char *) p, 2 );
+ SSL_DEBUG_BUF( 3, "server version", p, 2 );
ssl_read_version( &major_ver, &minor_ver, ssl->transport, p );
p += 2;
@@ -1140,7 +1140,7 @@
}
cookie_len = *p++;
- SSL_DEBUG_BUF( 3, "cookie", (unsigned char *) p, cookie_len );
+ SSL_DEBUG_BUF( 3, "cookie", p, cookie_len );
polarssl_free( ssl->handshake->verify_cookie );
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
index 908c56d..ff2c44b 100644
--- a/library/ssl_srv.c
+++ b/library/ssl_srv.c
@@ -2342,7 +2342,7 @@
* version looks like the most interoperable thing to do. */
ssl_write_version( ssl->major_ver, ssl->minor_ver,
ssl->transport, p );
- SSL_DEBUG_BUF( 3, "server version", (unsigned char *) p, 2 );
+ SSL_DEBUG_BUF( 3, "server version", p, 2 );
p += 2;
/* If we get here, f_cookie_check is not null */