Stop transactions from being reentrant #316

Merged
Patater merged 1 commit from stop-reentrant-transaction into development 2019-11-08 08:59:40 -06:00
Patater commented 2019-11-07 12:20:00 -06:00 (Migrated from github.com)

We want to explicitly disallow creating new transactions when a
transaction is already in progress. However, we were incorrectly
checking for the existence of the injected entropy file before
continuing with creating a transaction. This meant we could have a
transaction already in progress and would be able to still create a new
transaction. It also meant we couldn't start a new transaction if any
entropy had been injected. Check the transaction file instead of the
injected entropy file in order to prevent multiple concurrent
transactions.

We want to explicitly disallow creating new transactions when a transaction is already in progress. However, we were incorrectly checking for the existence of the injected entropy file before continuing with creating a transaction. This meant we could have a transaction already in progress and would be able to still create a new transaction. It also meant we couldn't start a new transaction if any entropy had been injected. Check the transaction file instead of the injected entropy file in order to prevent multiple concurrent transactions.
gilles-peskine-arm (Migrated from github.com) approved these changes 2019-11-07 12:23:00 -06:00
gilles-peskine-arm (Migrated from github.com) left a comment

Ooops. (This is why we need tests!)

Ooops. (This is why we need tests!)
dgreen-arm (Migrated from github.com) approved these changes 2019-11-08 03:07:30 -06:00
Patater commented 2019-11-08 08:59:31 -06:00 (Migrated from github.com)

Merge job is green. Mergin'.

Merge job is green. Mergin'.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-ARMmbed/mbed-crypto!316
No description provided.