summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_asn1.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2016-12-03 12:34:35 +0000
committerjsing <jsing@openbsd.org>2016-12-03 12:34:35 +0000
commitbc99fb9a541640cc76264c31e90a0409d164801e (patch)
treeba7452e2ddfaf3296054d612e7cd1551efe57268 /lib/libssl/ssl_asn1.c
parentAdd Copyright and license. (diff)
downloadwireguard-openbsd-bc99fb9a541640cc76264c31e90a0409d164801e.tar.xz
wireguard-openbsd-bc99fb9a541640cc76264c31e90a0409d164801e.zip
Avoid signed vs unsigned warnings from clang by adding two casts,
slightly rewriting some code and changing the type of an array. ok bcook@ doug@
Diffstat (limited to 'lib/libssl/ssl_asn1.c')
-rw-r--r--lib/libssl/ssl_asn1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_asn1.c b/lib/libssl/ssl_asn1.c
index 02124da5204..1b938868685 100644
--- a/lib/libssl/ssl_asn1.c
+++ b/lib/libssl/ssl_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_asn1.c,v 1.43 2016/11/05 19:59:01 miod Exp $ */
+/* $OpenBSD: ssl_asn1.c,v 1.44 2016/12/03 12:34:35 jsing Exp $ */
/*
* Copyright (c) 2016 Joel Sing <jsing@openbsd.org>
@@ -158,7 +158,7 @@ i2d_SSL_SESSION(SSL_SESSION *s, unsigned char **pp)
goto err;
if (!CBB_add_asn1(&hostname, &value, CBS_ASN1_OCTETSTRING))
goto err;
- if (!CBB_add_bytes(&value, s->tlsext_hostname,
+ if (!CBB_add_bytes(&value, (const uint8_t *)s->tlsext_hostname,
strlen(s->tlsext_hostname)))
goto err;
}