Beispiel #1
0
    def test_openssl_error_string(self):
        backend._lib.ERR_put_error(
            backend._lib.ERR_LIB_EVP, backend._lib.EVP_F_EVP_DECRYPTFINAL_EX, 0, b"test_openssl.py", -1
        )

        errors = backend._consume_errors()
        exc = backend._unknown_error(errors[0])

        assert "digital envelope routines:" "EVP_DecryptFinal_ex:digital envelope routines" in str(exc)
Beispiel #2
0
    def test_openssl_error_string(self):
        backend._lib.ERR_put_error(backend._lib.ERR_LIB_EVP,
                                   backend._lib.EVP_F_EVP_DECRYPTFINAL_EX, 0,
                                   b"test_openssl.py", -1)

        errors = backend._consume_errors()
        exc = backend._unknown_error(errors[0])

        assert ("digital envelope routines:"
                "EVP_DecryptFinal_ex:digital envelope routines" in str(exc))