From 275998f6bde90c253d935c2f2724538b64cbd618 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 1 Feb 2011 14:24:46 -0500 Subject: Add support for tracking and counting entitlements Adds a plugin, entitle, to register to the entitlement server, consume entitlements and to count and track them. It is also possible to import an entitlement certificate (if for example the remote entitlement server is unaviailable). This uses the candlepin server from https://fedorahosted.org/candlepin/wiki for entitlements. Add a cron job to validate the entitlement status and syslog the results. tickets 28, 79, 278 --- ipalib/plugins/service.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ipalib/plugins/service.py') diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py index 2a2c278d..bac58d30 100644 --- a/ipalib/plugins/service.py +++ b/ipalib/plugins/service.py @@ -177,6 +177,11 @@ def normalize_certificate(cert): if not cert: return cert + s = cert.find('-----BEGIN CERTIFICATE-----') + if s > -1: + e = cert.find('-----END CERTIFICATE-----') + cert = cert[s+27:e] + if util.isvalid_base64(cert): try: cert = base64.b64decode(cert) -- cgit