Blame SOURCES/0101-ureport-use-entit-certs-with-rhsm-and-drop-rhsm-enti.patch

0c9110
From b3ae09a48cf7cb21e3562509717381e4c4133454 Mon Sep 17 00:00:00 2001
0c9110
From: Jakub Filak <jfilak@redhat.com>
0c9110
Date: Wed, 22 Oct 2014 08:12:44 +0200
0c9110
Subject: [LIBREPORT PATCH 101/105] ureport: use entit certs with 'rhsm' and
0c9110
 drop 'rhsm-entitlement'
0c9110
0c9110
/etc/pki/consumer certificates cannot be used for authentication in
0c9110
Strata. Martin Milata has correctly pointed out that it does not make
0c9110
sense to have both 'rhsm' and 'rhsm-entitlement' options.
0c9110
0c9110
Related #1140224
0c9110
0c9110
Signed-off-by: Jakub Filak <jfilak@redhat.com>
0c9110
---
0c9110
 doc/reporter-ureport.txt |  6 ++----
0c9110
 src/lib/ureport.c        | 11 -----------
0c9110
 src/plugins/ureport.conf |  4 +---
0c9110
 3 files changed, 3 insertions(+), 18 deletions(-)
0c9110
0c9110
diff --git a/doc/reporter-ureport.txt b/doc/reporter-ureport.txt
0c9110
index 807f1e1..1a67441 100644
0c9110
--- a/doc/reporter-ureport.txt
0c9110
+++ b/doc/reporter-ureport.txt
0c9110
@@ -35,10 +35,8 @@ Configuration file lines should have 'PARAM = VALUE' format. The parameters are:
0c9110
    Possible values are:
0c9110
 
0c9110
    'rhsm';;
0c9110
-      Uses the system certificate that is used for Red Hat subscription management.
0c9110
-
0c9110
-   'rhsm-entitlement';;
0c9110
-      Same as 'rhsm' but uses the V3 RHSM entitlement certificates.
0c9110
+      Uses the system V3 entitlement certificate that is used for Red Hat
0c9110
+      subscription management.
0c9110
 
0c9110
    'puppet';;
0c9110
       Uses the certificate that is used by the Puppet configuration management tool.
0c9110
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
0c9110
index 99e84ef..5782b4e 100644
0c9110
--- a/src/lib/ureport.c
0c9110
+++ b/src/lib/ureport.c
0c9110
@@ -32,9 +32,6 @@
0c9110
 
0c9110
 #define RHSM_WEB_SERVICE_URL "https://api.access.redhat.com/rs/telemetry/abrt"
0c9110
 
0c9110
-#define RHSM_CERT_PATH "/etc/pki/consumer/cert.pem"
0c9110
-#define RHSM_KEY_PATH "/etc/pki/consumer/key.pem"
0c9110
-
0c9110
 #define RHSMENT_PEM_DIR_PATH "/etc/pki/entitlement"
0c9110
 #define RHSMENT_ENT_DATA_BEGIN_TAG "-----BEGIN ENTITLEMENT DATA-----"
0c9110
 #define RHSMENT_ENT_DATA_END_TAG "-----END ENTITLEMENT DATA-----"
0c9110
@@ -94,14 +91,6 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
0c9110
         if (config->ur_url == NULL)
0c9110
             ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
0c9110
 
0c9110
-        config->ur_client_cert = xstrdup(RHSM_CERT_PATH);
0c9110
-        config->ur_client_key = xstrdup(RHSM_KEY_PATH);
0c9110
-    }
0c9110
-    else if (strcmp(client_auth, "rhsm-entitlement") == 0)
0c9110
-    {
0c9110
-        if (config->ur_url == NULL)
0c9110
-            ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
0c9110
-
0c9110
         GList *certs = get_file_list(RHSMENT_PEM_DIR_PATH, "pem");
0c9110
         if (g_list_length(certs) < 2)
0c9110
         {
0c9110
diff --git a/src/plugins/ureport.conf b/src/plugins/ureport.conf
0c9110
index e7bd66b..9e0415f 100644
0c9110
--- a/src/plugins/ureport.conf
0c9110
+++ b/src/plugins/ureport.conf
0c9110
@@ -22,10 +22,8 @@ AuthDataItems = hostname, machineid
0c9110
 # 'IncludeAuthData' to 'yes'.
0c9110
 # None (default):
0c9110
 # SSLClientAuth =
0c9110
-# Using RH subscription management certificate:
0c9110
-# SSLClientAuth = rhsm
0c9110
 # Using RH subscription management entitlement certificate:
0c9110
-# SSLClientAuth = rhsm-entitlement
0c9110
+# SSLClientAuth = rhsm
0c9110
 # Using Puppet certificate:
0c9110
 # SSLClientAuth = puppet
0c9110
 # Using custom certificate:
0c9110
-- 
0c9110
1.8.3.1
0c9110