Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Investigate possible opencryptoki regression w.r.t. stream cancellations

Open
#233 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python

Research direction

Start with tests.test_rsa.RSATests.test_verify_stream_interrupt_releases_operation and reproduce the failure against opencryptoki. Compare the behavior across the relevant upstream versions or changes to identify when stream cancellation stopped releasing the operation. Done means the regression is explained and the test passes again, or the upstream cause is documented.

Written by the indexing model from the issue text.

Description

Some time between April and now opencryptoki tests started failing with this error:

self = <tests.test_rsa.RSATests testMethod=test_verify_stream_interrupt_releases_operation>

    @requires(Mechanism.SHA512_RSA_PKCS)
    def test_verify_stream_interrupt_releases_operation(self):
        data = (
            b"I" * 16,
            b"N" * 16,
            b"P" * 16,
            b"U" * 16,
            b"T" * 10,
        )
    
        def _data_with_error():
            yield data[0]
            yield data[1]
            yield data[2]
            raise ValueError
    
        signature = self.private.sign(data)
    
        def attempt_verify():
            self.public.verify(_data_with_error(), signature)
    
        self.assertRaises(ValueError, attempt_verify)
        # ...try again
>       self.assertTrue(self.public.verify(data, signature))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Our code didn't change, so this is probably an upstream regression. To be investigated.

Dominant language
Python
Stars
170
Forks
79
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pyauth/python-pkcs11

All issues in pyauth/python-pkcs11

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.