[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OATH-Toolkit-help] PSKC file locking
From: |
David Woodhouse |
Subject: |
[OATH-Toolkit-help] PSKC file locking |
Date: |
Thu, 14 Aug 2014 11:11:12 +0100 |
When using HOTP tokens (and OCRA with a counter), we really want to
atomically:
- Load the contents of a PSKC file.
- Generate a keycode and increment the counter in the pskc_key_t
- Save the new counter value back to the file.
That way, multiple applications can be using keycodes without corrupting
the file or re-using the same code.
So we need to have a defined method of *locking* the file — either with
a separate lockfile, fcntl locking, or something.
Does anyone have any opinions on *what* that method should be?
--
dwmw2
smime.p7s
Description: S/MIME cryptographic signature
- [OATH-Toolkit-help] PSKC file locking,
David Woodhouse <=