rust/pv: Signing messages

Adds the ability to sign and verify messages using ECDH or RSA keys.

Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2024-01-30 12:55:32 +01:00
committed by Jan Höppner
parent 1450f85ada
commit bfd0e12d22
9 changed files with 237 additions and 3 deletions
+6
View File
@@ -32,6 +32,12 @@ pub enum Error {
#[error("Internal (unexpected) error: {0}, caused by {1}")]
InternalSsl(&'static str, #[source] openssl::error::ErrorStack),
#[error("Signing is only supported for EC and RSA keys")]
UnsupportedSigningKey,
#[error("Verifying signatures is only supported for EC and RSA keys")]
UnsupportedVerificationKey,
// errors from other crates
#[error(transparent)]
PvCore(#[from] pv_core::Error),