#7496 csrgen fails if subject base contains lower-case attribute names
Closed: fixed 5 years ago Opened 6 years ago by ftweedal.

OpenSSL requires attribute short names ("CN", "O", etc) to be in
upper case, otherwise it fails to add the attribute. This can be
triggered when FreeIPA has been installed with --subject-base
containing a lower-case attribute shortname (e.g.
--subject-base="o=Red Hat").

For example:

ftweedal% ipa config-show |grep Subject
  Certificate Subject base: o=IPA.LOCAL 201804101556                                

ftweedal% ipa cert-request --principal alice --private-key ~
/dev/cert/req/key-rsa.pem --csr-profile-id userCert 
ipa: ERROR: error:0D06407A:lib(13):func(100):reason(122)                                                 
error:0B073043:lib(11):func(115):reason(67)         

There is also a py3 bytes/str bug that prevents the above error message appearing,
which will be dealt with in the course of fixing this issue.


Metadata Update from @ftweedal:
- Issue assigned to ftweedal

6 years ago

Metadata Update from @ftweedal:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/1813

6 years ago

master:

  • 53f87ee py3: fix csrgen error handling
  • 7633d62 csrgen: support initialising OpenSSL adaptor with key object
  • 0ac1d3e csrgen: drive-by docstring
  • 852618f csrgen: fix when attribute shortname is lower case

ipa-4-6:

  • 7b8837c py3: fix csrgen error handling
  • 76a7c15 csrgen: support initialising OpenSSL adaptor with key object
  • 9727ffd csrgen: drive-by docstring
  • ea5a3da csrgen: fix when attribute shortname is lower case

Metadata Update from @cheimes:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata