From: tb Date: Tue, 25 Apr 2023 15:51:04 +0000 (+0000) Subject: Use proper fix for the recent x400Address issue X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7603ff28d26ce6e0f337afb4619946f766aa0781;p=openbsd Use proper fix for the recent x400Address issue From David Benjamin (BoringSSL) ok beck --- diff --git a/lib/libcrypto/x509/x509_genn.c b/lib/libcrypto/x509/x509_genn.c index 0c03396e0d2..556ba81c846 100644 --- a/lib/libcrypto/x509/x509_genn.c +++ b/lib/libcrypto/x509/x509_genn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_genn.c,v 1.5 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_genn.c,v 1.6 2023/04/25 15:51:04 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -383,8 +383,7 @@ GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) return -1; switch (a->type) { case GEN_X400: - result = ASN1_STRING_cmp((ASN1_STRING *)a->d.x400Address, - (ASN1_STRING *)b->d.x400Address); + result = ASN1_STRING_cmp(a->d.x400Address, b->d.x400Address); break; case GEN_EDIPARTY: diff --git a/lib/libcrypto/x509/x509v3.h b/lib/libcrypto/x509/x509v3.h index 722eb931e35..43c2a15e0f2 100644 --- a/lib/libcrypto/x509/x509v3.h +++ b/lib/libcrypto/x509/x509v3.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509v3.h,v 1.20 2023/04/24 22:30:17 tb Exp $ */ +/* $OpenBSD: x509v3.h,v 1.21 2023/04/25 15:51:04 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -190,7 +190,7 @@ typedef struct GENERAL_NAME_st { OTHERNAME *otherName; /* otherName */ ASN1_IA5STRING *rfc822Name; ASN1_IA5STRING *dNSName; - ASN1_TYPE *x400Address; + ASN1_STRING *x400Address; X509_NAME *directoryName; EDIPARTYNAME *ediPartyName; ASN1_IA5STRING *uniformResourceIdentifier; @@ -202,7 +202,6 @@ typedef struct GENERAL_NAME_st { X509_NAME *dirn; /* dirn */ ASN1_IA5STRING *ia5; /* rfc822Name, dNSName, uniformResourceIdentifier */ ASN1_OBJECT *rid; /* registeredID */ - ASN1_TYPE *other; /* x400Address */ } d; } GENERAL_NAME;