Created attachment 1622733 [details] Fix for missing LC_TIME environment Description of problem: When invoking katello-certs-check with LC_TIME set to anything else than "C" or "en_US", the comparison of dates will fail. Version-Release number of selected component (if applicable): # rpm -qf /usr/sbin/katello-certs-check foreman-installer-katello-3.10.0.8-1.el7sat.noarch How reproducible: Always Steps to Reproduce: 1. export LC_TIME to i.e. "de_DE.utf8" 2. invoke 'katello-certs-check' with valid certs and keys 3. Actual results: """ Checking server certificate encoding: [OK] date: ungültiges Datum „Okt 5 12:08:34 2019“ Checking expiration of certificate: /usr/sbin/katello-certs-check: Zeile 94: [: -gt: Einstelliger (unärer) Operator erwartet. [OK] Checking expiration of CA bundle: /usr/sbin/katello-certs-check: Zeile 100: [: -gt: Einstelliger (unärer) Operator erwartet. [OK] """ Expected results: """ Checking server certificate encoding: [OK] Checking expiration of certificate: [OK] Checking expiration of CA bundle: [OK] """ Additional info:
I attempted to test this myself and have not been able to reproduce it. Perhaps there are other factors involved with the system's configuration: Checking expiration of certificate: de_DE.utf8 [OK] Given this works for me against latest Satellite 6.8 I am going to opt to close current release. If you are able to reproduce on the latest release and can provide more details on if there is language differences involved with the generated certificates or how the locale is set on the system.