aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2016-02-01 15:26:18 +0100
committerEmilia Kasper <emilia@openssl.org>2016-02-01 16:21:57 +0100
commitb69817449315f3818a8472468b3328ea755819db (patch)
treebb2abb48ce582d6d9b8fdc6e216ee0028deff817 /apps
parent0c787647ded59a81311d905024bc93df5d3a061c (diff)
downloadopenssl-b69817449315f3818a8472468b3328ea755819db.tar.gz
constify PACKET
PACKET contents should be read-only. To achieve this, also - constify two user callbacks - constify BUF_reverse. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/s_apps.h2
-rw-r--r--apps/s_cb.c4
-rw-r--r--apps/s_server.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/apps/s_apps.h b/apps/s_apps.h
index a065da493c..9339b41609 100644
--- a/apps/s_apps.h
+++ b/apps/s_apps.h
@@ -188,7 +188,7 @@ long bio_dump_callback(BIO *bio, int cmd, const char *argp,
void apps_ssl_info_callback(const SSL *s, int where, int ret);
void msg_cb(int write_p, int version, int content_type, const void *buf,
size_t len, SSL *ssl, void *arg);
-void tlsext_cb(SSL *s, int client_server, int type, unsigned char *data,
+void tlsext_cb(SSL *s, int client_server, int type, const unsigned char *data,
int len, void *arg);
#endif
diff --git a/apps/s_cb.c b/apps/s_cb.c
index 55d2c39e8b..5e36e7e2f8 100644
--- a/apps/s_cb.c
+++ b/apps/s_cb.c
@@ -722,14 +722,14 @@ static STRINT_PAIR tlsext_types[] = {
};
void tlsext_cb(SSL *s, int client_server, int type,
- unsigned char *data, int len, void *arg)
+ const unsigned char *data, int len, void *arg)
{
BIO *bio = arg;
const char *extname = lookup(type, tlsext_types, "unknown");
BIO_printf(bio, "TLS %s extension \"%s\" (id=%d), len=%d\n",
client_server ? "server" : "client", extname, type, len);
- BIO_dump(bio, (char *)data, len);
+ BIO_dump(bio, (const char *)data, len);
(void)BIO_flush(bio);
}
diff --git a/apps/s_server.c b/apps/s_server.c
index 9d9cb241be..6467060c0f 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -3216,7 +3216,7 @@ static int add_session(SSL *ssl, SSL_SESSION *session)
return 0;
}
-static SSL_SESSION *get_session(SSL *ssl, unsigned char *id, int idlen,
+static SSL_SESSION *get_session(SSL *ssl, const unsigned char *id, int idlen,
int *do_copy)
{
simple_ssl_session *sess;