From 387bdcf9184c5c49aedb5482426ecb5a944bb6fe Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 21 Feb 2025 05:44:28 +0000 Subject: Remove unused name member from x509_st As far as I can tell this has never been used since the beginning of git history with SSLeay 0.8.1b, so we can simplify the x509_cb() a little. ok jsing miod --- src/lib/libcrypto/asn1/x_x509.c | 10 +--------- src/lib/libcrypto/x509/x509_local.h | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/lib/libcrypto/asn1/x_x509.c b/src/lib/libcrypto/asn1/x_x509.c index 15af015af1..069d84926f 100644 --- a/src/lib/libcrypto/asn1/x_x509.c +++ b/src/lib/libcrypto/asn1/x_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_x509.c,v 1.40 2025/02/20 20:30:12 tb Exp $ */ +/* $OpenBSD: x_x509.c,v 1.41 2025/02/21 05:44:28 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -182,7 +182,6 @@ x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) switch (operation) { case ASN1_OP_NEW_POST: - ret->name = NULL; ret->ex_flags = 0; ret->ex_pathlen = -1; ret->skid = NULL; @@ -196,11 +195,6 @@ x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data); break; - case ASN1_OP_D2I_POST: - free(ret->name); - ret->name = X509_NAME_oneline(ret->cert_info->subject, NULL, 0); - break; - case ASN1_OP_FREE_POST: CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data); X509_CERT_AUX_free(ret->aux); @@ -213,8 +207,6 @@ x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free); ASIdentifiers_free(ret->rfc3779_asid); #endif - free(ret->name); - ret->name = NULL; break; } diff --git a/src/lib/libcrypto/x509/x509_local.h b/src/lib/libcrypto/x509/x509_local.h index 47fc783db4..09092f7fdc 100644 --- a/src/lib/libcrypto/x509/x509_local.h +++ b/src/lib/libcrypto/x509/x509_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_local.h,v 1.35 2025/02/20 20:30:12 tb Exp $ */ +/* $OpenBSD: x509_local.h,v 1.36 2025/02/21 05:44:28 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2013. */ @@ -185,7 +185,6 @@ struct x509_st { X509_ALGOR *sig_alg; ASN1_BIT_STRING *signature; int references; - char *name; CRYPTO_EX_DATA ex_data; /* These contain copies of various extension values */ long ex_pathlen; -- cgit v1.2.3-55-g6feb