Skip to content

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

@MatthiasValvekens

Description

@MatthiasValvekens

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions