Use proper fix for the recent x400Address issue
authortb <tb@openbsd.org>
Tue, 25 Apr 2023 15:51:04 +0000 (15:51 +0000)
committertb <tb@openbsd.org>
Tue, 25 Apr 2023 15:51:04 +0000 (15:51 +0000)
From David Benjamin (BoringSSL)

ok beck

lib/libcrypto/x509/x509_genn.c
lib/libcrypto/x509/x509v3.h

index 0c03396..556ba81 100644 (file)
@@ -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:
index 722eb93..43c2a15 100644 (file)
@@ -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;