summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tls_verify.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tls_verify.c b/tls_verify.c
index acbe163..dbc37d8 100644
--- a/tls_verify.c
+++ b/tls_verify.c
@@ -126,12 +126,12 @@ tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name,
 			continue;
 
 		if (type == GEN_DNS) {
-			unsigned char	*data;
+			const unsigned char	*data;
 			int		 format, len;
 
 			format = ASN1_STRING_type(altname->d.dNSName);
 			if (format == V_ASN1_IA5STRING) {
-				data = ASN1_STRING_data(altname->d.dNSName);
+				data = ASN1_STRING_get0_data(altname->d.dNSName);
 				len = ASN1_STRING_length(altname->d.dNSName);
 
 				if (len < 0 || (size_t)len != strlen(data)) {
@@ -171,11 +171,11 @@ tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name,
 			}
 
 		} else if (type == GEN_IPADD) {
-			unsigned char	*data;
+			const unsigned char	*data;
 			int		 datalen;
 
 			datalen = ASN1_STRING_length(altname->d.iPAddress);
-			data = ASN1_STRING_data(altname->d.iPAddress);
+			data = ASN1_STRING_get0_data(altname->d.iPAddress);
 
 			if (datalen < 0) {
 				tls_set_errorx(ctx,
relative to backgroundJune McEnroe 2016-05-15Cache GPG key for half an hourJune McEnroe 2016-04-29Test for linux insteadJune McEnroe 2016-04-29Remove explicit syntax/filetype onJune McEnroe neovim 0.1.4 actually doesn't need them! 2016-04-12Remove gvim=mvim aliasJune McEnroe 2016-04-12Detect Darwin or *BSD for aliasesJune McEnroe 2016-04-07Use default pinentry and set GPG_TTYJune McEnroe 2016-04-07Add git config override includeJune McEnroe 2016-04-06Simplify install scriptJune McEnroe 2016-04-06Add gpg-agent to READMEJune McEnroe 2016-04-06Always sign git commitsJune McEnroe 2016-04-06Use standard socket for gpg-agentJune McEnroe 2016-04-06Set iTerm font to PointfreeJune McEnroe