barbican/barbican/tests/plugin
Douglas Mendizábal 28b13bce25 Ignore network errors during C_Finalize
The Trustway Proteccio HSM can somtimes return a network error when
attempting to finalize the cryptoki library.

The error can prevent reinitialization because we attempt to finalize
the library before initalizing a new connection.  When a network error
occurrs, barbican gets stuck in an error loop trying to finalize the
dead connection before starting a new one.

This patch adds code to ignore the network error when finalizing to
ensure we are able to attempt to reinitialize.

Connection errors during other operations will still result in 500
errors as expected.

Change-Id: I9ac6c7bbda0f81cb26e1c589803317df1ef11f39
(cherry picked from commit 70aac1f698)
(cherry picked from commit 1b6cf81c23)
(cherry picked from commit 2792aca796)
2021-09-23 12:21:58 +00:00
..
crypto Ignore network errors during C_Finalize 2021-09-23 12:21:58 +00:00
interface Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00
util Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00
__init__.py Restructure project to accommodate plugin types 2014-06-18 23:46:07 -05:00
test_castellan_secret_store.py Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00
test_dogtag.py Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00
test_kmip.py Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00
test_resource.py Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00
test_simple_certificate_manager.py Fix order of arguments in assertEqual 2015-09-30 11:21:02 +05:30
test_snakeoil_ca.py Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00
test_store_crypto.py Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00
test_symantec.py Use unittest.mock instead of third party mock 2020-04-28 04:00:17 +00:00