summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2019-11-02 03:16:46 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2019-11-02 03:16:46 +0000
commitad7df6334f1d977c46a54e366d32bc5051871066 (patch)
treef5a8479e370911ebf01b1f5172088d8fb4c78afd
parent376565dd01e6195728e511338a4ed6909bd4db88 (diff)
switch ASN1_STRING_data() with constified ASN1_STRING_get0_data()
-rw-r--r--usr.sbin/smtpd/ssl_verify.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/ssl_verify.c b/usr.sbin/smtpd/ssl_verify.c
index ebc79870290..02148862f70 100644
--- a/usr.sbin/smtpd/ssl_verify.c
+++ b/usr.sbin/smtpd/ssl_verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_verify.c,v 1.1 2019/09/18 11:26:30 eric Exp $ */
+/* $OpenBSD: ssl_verify.c,v 1.2 2019/11/02 03:16:45 gilles Exp $ */
/*
* Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org>
*
@@ -142,12 +142,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)) {
@@ -187,11 +187,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,