Bug 1599027

Summary: ipa ca-show <ca> --certificate-out=/tmp/ca fails with python type error
Product: [Fedora] Fedora Reporter: Brian J. Atkisson <batkisso>
Component: freeipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: abiagion, abokovoy, cheimes, ipa-maint, jcholast, jhrozek, pvoborni, rcritten, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-28 22:20:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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

Comment 5 Ben Cotton 2019-05-02 20:58:24 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Ben Cotton 2019-05-28 22:20:17 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.