#50776 Issue 50774 - Account.enroll_certificate() should not check for DS version
Closed 3 years ago by spichugi. Opened 4 years ago by vashirov.
vashirov/389-ds-base ds50774  into  master

@@ -259,8 +259,6 @@ 

          :param der_path: the certificate file in DER format to include.

          :type der_path: str

          """

-         if ds_is_older('1.4.0'):

-             raise Exception("This version of DS does not support nsAccount")

          # Given a cert path, add this to the object as a userCertificate

          crt = None

          with open(der_path, 'rb') as f:

Bug Description:

Account.enroll_certificate() assumes that userCertificate can be added
only to nsAccount and does a check for DS version where this objectClass
was introduced.
But userCertificate is a valid attribute for inetOrgPerson objectClass
too. And enroll_certificate() can be used with this objectClass.

Fix Description:

Instead of relying on a DS version we should trust the server to add or
reject an invalid attribute.

Fixes: https://pagure.io/389-ds-base/issue/50774

Reviewed by: ???

rebased onto 71cf23c

4 years ago

Pull-Request has been merged by vashirov

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3831

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata