Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1599027 - ipa ca-show <ca> --certificate-out=/tmp/ca fails with python type error
Summary: ipa ca-show <ca> --certificate-out=/tmp/ca fails with python type error
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: 28
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: IPA Maintainers
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-07-08 02:15 UTC by Brian J. Atkisson
Modified: 2018-09-06 19:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Brian J. Atkisson 2018-07-08 02:15:17 UTC
Description of problem:



$ ipa ca-show vpn --certificate-out=/tmp/vpn
ipa: ERROR: non-public: TypeError: initializer for ctype 'char[]' must be a bytes or list or tuple, not str
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ipalib/", line 141, in execute
    return self.Command[_name](*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/", line 450, in __call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/", line 478, in __do_call
    ret =*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/", line 801, in run
    return self.forward(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipaclient/plugins/", line 42, in forward
  File "/usr/lib/python3.6/site-packages/ipalib/", line 406, in load_der_x509_certificate
    crypto_x509.load_der_x509_certificate(data, backend=default_backend())
  File "/usr/lib64/python3.6/site-packages/cryptography/x509/", line 47, in load_der_x509_certificate
    return backend.load_der_x509_certificate(data)
  File "/usr/lib64/python3.6/site-packages/cryptography/hazmat/backends/openssl/", line 1144, in load_der_x509_certificate
    mem_bio = self._bytes_to_bio(data)
  File "/usr/lib64/python3.6/site-packages/cryptography/hazmat/backends/openssl/", line 436, in _bytes_to_bio
    data_char_p ="char[]", data)
TypeError: initializer for ctype 'char[]' must be a bytes or list or tuple, not str
ipa: ERROR: an internal error has occurred

Comment 1 Florence Blanc-Renaud 2018-07-10 05:12:20 UTC
Upstream ticket:

Comment 2 Christian Heimes 2018-09-06 12:36:53 UTC
Fixed upstream

Comment 3 Armando Biagioni Neto 2018-09-06 19:25:07 UTC
Fixed upstream

Comment 4 Armando Biagioni Neto 2018-09-06 19:29:19 UTC
Fixed upstream

Note You need to log in before you can comment on or make changes to this bug.