Bug 1400038 - [abrt] fedora-cert: crypto.py:1921:get_revoked:AttributeError: '_cffi_backend.CData' object has no attribute 'crl'
Summary: [abrt] fedora-cert: crypto.py:1921:get_revoked:AttributeError: '_cffi_backend...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-packager
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:406fa405aac14d2d2e6363e23e9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-30 10:37 UTC by Jaroslav Škarvada
Modified: 2017-08-08 19:22 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 19:22:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (697 bytes, text/plain)
2016-11-30 10:37 UTC, Jaroslav Škarvada
no flags Details
File: environ (3.71 KB, text/plain)
2016-11-30 10:37 UTC, Jaroslav Škarvada
no flags Details

Description Jaroslav Škarvada 2016-11-30 10:37:23 UTC
Description of problem:
fedora-cert -v

Version-Release number of selected component:
fedora-cert-0.5.10.7-1.fc24

Additional info:
reporter:       libreport-2.7.2
cmdline:        /usr/bin/python /usr/bin/fedora-cert -v
dso_list:       pyOpenSSL-16.0.0-1.fc24.noarch
executable:     /usr/bin/fedora-cert
kernel:         4.8.8-200.fc24.x86_64
pkg_fingerprint: 73BD E983 81B4 6521
pkg_vendor:     Fedora Project
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
crypto.py:1921:get_revoked:AttributeError: '_cffi_backend.CData' object has no attribute 'crl'

Traceback (most recent call last):
  File "/usr/bin/fedora-cert", line 74, in <module>
    main(opts)
  File "/usr/bin/fedora-cert", line 54, in main
    fedora_cert.verify_cert()
  File "/usr/lib/python2.7/site-packages/fedora_cert/__init__.py", line 63, in verify_cert
    revoked = crl.get_revoked()
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 1921, in get_revoked
    revoked_stack = self._crl.crl.revoked
AttributeError: '_cffi_backend.CData' object has no attribute 'crl'

Local variables in innermost frame:
self: <OpenSSL.crypto.CRL object at 0x7f199cdefe90>
results: []

Comment 1 Jaroslav Škarvada 2016-11-30 10:37:29 UTC
Created attachment 1226243 [details]
File: backtrace

Comment 2 Jaroslav Škarvada 2016-11-30 10:37:30 UTC
Created attachment 1226244 [details]
File: environ

Comment 3 Karel Volný 2016-12-15 15:37:35 UTC
just got this with fedora-cert-0.6.0.0-1.fc25.noarch

$ fedora-cert -v
Verifying Certificate
cert expires: 2017-05-22
Traceback (most recent call last):
  File "/usr/bin/fedora-cert", line 85, in <module>
    main(opts)
  File "/usr/bin/fedora-cert", line 63, in main
    fedora_cert.verify_cert()
  File "/usr/lib/python2.7/site-packages/fedora_cert/__init__.py", line 69, in verify_cert
    revoked = crl.get_revoked()
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 1921, in get_revoked
    revoked_stack = self._crl.crl.revoked
AttributeError: '_cffi_backend.CData' object has no attribute 'crl'

Comment 4 Mark McKinstry 2016-12-19 01:10:55 UTC
I'm having this same issue.

I'm pretty sure the problem is with pyOpenSSL. I applied this patch https://github.com/pyca/pyopenssl/commit/67903a6122b06d676dd15c7f0ad1aed884a1ebfa and fedora-cert works now.

Comment 5 Mark McKinstry 2016-12-19 01:17:17 UTC
Here's an example of how I patched it.

```
[vagrant@fedora-24 ~]$ fedora-cert -v
Verifying Certificate
cert expires: 2017-06-17
Traceback (most recent call last):
  File "/usr/bin/fedora-cert", line 85, in <module>
    main(opts)
  File "/usr/bin/fedora-cert", line 63, in main
    fedora_cert.verify_cert()
  File "/usr/lib/python2.7/site-packages/fedora_cert/__init__.py", line 71, in verify_cert
    revoked = crl.get_revoked()
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 1921, in get_revoked
    revoked_stack = self._crl.crl.revoked
AttributeError: '_cffi_backend.CData' object has no attribute 'crl'
[vagrant@fedora-24 ~]$ 
[vagrant@fedora-24 ~]$ wget --quiet https://github.com/pyca/pyopenssl/commit/67903a6122b06d676dd15c7f0ad1aed884a1ebfa.patch
[vagrant@fedora-24 ~]$ cat 67903a6122b06d676dd15c7f0ad1aed884a1ebfa.patch | sudo patch --directory=/usr/lib/python2.7/site-packages/OpenSSL/
patching file crypto.py
[vagrant@fedora-24 ~]$ fedora-cert -v
Verifying Certificate
cert expires: 2017-06-17
[vagrant@fedora-24 ~]$ 
```

Comment 6 David Juran 2017-03-16 19:06:55 UTC
See also https://bugzilla.redhat.com/show_bug.cgi?id=1418389

Comment 7 Mark McKinstry 2017-03-17 02:26:48 UTC
My patched made the error go away but fedpkg was still broken.

The fix was I needed to run """kinit [FAS name]@FEDORAPROJECT.ORG""" before doing any fedora packaging stuff.

There's a bug report somewhere where the resolution was to use kinit and someone updated the docs but I can't find it ATM. The docs are at https://fedoraproject.org/wiki/Package_maintenance_guide#Installing_fedpkg_and_doing_initial_setup

Comment 8 Fedora End Of Life 2017-07-26 00:01:13 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 '24'.

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 24 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 9 Fedora End Of Life 2017-08-08 19:22:29 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.


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