Source: py-rnp
Version: 0.1.0+git20221014.01b7129-4
Severity: important
User: debian...@lists.debian.org
Usertags: flaky
X-Debbugs-Cc: debian...@lists.debian.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear maintainer,

the py-rnp autopkgtests exhibits intermittent failures with an allegedly
invalid signature on s390x:

Example of failing test:
https://ci.debian.net/data/autopkgtest/testing/s390x/p/py-rnp/30085131/log.gz

Example of passing test:
https://ci.debian.net/data/autopkgtest/testing/s390x/p/py-rnp/29557177/log.gz

Excerpt from failing log:

=================================== FAILURES ===================================
________________________ test_simple_sign_with_options _________________________

rpgp = <rnp.rnp.Rnp object at 0x3ff853da500>
key = <rnp.key.Key object at 0x3ff853da2c0>

    def test_simple_sign_with_options(rpgp, key):
        halg = random.choice(rnp.features("hash algorithm"))
        calg = random.choice(
            [
                calg
                for calg in rnp.features("compression algorithm")
                if calg != "Uncompressed"
            ]
        )
        signature = rpgp.sign(
            key,
            rnp.Input.from_bytes(b"test data"),
            True,
            halg,
            (calg, 1),
            int(time.time()),
            60 * 10,
        )
        assert isinstance(signature, bytes)
        assert len(signature) >= 1
        assert signature.startswith(b"-----BEGIN PGP MESSAGE-----\r\n")
>       rpgp.verify(rnp.Input.from_bytes(signature))

tests/test_simple_sign.py:53: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
rnp/rnp.py:296: in verify
    op.finish()
rnp/op/verify.py:42: in finish
    _lib.rnp_op_verify_execute(self._obj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

rc = 301989890, fn = <_FuncPtr object at 0x3ff86755900>
_args = (c_void_p(2930237310656),)

    def _errcheck(rc, fn, _args):
        if rc == 0:
            return rc
>       raise RnpException("%s failed" % (fn.__name__), rc)
E       rnp.lib.RnpException: rnp_op_verify_execute failed: 0x12000002 (Invalid 
signature)

rnp/lib.py:85: RnpException
- ----------------------------- Captured stderr call 
-----------------------------
[signature_validate() ./src/lib/crypto/signatures.cpp:211] Insecure hash 
algorithm 2, marking signature as invalid.
=========================== short test summary info ============================
FAILED tests/test_simple_sign.py::test_simple_sign_with_options - rnp.lib.Rnp...
=================== 1 failed, 87 passed in 68.53s (0:01:08) ====================


Cheers
Timo

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEEJvtDgpxjkjCIVtam+C8H+466LVkFAmO94j0ACgkQ+C8H+466
LVk/fgv8CicWN4yVmLxsXhntmKcas4mP7a6MOWwtRSr4AK0qy4hKBWQ+sDuYFpju
89kainfinoSsjgE0PNTaymuurY/ifakL1LcEQ9+DntSGgr9pmOdK4UU2iNDfKuF6
fKPgvvBEb9el5NPnZg71IRsxVcfy8MFjJfRUUoJ+bdVSzXtt9WwcWPmQq1MPR1Vj
ZpO38NCzeLflk7RmoyR07ykt7I9TDyfj2QwJV0r89qxdOQB48jEHtFYDOEAkFHM3
TKkTHP5b4N+OP3PZ6RcD4l2B0TKX8W6XQ/EBymGERAXHPQErqytxR5GIzRpvkoNy
wa2ETXYP8OucjDvi5NluPgMMrkIjN+uNiQBqYifigiS4qZckdnpsxbc9h42tzLWS
wM0nCOJjbFFSAhGTh4qOgqi78m4j5gLLtHoXrAcuMgS5MFX1cCdw0HxtKaBPiHE8
wH3wFYR1A1OKZewKNGPnNLLqjdDFcy2UdDwfruqU61IkcVTugCw5fxiQEPgDtWug
R9RGvk03
=J8Ar
-----END PGP SIGNATURE-----

Reply via email to