ipa/0016-Handle-IPACertificate-types-in-xmlrpc.patch
Florence Blanc-Renaud f8b144f61d ipa-4.13.1-2
- RHEL-147191 ipa uninstallation is failing with message "'NoneType' object has no attribute 'lower'"
- RHEL-146185 Names of domains from a trusted forest should be compared case-insentive
- RHEL-146184 ipa-advise client script requires keytab (should just require root access on client system)
- RHEL-145854 Include latest fixes in python3-ipatests package
- RHEL-143684 When using xmlrpc, ipa server failed with assert type(value) in (unicode, float, int, bool, type(None))
- RHEL-141500 ipa use systemd-sysusers

Note that there is a slight modification of the patch for systemd-sysusers.
Instead of definining kdcproxy and ipaapi with u! the patch uses u
(because u! requires systemd version 257).

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
2026-02-09 19:20:45 +01:00

44 lines
1.6 KiB
Diff

From 8deb4be0962b25dfd43e1245307a8bb9d58cfc48 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcritten@redhat.com>
Date: Tue, 3 Feb 2026 09:46:25 -0500
Subject: [PATCH] Handle IPACertificate types in xmlrpc
The wrapping code didn't understand the IPACertificate class
so retrieving any entry that contained one would fail.
Treat it the same was as its parent class cryptography.Certificate.
Fixes: https://pagure.io/freeipa/issue/9935
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: David Hanina <dhanina@redhat.com>
---
ipalib/rpc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ipalib/rpc.py b/ipalib/rpc.py
index ed35afc965308e03269f05e01400660b207b548d..9773626eb054dd404256267c5fffbba1aa0579dd 100644
--- a/ipalib/rpc.py
+++ b/ipalib/rpc.py
@@ -56,7 +56,7 @@ from ipalib.errors import (errors_by_code, UnknownError, NetworkError,
XMLRPCMarshallError, JSONError)
from ipalib import errors, capabilities
from ipalib.request import context, Connection
-from ipalib.x509 import Encoding as x509_Encoding
+from ipalib.x509 import Encoding as x509_Encoding, IPACertificate
from ipapython import ipautil
from ipapython import session_storage
from ipapython.cookie import Cookie
@@ -220,7 +220,7 @@ def xml_wrap(value, version):
if isinstance(value, Principal):
return unicode(value)
- if isinstance(value, crypto_x509.Certificate):
+ if isinstance(value, (crypto_x509.Certificate, IPACertificate)):
return base64.b64encode(
value.public_bytes(x509_Encoding.DER)).decode('ascii')
--
2.52.0