From 23159b4ed1e710d84abe35c204a1cca958f4ca2c Mon Sep 17 00:00:00 2001 From: Hugo Hakim Damer Date: Sun, 4 Aug 2024 22:53:09 +0200 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! chore: apply suggestions from code review (#13) Co-authored-by: Falko Galperin <10247603+falko17@users.noreply.github.com> --- src/lib.rs | 4 ++-- src/token/cose/recipient/mod.rs | 4 ++-- src/token/cose/test_helper.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c4ccf5a..592cc9e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -161,8 +161,8 @@ //! # Token handling //! //! This crate also provides some functionality regarding the encoding and decoding of access -//! tokens, especially of CBOR Web Tokens (CWTs), which are based on the COSE specification -//! (RFC 9052). +//! tokens, especially of CBOR Web Tokens (CWTs, [RFC 8392](https://datatracker.ietf.org/doc/html/rfc8392)), +//! which are based on the COSE specification ([RFC 9052](https://datatracker.ietf.org/doc/html/rfc9052)). //! //! Generation and validation of CWTs is supported for CWTs based on signed and encrypted //! COSE objects. Additionally, helper methods are provided to more easily create and validate diff --git a/src/token/cose/recipient/mod.rs b/src/token/cose/recipient/mod.rs index 2466dc3..1fc0163 100644 --- a/src/token/cose/recipient/mod.rs +++ b/src/token/cose/recipient/mod.rs @@ -370,7 +370,7 @@ impl<'a, B: KeyDistributionCryptoBackend, CKP: KeyProvider, AAD: AadProvider> } } -/// Determine the key operations that a key might have in order to be valid for an encryption +/// Determine the key operations that a key may have in order to be valid for an encryption /// operation of the given `algorithm`. fn determine_encrypt_key_ops_for_alg( algorithm: iana::Algorithm, @@ -425,7 +425,7 @@ fn determine_encrypt_key_ops_for_alg( })) } -/// Determine the key operations that a key might have in order to be valid for a decryption +/// Determine the key operations that a key may have in order to be valid for a decryption /// operation of the given `algorithm`. fn determine_decrypt_key_ops_for_alg( alg: iana::Algorithm, diff --git a/src/token/cose/test_helper.rs b/src/token/cose/test_helper.rs index 4f20cfe..fb6462c 100644 --- a/src/token/cose/test_helper.rs +++ b/src/token/cose/test_helper.rs @@ -417,7 +417,7 @@ pub trait CoseStructTestHelper: fn check_against_test_case(&self, case: &TestCase, backend: &mut B); } -/// Apply failures to `hdr` based on a description given in `failures` +/// Apply failures to `hdr` based on a description given in `failures`. pub(crate) fn apply_header_failures(hdr: &mut Header, failures: &TestCaseFailures) { if let Some(headers_to_remove) = &failures.remove_protected_headers { if !headers_to_remove.key_id.is_empty() {