Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle X509_ALGOR being opaque #1260

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
linux:
runs-on: ${{ matrix.PYTHON.OS || 'ubuntu-22.04' }}
strategy:
fail-fast: false
matrix:
PYTHON:
# Base builds
Expand Down
6 changes: 4 additions & 2 deletions src/OpenSSL/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -1322,8 +1322,10 @@ def get_signature_algorithm(self) -> bytes:

.. versionadded:: 0.13
"""
algor = _lib.X509_get0_tbs_sigalg(self._x509)
nid = _lib.OBJ_obj2nid(algor.algorithm)
sig_alg = _lib.X509_get0_tbs_sigalg(self._x509)
alg = _ffi.new("ASN1_OBJECT **")
_lib.X509_ALGOR_get0(alg, _ffi.NULL, _ffi.NULL, sig_alg)
nid = _lib.OBJ_obj2nid(alg[0])
if nid == _lib.NID_undef:
raise ValueError("Undefined signature algorithm")
return _ffi.string(_lib.OBJ_nid2ln(nid))
Expand Down
Loading