Use RsaPublicParts::deserialize

This patch replaces trussed::postcard_deserialize with
RsaPublicParts::deserialize for compatibility with Trussed 0.2.0.
This commit is contained in:
Robin Krahl
2023-04-24 09:45:29 +02:00
parent 25060e3033
commit 3980187dd0
3 changed files with 15 additions and 6 deletions
+10
View File
@@ -5,10 +5,20 @@ SPDX-License-Identifier: CC0-1.0
# Changelog
## Unreleased
## [v0.1.2][] (2023-04-24)
- Use `RsaPublicParts::deserialize` instead of `trussed::postcard_deserialize` for compatibility with recent Trussed changes.
[v0.1.2]: https://github.com/Nitrokey/piv-authenticator/releases/tag/v0.1.2
## [v0.1.1][] (2023-04-17)
- Fix dependency on trussed-rsa-alloc to use the git tag in the `[patch.crates-io]` section to avoid duplicate downstream dependencies
[v0.1.1]: https://github.com/Nitrokey/piv-authenticator/releases/tag/v0.1.1
## [v0.1.0][] (2023-04-13)
This initial release contains support for the basic PIV card functionality.
+1 -1
View File
@@ -3,7 +3,7 @@
[package]
name = "piv-authenticator"
version = "0.1.1"
version = "0.1.2"
authors = ["Nicolas Stalder <n@stalder.io>", "Nitrokey GmbH"]
edition = "2021"
license = "LGPL-3.0-only"
+4 -5
View File
@@ -865,11 +865,10 @@ impl<'a, T: trussed::Client + AuthClient + trussed::client::Ed255> LoadedAuthent
trussed::types::KeySerialization::RsaParts
))
.serialized_key;
let serialized: RsaPublicParts =
trussed::postcard_deserialize(&tmp).map_err(|_err| {
error!("Failed to parse RSA parts: {:?}", _err);
Status::UnspecifiedNonpersistentExecutionError
})?;
let serialized = RsaPublicParts::deserialize(&tmp).map_err(|_err| {
error!("Failed to parse RSA parts: {:?}", _err);
Status::UnspecifiedNonpersistentExecutionError
})?;
reply.expand(&[0x81])?;
reply.append_len(serialized.n.len())?;
reply.expand(serialized.n)?;