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
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: IPA Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
Last Closed:


Attachments (Terms of Use)

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

freeipa-client-common-4.6.90.pre2-3.fc28.noarch
freeipa-common-4.6.90.pre2-3.fc28.noarch
freeipa-client-4.6.90.pre2-3.fc28.x86_64

310225
073189


$ 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/backend.py", line 141, in execute
    return self.Command[_name](*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 450, in __call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 478, in __do_call
    ret = self.run(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 801, in run
    return self.forward(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipaclient/plugins/ca.py", line 42, in forward
    result['result']['certificate'])
  File "/usr/lib/python3.6/site-packages/ipalib/x509.py", 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/base.py", 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/backend.py", 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/backend.py", line 436, in _bytes_to_bio
    data_char_p = self._ffi.new("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:
https://pagure.io/freeipa/issue/7628

Comment 2 Christian Heimes 2018-09-06 12:36:53 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/c7064494e5801d5fd4670e6aab1e07c65d7a0731

Comment 3 Armando Biagioni Neto 2018-09-06 19:25:07 UTC
Fixed upstream
ipa-4-7:
https://pagure.io/freeipa/c/ef865651f12165fd7d24f5d56dbce09949f6b452

Comment 4 Armando Biagioni Neto 2018-09-06 19:29:19 UTC
Fixed upstream
ipa-4-6:
https://pagure.io/freeipa/c/d73e2016ec0bd25fdb04bbc04712be8d9eb157ae


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