Skip to content

Commit

Permalink
Fix approximately 100 mypy errors in test_crypto.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jan 7, 2025
1 parent 10acb2b commit 3b1e52f
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 84 deletions.
8 changes: 5 additions & 3 deletions src/OpenSSL/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,12 +1410,12 @@ def digest(self, digest_name: str) -> bytes:
]
)

def subject_name_hash(self) -> bytes:
def subject_name_hash(self) -> int:
"""
Return the hash of the X509 subject.
:return: The hash of the subject.
:rtype: :py:class:`bytes`
:rtype: :py:class:`int`
"""
return _lib.X509_subject_name_hash(self._x509)

Expand Down Expand Up @@ -1858,7 +1858,9 @@ def set_time(self, vfy_time: datetime.datetime) -> None:
_openssl_assert(_lib.X509_STORE_set1_param(self._store, param) != 0)

def load_locations(
self, cafile: StrOrBytesPath, capath: StrOrBytesPath | None = None
self,
cafile: StrOrBytesPath | None,
capath: StrOrBytesPath | None = None,
) -> None:
"""
Let X509Store know where we can find trusted certificates for the
Expand Down
Loading

0 comments on commit 3b1e52f

Please sign in to comment.