wala-rust

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

commit 4e722d55c00f1f5c6e11912d9343c4d896cfeefd
parent ecfb3079776cfb9fbc00232b379998d712eeca94
Author: lash <dev@holbrook.no>
Date:   Thu, 23 Jun 2022 11:20:50 +0000

Add pgp bundle parse

Diffstat:
Msrc/auth/pgp.rs | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/auth/pgp.rs b/src/auth/pgp.rs @@ -64,6 +64,21 @@ fn check_key_bundle(data: Vec<u8>) -> Option<PublicKey> { // None } +fn check_sig_single(public_key: &PublicKey, data: Vec<u8>) -> bool { + match Signature::from_slice(Version::Old, &data) { + Ok(v) => { + match v.verify(public_key) { + Ok(v) => { + + }, + _ => {}, + }; + }, + _ => {}, + } + false +} + pub fn auth_check(auth: &AuthSpec) -> Result<AuthResult, AuthError> { if auth.method != "pgp" { return Err(AuthError{});