aboutsummaryrefslogtreecommitdiff
path: root/LICENSES/MIT.txt
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-01-29 13:52:19 +0100
committerRobin Krahl <robin.krahl@ireas.org>2020-02-03 10:22:13 +0100
commitc1f48ce6c614586042db8891d2eebf19d2212ce4 (patch)
tree9824d4552faf18a09eabb214deb87b4db950ab41 /LICENSES/MIT.txt
parent4a9dab94400cb00ae1e28485ddc64d46cf27ed3c (diff)
downloadnitrokey-rs-c1f48ce6c614586042db8891d2eebf19d2212ce4.tar.gz
nitrokey-rs-c1f48ce6c614586042db8891d2eebf19d2212ce4.tar.bz2
Use NK_get_status to implement Device::get_config
libnitrokey’s NK_read_config function returns a pointer to an array that has been allocated using new[]. We would have to delete this pointer using delete[], but we only have access to free. Therefore this patch modifies the Device::get_config function to call NK_get_status instead of NK_read_config. This also makes the code more safe as we get the data as a struct instead of an array. It does not add much overhead as NK_read_config also executes the GET_STATUS command on the Nitrokey device.
Diffstat (limited to 'LICENSES/MIT.txt')
0 files changed, 0 insertions, 0 deletions