public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/globus-gsi-cert-utils] rawhide: Compile with OpenSSL 4
@ 2026-06-14 8:48 Mattias Ellert
0 siblings, 0 replies; only message in thread
From: Mattias Ellert @ 2026-06-14 8:48 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/globus-gsi-cert-utils
Branch : rawhide
Commit : 9942c3fa9e2d4f83e8336caa01f1d2adb2a9a992
Author : Mattias Ellert <mattias.ellert@physics.uu.se>
Date : 2026-06-14T10:39:13+02:00
Stats : +475/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/globus-gsi-cert-utils/c/9942c3fa9e2d4f83e8336caa01f1d2adb2a9a992?branch=rawhide
Log:
Compile with OpenSSL 4
---
diff --git a/0001-Untabify-and-remove-trailing-white-space.patch b/0001-Untabify-and-remove-trailing-white-space.patch
new file mode 100644
index 0000000..a0721d4
--- /dev/null
+++ b/0001-Untabify-and-remove-trailing-white-space.patch
@@ -0,0 +1,354 @@
+From 3ccdaa0236230bbcbcbf339e7dfdfaf23c10bd6f Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert@physics.uu.se>
+Date: Wed, 20 May 2026 00:15:37 +0200
+Subject: [PATCH 1/2] Untabify and remove trailing white-space
+
+---
+ .../source/library/globus_gsi_cert_utils.c | 88 +++++++++----------
+ .../source/library/globus_gsi_cert_utils.h | 6 +-
+ 2 files changed, 47 insertions(+), 47 deletions(-)
+
+diff --git a/gsi/cert_utils/source/library/globus_gsi_cert_utils.c b/gsi/cert_utils/source/library/globus_gsi_cert_utils.c
+index a898f54d8..dee79d24f 100644
+--- a/gsi/cert_utils/source/library/globus_gsi_cert_utils.c
++++ b/gsi/cert_utils/source/library/globus_gsi_cert_utils.c
+@@ -73,7 +73,7 @@ globus_l_gsi_cert_utils_activate(void)
+ if(tmp_string != GLOBUS_NULL)
+ {
+ globus_i_gsi_cert_utils_debug_level = atoi(tmp_string);
+-
++
+ if(globus_i_gsi_cert_utils_debug_level < 0)
+ {
+ globus_i_gsi_cert_utils_debug_level = 0;
+@@ -103,7 +103,7 @@ globus_l_gsi_cert_utils_activate(void)
+ {
+ goto activate_openssl_fail;
+ }
+-
++
+ result = globus_module_activate(GLOBUS_GSI_OPENSSL_ERROR_MODULE);
+ if (result != GLOBUS_SUCCESS)
+ {
+@@ -220,7 +220,7 @@ globus_gsi_cert_utils_make_time(
+ * values returned, see globus_gsi_cert_utils_cert_type_t.
+ *
+ * @param cert
+- * The X509 certificate
++ * The X509 certificate
+ * @param type
+ * The returned X509 certificate type
+ *
+@@ -248,13 +248,13 @@ globus_gsi_cert_utils_get_cert_type(
+ BASIC_CONSTRAINTS * x509v3_bc = NULL;
+ static char * _function_name_ =
+ "globus_gsi_cert_utils_get_cert_type";
+-
++
+ GLOBUS_I_GSI_CERT_UTILS_DEBUG_ENTER;
+
+ /* assume it is a EEC if nothing else matches */
+-
++
+ *type = GLOBUS_GSI_CERT_UTILS_TYPE_EEC;
+-
++
+ if((x509v3_bc = X509_get_ext_d2i(cert,
+ NID_basic_constraints,
+ &critical,
+@@ -263,9 +263,9 @@ globus_gsi_cert_utils_get_cert_type(
+ *type = GLOBUS_GSI_CERT_UTILS_TYPE_CA;
+ goto exit;
+ }
+-
++
+ subject = X509_get_subject_name(cert);
+-
++
+ if((ne = X509_NAME_get_entry(subject, X509_NAME_entry_count(subject)-1))
+ == NULL)
+ {
+@@ -303,7 +303,7 @@ globus_gsi_cert_utils_get_cert_type(
+ "extension to internal form")));
+ goto exit;
+ }
+-
++
+ if((policy = pci->proxyPolicy) == NULL)
+ {
+ GLOBUS_GSI_CERT_UTILS_OPENSSL_ERROR_RESULT(
+@@ -324,7 +324,7 @@ globus_gsi_cert_utils_get_cert_type(
+ }
+
+ policy_nid = OBJ_obj2nid(policy_lang);
+-
++
+ if (policy_nid == NID_id_ppl_inheritAll)
+ {
+ *type = GLOBUS_GSI_CERT_UTILS_TYPE_RFC_IMPERSONATION_PROXY;
+@@ -341,11 +341,11 @@ globus_gsi_cert_utils_get_cert_type(
+ {
+ *type = GLOBUS_GSI_CERT_UTILS_TYPE_RFC_RESTRICTED_PROXY;
+ }
+-
++
+ if(X509_get_ext_by_NID(cert,
+ NID_proxyCertInfo,
+ index) != -1)
+- {
++ {
+ GLOBUS_GSI_CERT_UTILS_OPENSSL_ERROR_RESULT(
+ result,
+ GLOBUS_GSI_CERT_UTILS_ERROR_NON_COMPLIANT_PROXY,
+@@ -368,7 +368,7 @@ globus_gsi_cert_utils_get_cert_type(
+ "extension to internal form")));
+ goto exit;
+ }
+-
++
+ if((policy = pci->proxyPolicy) == NULL)
+ {
+ GLOBUS_GSI_CERT_UTILS_OPENSSL_ERROR_RESULT(
+@@ -389,7 +389,7 @@ globus_gsi_cert_utils_get_cert_type(
+ }
+
+ policy_nid = OBJ_obj2nid(policy_lang);
+-
++
+ if (policy_nid == NID_id_ppl_inheritAll)
+ {
+ *type = GLOBUS_GSI_CERT_UTILS_TYPE_GSI_3_IMPERSONATION_PROXY;
+@@ -406,11 +406,11 @@ globus_gsi_cert_utils_get_cert_type(
+ {
+ *type = GLOBUS_GSI_CERT_UTILS_TYPE_GSI_3_RESTRICTED_PROXY;
+ }
+-
++
+ if(X509_get_ext_by_NID(cert,
+ OBJ_txt2nid(PROXYCERTINFO_OLD_OID),
+ index) != -1)
+- {
++ {
+ GLOBUS_GSI_CERT_UTILS_OPENSSL_ERROR_RESULT(
+ result,
+ GLOBUS_GSI_CERT_UTILS_ERROR_NON_COMPLIANT_PROXY,
+@@ -427,7 +427,7 @@ globus_gsi_cert_utils_get_cert_type(
+ */
+
+ GLOBUS_I_GSI_CERT_UTILS_DEBUG_FPRINTF(
+- 2, (globus_i_gsi_cert_utils_debug_fstream,
++ 2, (globus_i_gsi_cert_utils_debug_fstream,
+ "Subject is %s\n", data->data));
+
+ if((name = X509_NAME_dup(
+@@ -439,7 +439,7 @@ globus_gsi_cert_utils_get_cert_type(
+ (_CUSL("Error copying X509_NAME struct")));
+ goto exit;
+ }
+-
++
+ if((new_ne = X509_NAME_ENTRY_create_by_NID(NULL, NID_commonName,
+ data->type,
+ data->data, -1)) == NULL)
+@@ -450,7 +450,7 @@ globus_gsi_cert_utils_get_cert_type(
+ (_CUSL("Error creating X509 name entry of: %s"), data->data));
+ goto exit;
+ }
+-
++
+ if(!X509_NAME_add_entry(name, new_ne, X509_NAME_entry_count(name),0))
+ {
+ X509_NAME_ENTRY_free(new_ne);
+@@ -462,13 +462,13 @@ globus_gsi_cert_utils_get_cert_type(
+ data->data));
+ goto exit;
+ }
+-
++
+ if(new_ne)
+ {
+ X509_NAME_ENTRY_free(new_ne);
+ new_ne = NULL;
+ }
+-
++
+ if (X509_NAME_cmp(name,subject))
+ {
+ /*
+@@ -535,7 +535,7 @@ globus_gsi_cert_utils_get_cert_type(
+ * The resulting X509_NAME object
+ *
+ * @return
+- * GLOBUS_SUCCESS unless an error occurred, in which case,
++ * GLOBUS_SUCCESS unless an error occurred, in which case,
+ * a globus error object ID is returned
+ */
+ globus_result_t
+@@ -573,7 +573,7 @@ globus_gsi_cert_utils_get_x509_name(
+ if (*index == '/')
+ {
+ /* skip first / */
+- name_entry_str = index + 1;
++ name_entry_str = index + 1;
+ while ((index != NULL) && (*index != '\0'))
+ {
+ /* point at name = */
+@@ -588,35 +588,35 @@ globus_gsi_cert_utils_get_x509_name(
+ goto exit;
+ }
+ /* terminate name string */
+- *index = '\0';
++ *index = '\0';
+
+ name_value_str = index + 1;
+
+ /* find next =, then last / */
+- index = strchr(name_value_str, '=');
++ index = strchr(name_value_str, '=');
+ if (index != NULL)
+ {
+ /* for now set = to \0 */
+- *index = '\0';
+-
++ *index = '\0';
++
+ /* find last / in value */
+- index2 = strrchr(name_value_str, '/');
++ index2 = strrchr(name_value_str, '/');
+
+ /* reset = */
+- *index = '=';
++ *index = '=';
+
+ if (index2 != NULL)
+ {
+ /* terminate value string */
+- *index2 = '\0';
++ *index2 = '\0';
+ }
+ }
+
+ nid = OBJ_txt2nid(name_entry_str);
+-
++
+ if (nid == NID_undef)
+ {
+- /*
++ /*
+ * not found, lets try upper case instead
+ */
+ uc_index = name_entry_str;
+@@ -641,7 +641,7 @@ globus_gsi_cert_utils_get_x509_name(
+ x509_name_entry = X509_NAME_ENTRY_create_by_NID(
+ &x509_name_entry,
+ nid,
+- V_ASN1_APP_CHOOSE,
++ V_ASN1_APP_CHOOSE,
+ (unsigned char *) name_value_str,
+ -1);
+
+@@ -654,8 +654,8 @@ globus_gsi_cert_utils_get_x509_name(
+ name_entry_str, name_value_str));
+ goto exit;
+ }
+-
+- res = X509_NAME_add_entry(x509_name, x509_name_entry,
++
++ res = X509_NAME_add_entry(x509_name, x509_name_entry,
+ X509_NAME_entry_count(x509_name), 0);
+ if (!res)
+ {
+@@ -665,7 +665,7 @@ globus_gsi_cert_utils_get_x509_name(
+ (_CUSL("Couldn't add name entry to X509_NAME object")));
+ goto exit;
+ }
+-
++
+ X509_NAME_ENTRY_free(x509_name_entry);
+ x509_name_entry = NULL;
+
+@@ -763,9 +763,9 @@ globus_gsi_cert_utils_get_base_name(
+ break;
+ }
+ }
+-
+- /*
+- * drop all the proxy related /CN=* entries
++
++ /*
++ * drop all the proxy related /CN=* entries
+ */
+ for(i=0;i<depth;i++)
+ {
+@@ -827,7 +827,7 @@ globus_gsi_cert_utils_get_eec(
+ break;
+ }
+ }
+-
++
+
+ exit:
+ GLOBUS_I_GSI_CERT_UTILS_DEBUG_EXIT;
+@@ -882,7 +882,7 @@ globus_gsi_cert_utils_get_identity_cert(
+ break;
+ }
+ }
+-
++
+
+ exit:
+ GLOBUS_I_GSI_CERT_UTILS_DEBUG_EXIT;
+@@ -986,7 +986,7 @@ globus_i_gsi_cert_utils_dn_cmp(
+ {
+ return -1;
+ }
+-
++
+ tmp_dn2 = globus_l_gsi_cert_utils_normalize_dn(dn2);
+
+ if(tmp_dn2 == NULL)
+@@ -994,12 +994,12 @@ globus_i_gsi_cert_utils_dn_cmp(
+ free(tmp_dn1);
+ return -1;
+ }
+-
++
+ result = strcasecmp(tmp_dn1, tmp_dn2);
+
+ free(tmp_dn1);
+ free(tmp_dn2);
+-
++
+ return result;
+ }
+ }
+diff --git a/gsi/cert_utils/source/library/globus_gsi_cert_utils.h b/gsi/cert_utils/source/library/globus_gsi_cert_utils.h
+index 28788c746..c6eb9732f 100644
+--- a/gsi/cert_utils/source/library/globus_gsi_cert_utils.h
++++ b/gsi/cert_utils/source/library/globus_gsi_cert_utils.h
+@@ -77,7 +77,7 @@ extern "C" {
+ @endcode
+ *
+ * This function should be called once for each time Globus GSI Cert Utils
+- * was activated.
++ * was activated.
+ *
+ */
+
+@@ -88,11 +88,11 @@ extern "C" {
+ */
+ #define GLOBUS_GSI_CERT_UTILS_MODULE (&globus_i_gsi_cert_utils_module)
+
+-extern
++extern
+ globus_module_descriptor_t globus_i_gsi_cert_utils_module;
+
+ #define _CUSL(s) globus_common_i18n_get_string(GLOBUS_GSI_CERT_UTILS_MODULE,\
+- s)
++ s)
+
+ #ifndef DOXYGEN
+
+--
+2.54.0
+
diff --git a/0002-Build-with-OpenSSL-4.patch b/0002-Build-with-OpenSSL-4.patch
new file mode 100644
index 0000000..8fac0f0
--- /dev/null
+++ b/0002-Build-with-OpenSSL-4.patch
@@ -0,0 +1,113 @@
+From 24375b8503d2a4373600b14d03700b697415737b Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert@physics.uu.se>
+Date: Wed, 20 May 2026 00:15:37 +0200
+Subject: [PATCH 2/2] Build with OpenSSL 4
+
+---
+ .../source/library/globus_gsi_cert_utils.c | 32 +++++++++++++------
+ .../source/library/globus_gsi_cert_utils.h | 4 +++
+ 2 files changed, 26 insertions(+), 10 deletions(-)
+
+diff --git a/gsi/cert_utils/source/library/globus_gsi_cert_utils.c b/gsi/cert_utils/source/library/globus_gsi_cert_utils.c
+index dee79d24f..602ba1bf4 100644
+--- a/gsi/cert_utils/source/library/globus_gsi_cert_utils.c
++++ b/gsi/cert_utils/source/library/globus_gsi_cert_utils.c
+@@ -229,15 +229,23 @@ globus_gsi_cert_utils_make_time(
+ */
+ globus_result_t
+ globus_gsi_cert_utils_get_cert_type(
++#if OPENSSL_VERSION_NUMBER < 0x40000000L
+ X509 * cert,
++#else
++ const X509 * cert,
++#endif
+ globus_gsi_cert_utils_cert_type_t * type)
+ {
+- X509_NAME * subject = NULL;
++ const X509_NAME * subject = NULL;
+ X509_NAME * name = NULL;
+- X509_NAME_ENTRY * ne = NULL;
++ const X509_NAME_ENTRY * ne = NULL;
+ X509_NAME_ENTRY * new_ne = NULL;
++#if OPENSSL_VERSION_NUMBER < 0x40000000L
+ X509_EXTENSION * pci_ext = NULL;
+- ASN1_STRING * data = NULL;
++#else
++ const X509_EXTENSION * pci_ext = NULL;
++#endif
++ const ASN1_STRING * data = NULL;
+ PROXY_CERT_INFO_EXTENSION * pci = NULL;
+ PROXY_POLICY * policy = NULL;
+ ASN1_OBJECT * policy_lang = NULL;
+@@ -280,11 +288,13 @@ globus_gsi_cert_utils_get_cert_type(
+ {
+ /* the name entry is of the type: common name */
+ data = X509_NAME_ENTRY_get_data(ne);
+- if(data->length == 5 && !memcmp(data->data,"proxy",5))
++ if(ASN1_STRING_length(data) == 5 &&
++ !memcmp(ASN1_STRING_get0_data(data), "proxy", 5))
+ {
+ *type = GLOBUS_GSI_CERT_UTILS_TYPE_GSI_2_PROXY;
+ }
+- else if(data->length == 13 && !memcmp(data->data,"limited proxy",13))
++ else if(ASN1_STRING_length(data) == 13 &&
++ !memcmp(ASN1_STRING_get0_data(data), "limited proxy", 13))
+ {
+ *type = GLOBUS_GSI_CERT_UTILS_TYPE_GSI_2_LIMITED_PROXY;
+ }
+@@ -428,7 +438,7 @@ globus_gsi_cert_utils_get_cert_type(
+
+ GLOBUS_I_GSI_CERT_UTILS_DEBUG_FPRINTF(
+ 2, (globus_i_gsi_cert_utils_debug_fstream,
+- "Subject is %s\n", data->data));
++ "Subject is %s\n", ASN1_STRING_get0_data(data)));
+
+ if((name = X509_NAME_dup(
+ X509_get_issuer_name(cert))) == NULL)
+@@ -441,13 +451,15 @@ globus_gsi_cert_utils_get_cert_type(
+ }
+
+ if((new_ne = X509_NAME_ENTRY_create_by_NID(NULL, NID_commonName,
+- data->type,
+- data->data, -1)) == NULL)
++ ASN1_STRING_type(data),
++ ASN1_STRING_get0_data(data),
++ -1)) == NULL)
+ {
+ GLOBUS_GSI_CERT_UTILS_OPENSSL_ERROR_RESULT(
+ result,
+ GLOBUS_GSI_CERT_UTILS_ERROR_GETTING_CN_ENTRY,
+- (_CUSL("Error creating X509 name entry of: %s"), data->data));
++ (_CUSL("Error creating X509 name entry of: %s"),
++ ASN1_STRING_get0_data(data)));
+ goto exit;
+ }
+
+@@ -459,7 +471,7 @@ globus_gsi_cert_utils_get_cert_type(
+ result,
+ GLOBUS_GSI_CERT_UTILS_ERROR_ADDING_CN_TO_SUBJECT,
+ (_CUSL("Error adding name entry with value: %s, to subject"),
+- data->data));
++ ASN1_STRING_get0_data(data)));
+ goto exit;
+ }
+
+diff --git a/gsi/cert_utils/source/library/globus_gsi_cert_utils.h b/gsi/cert_utils/source/library/globus_gsi_cert_utils.h
+index c6eb9732f..cdadf0b09 100644
+--- a/gsi/cert_utils/source/library/globus_gsi_cert_utils.h
++++ b/gsi/cert_utils/source/library/globus_gsi_cert_utils.h
+@@ -150,7 +150,11 @@ globus_gsi_cert_utils_get_identity_cert(
+
+ globus_result_t
+ globus_gsi_cert_utils_get_cert_type(
++#if OPENSSL_VERSION_NUMBER < 0x40000000L
+ X509 * cert,
++#else
++ const X509 * cert,
++#endif
+ globus_gsi_cert_utils_cert_type_t * type);
+
+ globus_result_t
+--
+2.54.0
+
diff --git a/globus-gsi-cert-utils.spec b/globus-gsi-cert-utils.spec
index da1b5be..238af66 100644
--- a/globus-gsi-cert-utils.spec
+++ b/globus-gsi-cert-utils.spec
@@ -1,13 +1,15 @@
Name: globus-gsi-cert-utils
%global _name %(tr - _ <<< %{name})
Version: 10.11
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Grid Community Toolkit - Globus GSI Cert Utils Library
License: Apache-2.0
URL: https://github.com/gridcf/gct/
Source: https://repo.gridcf.org/gct6/sources/%{_name}-%{version}.tar.gz
Source8: README
+Patch0: 0001-Untabify-and-remove-trailing-white-space.patch
+Patch1: 0002-Build-with-OpenSSL-4.patch
BuildRequires: make
BuildRequires: gcc
@@ -74,6 +76,8 @@ Globus GSI Cert Utils Library Documentation Files
%prep
%setup -q -n %{_name}-%{version}
+%patch -P0 -p4
+%patch -P1 -p4
%build
# Reduce overlinking
@@ -139,6 +143,9 @@ rm %{buildroot}%{_pkgdocdir}/GLOBUS_LICENSE
%license GLOBUS_LICENSE
%changelog
+* Sun Jun 14 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 10.11-6
+- Compile with OpenSSL 4
+
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 10.11-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-14 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-14 8:48 [rpms/globus-gsi-cert-utils] rawhide: Compile with OpenSSL 4 Mattias Ellert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox