aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-28 12:27:15 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-02-02 10:25:02 +0000
commitf49e61589e32217f97c94aa86d826f6b65170fba (patch)
tree0ca2fa9741197e6c496eaa5452165dcaee1373fa /CHANGELOG.md
parenteef2118717878f3543248ebf2d099aebbedceacf (diff)
downloadnitrokey-rs-f49e61589e32217f97c94aa86d826f6b65170fba.tar.gz
nitrokey-rs-f49e61589e32217f97c94aa86d826f6b65170fba.tar.bz2
Require mutable reference if method changes device state
Previously, all methods that access a Nitrokey device took a reference to the device as input. This method changes methods that change the device state to require a mutable reference instead. In most case, this is straightforward as the method writes data to the device (for example write_config or change_user_pin). But there are two edge cases: - Authenticating with a PIN changes the device state as it may decrease the PIN retry counter if the authentication fails. - Generating an HOTP code changes the device state as it increases the HOTP counter.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 718b796..e98e857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,7 @@ SPDX-License-Identifier: MIT
- Use mutability to represent changes to the device status:
- Implement `DerefMut` for `User<T>` and `Admin<T>`.
- Add `device_mut` method to `DeviceWrapper`.
+ - Require a mutable `Device` reference if a method changes the device state.
# v0.3.4 (2019-01-20)
- Fix authentication methods that assumed that `char` is signed.