freeipa/ipaserver
Florence Blanc-Renaud a230153837 PKINIT: fix ipa-pkinit-manage enable|disable
The command ipa-pkinit-manage enable|disable is reporting
success even though the PKINIT cert is not re-issued.
The command triggers the request of a new certificate
(signed by IPA CA when state=enable, selfsigned when disabled),
but as the cert file is still present, certmonger does not create
a new request and the existing certificate is kept.

The fix consists in deleting the cert and key file before calling
certmonger to request a new cert.

There was also an issue in the is_pkinit_enabled() function:
if no tracking request was found for the PKINIT cert,
is_pkinit_enabled() was returning True while it should not.

Fixes https://pagure.io/freeipa/issue/7200

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2018-12-05 11:06:21 +01:00
..
advise Replace hard-coded interpreter with sys.executable 2018-10-24 17:44:20 +02:00
dnssec Py3: Remove subclassing from object 2018-09-27 11:49:04 +02:00
install PKINIT: fix ipa-pkinit-manage enable|disable 2018-12-05 11:06:21 +01:00
plugins Unify and simplify LDAP service discovery 2018-11-21 08:57:08 +01:00
secrets Py3: Replace six.moves imports 2018-10-05 12:06:19 +02:00
__init__.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
dcerpc_common.py Py3: Replace six.text_type with str 2018-09-27 16:11:18 +02:00
dcerpc.py pylint 2.2: Fix unnecessary pass statement 2018-11-26 16:54:43 +01:00
dns_data_management.py Py3: Remove subclassing from object 2018-09-27 11:49:04 +02:00
Makefile.am Build: Makefiles for Python packages 2016-11-09 13:08:32 +01:00
masters.py Unify and simplify LDAP service discovery 2018-11-21 08:57:08 +01:00
p11helper.py pylint 2.2: Fix unnecessary pass statement 2018-11-26 16:54:43 +01:00
rpcserver.py Py3: Replace six.moves imports 2018-10-05 12:06:19 +02:00
servroles.py pylint 2.2: Fix unnecessary pass statement 2018-11-26 16:54:43 +01:00
setup.cfg Port all setup.py to setuptools 2016-10-20 18:43:37 +02:00
setup.py Cleanup shebang and executable bit 2018-07-05 19:46:42 +02:00
topology.py Py3: Remove subclassing from object 2018-09-27 11:49:04 +02:00