Add COSE structure extensions that allow use of predefined cryptographic backends + an OpenSSL based backend. #91
check.yml
on: pull_request
Check
27s
Check (no_std)
26s
Test Suite
41s
Test Suite (no_std)
21s
Rustfmt
4s
clippy_check
27s
test_coverage
30s
Annotations
82 errors and 174 warnings
it is more concise to loop over containers instead of using explicit iteration methods:
src/token/mod.rs#L483
error: it is more concise to loop over containers instead of using explicit iteration methods
--> src/token/mod.rs:483:29
|
483 | for (key, signature) in keys.into_iter() {
| ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `keys`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_into_iter_loop
= note: `#[deny(clippy::explicit_into_iter_loop)]` implied by `#[deny(clippy::pedantic)]`
|
calling `PhantomData::default()` is more clear than this expression:
src/token/cose/key.rs#L320
error: calling `PhantomData::default()` is more clear than this expression
--> src/token/cose/key.rs:320:34
|
320 | _backend_error_type: Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: `PhantomData::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
|
calling `PhantomData::default()` is more clear than this expression:
src/token/cose/key.rs#L279
error: calling `PhantomData::default()` is more clear than this expression
--> src/token/cose/key.rs:279:34
|
279 | _backend_error_type: Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: `PhantomData::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
|
calling `PhantomData::default()` is more clear than this expression:
src/token/cose/key.rs#L197
error: calling `PhantomData::default()` is more clear than this expression
--> src/token/cose/key.rs:197:34
|
197 | _backend_error_type: Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: `PhantomData::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
= note: `#[deny(clippy::default_trait_access)]` implied by `#[deny(clippy::pedantic)]`
|
Test Suite (no_std):
src/token/cose/header_util.rs#L7
failed to resolve: use of undeclared crate or module `std`
|
Test Suite (no_std):
src/error/mod.rs#L16
failed to resolve: use of undeclared crate or module `std`
|
Test Suite (no_std):
src/error/mod.rs#L17
failed to resolve: use of undeclared crate or module `std`
|
Test Suite (no_std):
src/token/cose/key.rs#L7
failed to resolve: use of undeclared crate or module `std`
|
Test Suite (no_std):
src/token/cose/key.rs#L8
failed to resolve: use of undeclared crate or module `std`
|
Test Suite (no_std):
src/token/cose/sign.rs#L365
cannot find macro `dbg` in this scope
|
Test Suite (no_std):
src/error/mod.rs#L285
cannot find type `Vec` in this scope
|
Test Suite (no_std):
src/error/mod.rs#L286
cannot find type `Vec` in this scope
|
Test Suite (no_std):
src/token/cose/sign.rs#L75
cannot find type `Vec` in this scope
|
Test Suite (no_std):
src/token/cose/sign.rs#L244
cannot find type `Vec` in this scope
|
unnecessary boolean `not` operation:
src/token/cose/header_util.rs#L59
error: unnecessary boolean `not` operation
--> src/token/cose/header_util.rs:59:5
|
59 | / if !duplicate_header_fields.is_empty() {
60 | | Err(CoseCipherError::DuplicateHeaders(
61 | | duplicate_header_fields
62 | | .into_iter()
... |
67 | | Ok(())
68 | | }
| |_____^
|
= help: remove the `!` and swap the blocks of the `if`/`else`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
= note: `#[deny(clippy::if_not_else)]` implied by `#[deny(clippy::pedantic)]`
|
you seem to be trying to match on a boolean expression:
src/token/cose/crypto_impl/openssl.rs#L185
error: you seem to be trying to match on a boolean expression
--> src/token/cose/crypto_impl/openssl.rs:185:45
|
185 | .and_then(|verification_successful| match verification_successful {
| _____________________________________________^
186 | | true => Ok(()),
187 | | false => Err(CoseCipherError::VerificationFailure),
188 | | })
| |_________^ help: consider using an `if`/`else` expression: `if verification_successful { Ok(()) } else { Err(CoseCipherError::VerificationFailure) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool
= note: `#[deny(clippy::match_bool)]` implied by `#[deny(clippy::pedantic)]`
|
explicit `deref` method call:
src/token/cose/crypto_impl/openssl.rs#L127
error: explicit `deref` method call
--> src/token/cose/crypto_impl/openssl.rs:127:9
|
127 | / PKey::from_ec_key(private_key)
128 | | .map_err(CoseOpensslCipherError::from)?
129 | | .deref(),
| |____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_deref_methods
= note: `#[deny(clippy::explicit_deref_methods)]` implied by `#[deny(clippy::pedantic)]`
help: try
|
127 ~ &*PKey::from_ec_key(private_key)
128 ~ .map_err(CoseOpensslCipherError::from)?,
|
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/token/cose/sign.rs#L615
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/token/cose/sign.rs:615:13
|
615 | / match self.verify_detached_signature(sigindex, payload, aad, |signature, toverify| {
616 | | try_verify(
617 | | backend,
618 | | key_provider,
... |
629 | | }
630 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
help: try
|
615 ~ if let Ok(()) = self.verify_detached_signature(sigindex, payload, aad, |signature, toverify| {
616 + try_verify(
617 + backend,
618 + key_provider,
619 + &self.protected.header,
620 + &self.unprotected,
621 + try_all_keys,
622 + signature,
623 + toverify,
624 + )
625 + }) { return Ok(()) } else {
626 + // TODO debug logging? Allow debugging why each verification failed?
627 + }
|
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/token/cose/sign.rs#L585
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/token/cose/sign.rs:585:13
|
585 | / match self.verify_signature(sigindex, aad, |signature, toverify| {
586 | | try_verify(
587 | | backend,
588 | | key_provider,
... |
599 | | }
600 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
= note: `#[deny(clippy::single_match_else)]` implied by `#[deny(clippy::pedantic)]`
help: try
|
585 ~ if let Ok(()) = self.verify_signature(sigindex, aad, |signature, toverify| {
586 + try_verify(
587 + backend,
588 + key_provider,
589 + &self.protected.header,
590 + &self.unprotected,
591 + try_all_keys,
592 + signature,
593 + toverify,
594 + )
595 + }) { return Ok(()) } else {
596 + // TODO debug logging? Allow debugging why each verification failed?
597 + }
|
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L566
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:566:5
|
566 | / fn try_verify_detached<'a, B: CoseSignCipher, CKP: CoseKeyProvider<'a>>(
567 | | &self,
568 | | backend: &mut B,
569 | | key_provider: &CKP,
... |
572 | | aad: &[u8],
573 | | ) -> Result<(), CoseCipherError<B::Error>>;
| |_______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L558
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:558:5
|
558 | / fn try_verify<'a, B: CoseSignCipher, CKP: CoseKeyProvider<'a>>(
559 | | &self,
560 | | backend: &mut B,
561 | | key_provider: &CKP,
562 | | try_all_keys: bool,
563 | | aad: &[u8],
564 | | ) -> Result<(), CoseCipherError<B::Error>>;
| |_______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L505
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:505:5
|
505 | / fn try_add_sign_detached<B: CoseSignCipher>(
506 | | self,
507 | | backend: &mut B,
508 | | key: &CoseKey,
... |
511 | | aad: &[u8],
512 | | ) -> Result<Self, CoseCipherError<B::Error>>;
| |_________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L497
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:497:5
|
497 | / fn try_add_sign<B: CoseSignCipher>(
498 | | self,
499 | | backend: &mut B,
500 | | key: &CoseKey,
501 | | sig: CoseSignature,
502 | | aad: &[u8],
503 | | ) -> Result<Self, CoseCipherError<B::Error>>;
| |_________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L437
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:437:5
|
437 | / fn try_verify_detached<'a, B: CoseSignCipher, CKP: CoseKeyProvider<'a>>(
438 | | &self,
439 | | backend: &mut B,
440 | | key_provider: &CKP,
... |
443 | | aad: &[u8],
444 | | ) -> Result<(), CoseCipherError<B::Error>>;
| |_______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L429
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:429:5
|
429 | / fn try_verify<'a, B: CoseSignCipher, CKP: CoseKeyProvider<'a>>(
430 | | &self,
431 | | backend: &mut B,
432 | | key_provider: &CKP,
433 | | try_all_keys: bool,
434 | | aad: &[u8],
435 | | ) -> Result<(), CoseCipherError<B::Error>>;
| |_______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
consider adding a `;` to the last statement for consistent formatting:
src/token/cose/sign.rs#L414
error: consider adding a `;` to the last statement for consistent formatting
--> src/token/cose/sign.rs:414:13
|
414 | builder = builder.unprotected(unprotected.clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `builder = builder.unprotected(unprotected.clone());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
src/token/cose/sign.rs#L411
error: consider adding a `;` to the last statement for consistent formatting
--> src/token/cose/sign.rs:411:13
|
411 | builder = builder.protected(protected.clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `builder = builder.protected(protected.clone());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
src/token/cose/sign.rs#L388
error: consider adding a `;` to the last statement for consistent formatting
--> src/token/cose/sign.rs:388:13
|
388 | builder = builder.unprotected(unprotected.clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `builder = builder.unprotected(unprotected.clone());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
src/token/cose/sign.rs#L385
error: consider adding a `;` to the last statement for consistent formatting
--> src/token/cose/sign.rs:385:13
|
385 | builder = builder.protected(protected.clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `builder = builder.protected(protected.clone());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `#[deny(clippy::semicolon_if_nothing_returned)]` implied by `#[deny(clippy::pedantic)]`
|
this match arm has an identical body to another arm:
src/token/cose/sign.rs#L326
error: this match arm has an identical body to another arm
--> src/token/cose/sign.rs:326:9
|
326 | v @ (Algorithm::Assigned(_)) => {
| ^---------------------------
| |
| _________help: try merging the arm patterns: `v @ (Algorithm::Assigned(_)) | v @ (Algorithm::PrivateUse(_) | Algorithm::Text(_))`
| |
327 | | return Err(CoseCipherError::UnsupportedAlgorithm(v.clone()))
328 | | }
| |_________^
|
= help: or try changing either arm body
note: other arm here
--> src/token/cose/sign.rs:331:9
|
331 | / v @ (Algorithm::PrivateUse(_) | Algorithm::Text(_)) => {
332 | | return Err(CoseCipherError::UnsupportedAlgorithm(v.clone()))
333 | | }
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
src/token/cose/sign.rs#L275
error: this match arm has an identical body to another arm
--> src/token/cose/sign.rs:275:9
|
275 | v @ (Algorithm::Assigned(_)) => {
| ^---------------------------
| |
| _________help: try merging the arm patterns: `v @ (Algorithm::Assigned(_)) | v @ (Algorithm::PrivateUse(_) | Algorithm::Text(_))`
| |
276 | | return Err(CoseCipherError::UnsupportedAlgorithm(v.clone()))
277 | | }
| |_________^
|
= help: or try changing either arm body
note: other arm here
--> src/token/cose/sign.rs:280:9
|
280 | / v @ (Algorithm::PrivateUse(_) | Algorithm::Text(_)) => {
281 | | return Err(CoseCipherError::UnsupportedAlgorithm(v.clone()))
282 | | }
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
= note: `#[deny(clippy::match_same_arms)]` implied by `#[deny(clippy::pedantic)]`
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L188
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:188:5
|
188 | / fn try_sign_detached<B: CoseSignCipher>(
189 | | self,
190 | | backend: &mut B,
191 | | key: &CoseKey,
... |
195 | | aad: &[u8],
196 | | ) -> Result<Self, CoseCipherError<B::Error>>;
| |_________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L164
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:164:5
|
164 | / fn try_sign<B: CoseSignCipher>(
165 | | self,
166 | | backend: &mut B,
167 | | key: &CoseKey,
... |
170 | | aad: &[u8],
171 | | ) -> Result<Self, CoseCipherError<B::Error>>;
| |_________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L77
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:77:5
|
77 | / fn verify_ecdsa(
78 | | &mut self,
79 | | alg: Algorithm,
80 | | key: &CoseEc2Key<'_, Self::Error>,
81 | | signature: &[u8],
82 | | target: &[u8],
83 | | ) -> Result<(), CoseCipherError<Self::Error>>;
| |__________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
src/token/cose/sign.rs#L70
error: docs for function returning `Result` missing `# Errors` section
--> src/token/cose/sign.rs:70:5
|
70 | / fn sign_ecdsa(
71 | | &mut self,
72 | | alg: Algorithm,
73 | | key: &CoseEc2Key<'_, Self::Error>,
74 | | target: &[u8],
75 | | ) -> Result<Vec<u8>, CoseCipherError<Self::Error>>;
| |_______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
= note: `#[deny(clippy::missing_errors_doc)]` implied by `#[deny(clippy::pedantic)]`
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::ERROR_URI)`
|
::: src/endpoints/token_req/mod.rs:851:13
|
851 | / cbor_map_vec! {
852 | | token::ERROR => Some(error),
853 | | token::ERROR_DESCRIPTION => self.description.as_ref(),
854 | | token::ERROR_URI => self.uri.as_ref()
855 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::ERROR_DESCRIPTION)`
|
::: src/endpoints/token_req/mod.rs:851:13
|
851 | / cbor_map_vec! {
852 | | token::ERROR => Some(error),
853 | | token::ERROR_DESCRIPTION => self.description.as_ref(),
854 | | token::ERROR_URI => self.uri.as_ref()
855 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::ERROR)`
|
::: src/endpoints/token_req/mod.rs:851:13
|
851 | / cbor_map_vec! {
852 | | token::ERROR => Some(error),
853 | | token::ERROR_DESCRIPTION => self.description.as_ref(),
854 | | token::ERROR_URI => self.uri.as_ref()
855 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::RS_CNF)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::ACE_PROFILE)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::REFRESH_TOKEN)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::TOKEN_TYPE)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::SCOPE)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::CNF)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(introspection::ISSUED_AT)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::EXPIRES_IN)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::ACCESS_TOKEN)`
|
::: src/endpoints/token_req/mod.rs:790:13
|
790 | / ... cbor_map_vec! {
791 | | ... token::ACCESS_TOKEN => Some(Value::Bytes(self.access_token.clone())),
792 | | ... token::EXPIRES_IN => self.expires_in,
793 | | ... introspection::ISSUED_AT => self.issued_at.as_ref().map(|x| x.clone().to_cbor_value().expect("serialization of issued_at failed...
... |
799 | | ... token::RS_CNF => self.rs_cnf.as_ref().map(ToCborMap::to_ciborium_value)
800 | | ... }
| |_______- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::CNONCE)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::ACE_PROFILE)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::GRANT_TYPE)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::REDIRECT_URI)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::CLIENT_ID)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::SCOPE)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::AUDIENCE)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(token::REQ_CNF)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(introspection::ISSUER)`
|
::: src/endpoints/token_req/mod.rs:740:13
|
740 | / cbor_map_vec! {
741 | | introspection::ISSUER => self.issuer.as_ref(),
742 | | token::REQ_CNF => self.req_cnf.as_ref().map(ToCborMap::to_ciborium_value),
743 | | token::AUDIENCE => self.audience.as_ref(),
... |
749 | | token::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
750 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(creation_hint::CNONCE)`
|
::: src/endpoints/creation_hint/mod.rs:144:13
|
144 | / cbor_map_vec! {
145 | | creation_hint::AS => self.auth_server.as_ref(),
146 | | creation_hint::KID => self.kid.as_ref(),
147 | | creation_hint::AUDIENCE => self.audience.as_ref(),
148 | | creation_hint::SCOPE => self.scope.as_ref(),
149 | | creation_hint::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
150 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(creation_hint::SCOPE)`
|
::: src/endpoints/creation_hint/mod.rs:144:13
|
144 | / cbor_map_vec! {
145 | | creation_hint::AS => self.auth_server.as_ref(),
146 | | creation_hint::KID => self.kid.as_ref(),
147 | | creation_hint::AUDIENCE => self.audience.as_ref(),
148 | | creation_hint::SCOPE => self.scope.as_ref(),
149 | | creation_hint::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
150 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(creation_hint::AUDIENCE)`
|
::: src/endpoints/creation_hint/mod.rs:144:13
|
144 | / cbor_map_vec! {
145 | | creation_hint::AS => self.auth_server.as_ref(),
146 | | creation_hint::KID => self.kid.as_ref(),
147 | | creation_hint::AUDIENCE => self.audience.as_ref(),
148 | | creation_hint::SCOPE => self.scope.as_ref(),
149 | | creation_hint::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
150 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(creation_hint::KID)`
|
::: src/endpoints/creation_hint/mod.rs:144:13
|
144 | / cbor_map_vec! {
145 | | creation_hint::AS => self.auth_server.as_ref(),
146 | | creation_hint::KID => self.kid.as_ref(),
147 | | creation_hint::AUDIENCE => self.audience.as_ref(),
148 | | creation_hint::SCOPE => self.scope.as_ref(),
149 | | creation_hint::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
150 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
casting `u8` to `i128` may become silently lossy if you later change the type:
src/common/cbor_map/mod.rs#L93
error: casting `u8` to `i128` may become silently lossy if you later change the type
--> src/common/cbor_map/mod.rs:93:18
|
93 | $key as i128,
| ^^^^^^^^^^^^ help: try: `i128::from(creation_hint::AS)`
|
::: src/endpoints/creation_hint/mod.rs:144:13
|
144 | / cbor_map_vec! {
145 | | creation_hint::AS => self.auth_server.as_ref(),
146 | | creation_hint::KID => self.kid.as_ref(),
147 | | creation_hint::AUDIENCE => self.audience.as_ref(),
148 | | creation_hint::SCOPE => self.scope.as_ref(),
149 | | creation_hint::CNONCE => self.client_nonce.as_ref().map(|v| Value::Bytes(v.clone()))
150 | | }
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
note: the lint level is defined here
--> src/lib.rs:307:42
|
307 | #![deny(rustdoc::broken_intra_doc_links, clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::cast_lossless)]` implied by `#[deny(clippy::pedantic)]`
= note: this error originates in the macro `cbor_map_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
clippy_check
Clippy had exited with the 101 exit code
|
Check (no_std):
src/token/cose/header_util.rs#L7
failed to resolve: use of undeclared crate or module `std`
|
Check (no_std):
src/error/mod.rs#L16
failed to resolve: use of undeclared crate or module `std`
|
Check (no_std):
src/error/mod.rs#L17
failed to resolve: use of undeclared crate or module `std`
|
Check (no_std):
src/token/cose/key.rs#L7
failed to resolve: use of undeclared crate or module `std`
|
Check (no_std):
src/token/cose/key.rs#L8
failed to resolve: use of undeclared crate or module `std`
|
Check (no_std):
src/token/cose/sign.rs#L365
cannot find macro `dbg` in this scope
|
Check (no_std):
src/error/mod.rs#L285
cannot find type `Vec` in this scope
|
Check (no_std):
src/error/mod.rs#L286
cannot find type `Vec` in this scope
|
Check (no_std):
src/token/cose/sign.rs#L75
cannot find type `Vec` in this scope
|
Check (no_std):
src/token/cose/sign.rs#L244
cannot find type `Vec` in this scope
|
test_coverage:
src/token/cose/tests.rs#L485
No file found
|
test_coverage:
src/token/cose/tests.rs#L493
No file found
|
test_coverage:
src/token/cose/tests.rs#L501
No file found
|
test_coverage:
src/token/cose/tests.rs#L509
No file found
|
test_coverage
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
Test Suite:
src/token/cose/tests.rs#L485
No file found
|
Test Suite:
src/token/cose/tests.rs#L493
No file found
|
Test Suite:
src/token/cose/tests.rs#L501
No file found
|
Test Suite:
src/token/cose/tests.rs#L509
No file found
|
Test Suite
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
Rustfmt
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
missing documentation for a trait:
src/token/cose/key.rs#L331
warning: missing documentation for a trait
--> src/token/cose/key.rs:331:1
|
331 | pub trait CoseKeyProvider<'a> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L292
warning: missing documentation for a struct field
--> src/token/cose/key.rs:292:5
|
292 | pub k: &'a [u8],
| ^^^^^^^^^^^^^^^
|
missing documentation for a struct:
src/token/cose/key.rs#L290
warning: missing documentation for a struct
--> src/token/cose/key.rs:290:1
|
290 | pub struct CoseSymmetricKey<'a, OE: Display> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L212
warning: missing documentation for a struct field
--> src/token/cose/key.rs:212:5
|
212 | pub x: Option<&'a [u8]>,
| ^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L211
warning: missing documentation for a struct field
--> src/token/cose/key.rs:211:5
|
211 | pub d: Option<&'a [u8]>,
| ^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L210
warning: missing documentation for a struct field
--> src/token/cose/key.rs:210:5
|
210 | pub crv: EllipticCurve,
| ^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct:
src/token/cose/key.rs#L208
warning: missing documentation for a struct
--> src/token/cose/key.rs:208:1
|
208 | pub struct CoseOkpKey<'a, OE: Display> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L99
warning: missing documentation for a struct field
--> src/token/cose/key.rs:99:5
|
99 | pub sign: Option<bool>,
| ^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L98
warning: missing documentation for a struct field
--> src/token/cose/key.rs:98:5
|
98 | pub y: Option<&'a [u8]>,
| ^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L97
warning: missing documentation for a struct field
--> src/token/cose/key.rs:97:5
|
97 | pub x: Option<&'a [u8]>,
| ^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L96
warning: missing documentation for a struct field
--> src/token/cose/key.rs:96:5
|
96 | pub d: Option<&'a [u8]>,
| ^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/token/cose/key.rs#L95
warning: missing documentation for a struct field
--> src/token/cose/key.rs:95:5
|
95 | pub crv: EllipticCurve,
| ^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct:
src/token/cose/key.rs#L93
warning: missing documentation for a struct
--> src/token/cose/key.rs:93:1
|
93 | pub struct CoseEc2Key<'a, OE: Display> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a type alias:
src/token/cose/key.rs#L91
warning: missing documentation for a type alias
--> src/token/cose/key.rs:91:1
|
91 | pub type EllipticCurve = RegisteredLabelWithPrivate<iana::EllipticCurve>;
| ^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a variant:
src/token/cose/key.rs#L45
warning: missing documentation for a variant
--> src/token/cose/key.rs:45:5
|
45 | Symmetric(CoseSymmetricKey<'a, OE>),
| ^^^^^^^^^
|
missing documentation for a variant:
src/token/cose/key.rs#L44
warning: missing documentation for a variant
--> src/token/cose/key.rs:44:5
|
44 | Okp(CoseOkpKey<'a, OE>),
| ^^^
|
missing documentation for a variant:
src/token/cose/key.rs#L43
warning: missing documentation for a variant
--> src/token/cose/key.rs:43:5
|
43 | Ec2(CoseEc2Key<'a, OE>),
| ^^^
|
missing documentation for an enum:
src/token/cose/key.rs#L42
warning: missing documentation for an enum
--> src/token/cose/key.rs:42:1
|
42 | pub enum CoseParsedKey<'a, OE: Display> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a variant:
src/token/cose/key.rs#L15
warning: missing documentation for a variant
--> src/token/cose/key.rs:15:5
|
15 | Symmetric(iana::SymmetricKeyParameter),
| ^^^^^^^^^
|
missing documentation for a variant:
src/token/cose/key.rs#L14
warning: missing documentation for a variant
--> src/token/cose/key.rs:14:5
|
14 | Okp(iana::OkpKeyParameter),
| ^^^
|
missing documentation for a variant:
src/token/cose/key.rs#L13
warning: missing documentation for a variant
--> src/token/cose/key.rs:13:5
|
13 | Ec2(iana::Ec2KeyParameter),
| ^^^
|
missing documentation for a variant:
src/token/cose/key.rs#L12
warning: missing documentation for a variant
--> src/token/cose/key.rs:12:5
|
12 | Common(iana::KeyParameter),
| ^^^^^^
|
missing documentation for an enum:
src/token/cose/key.rs#L11
warning: missing documentation for an enum
--> src/token/cose/key.rs:11:1
|
11 | pub enum KeyParam {
| ^^^^^^^^^^^^^^^^^
|
missing documentation for a struct:
src/token/cose/crypto_impl/openssl.rs#L53
warning: missing documentation for a struct
--> src/token/cose/crypto_impl/openssl.rs:53:1
|
53 | pub struct OpensslContext {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a variant:
src/token/cose/crypto_impl/openssl.rs#L38
warning: missing documentation for a variant
--> src/token/cose/crypto_impl/openssl.rs:38:5
|
38 | Other(&'static str),
| ^^^^^
|
missing documentation for a variant:
src/token/cose/crypto_impl/openssl.rs#L37
warning: missing documentation for a variant
--> src/token/cose/crypto_impl/openssl.rs:37:5
|
37 | OpensslError(core::ffi::c_ulong),
| ^^^^^^^^^^^^
|
missing documentation for an enum:
src/token/cose/crypto_impl/openssl.rs#L34
warning: missing documentation for an enum
--> src/token/cose/crypto_impl/openssl.rs:34:1
|
34 | pub enum CoseOpensslCipherError {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a module:
src/token/cose/crypto_impl/mod.rs#L17
warning: missing documentation for a module
--> src/token/cose/crypto_impl/mod.rs:17:1
|
17 | pub mod openssl;
| ^^^^^^^^^^^^^^^
|
missing documentation for a method:
src/token/cose/sign.rs#L566
warning: missing documentation for a method
--> src/token/cose/sign.rs:566:5
|
566 | / fn try_verify_detached<'a, B: CoseSignCipher, CKP: CoseKeyProvider<'a>>(
567 | | &self,
568 | | backend: &mut B,
569 | | key_provider: &CKP,
... |
572 | | aad: &[u8],
573 | | ) -> Result<(), CoseCipherError<B::Error>>;
| |_______________________________________________^
|
missing documentation for a method:
src/token/cose/sign.rs#L558
warning: missing documentation for a method
--> src/token/cose/sign.rs:558:5
|
558 | / fn try_verify<'a, B: CoseSignCipher, CKP: CoseKeyProvider<'a>>(
559 | | &self,
560 | | backend: &mut B,
561 | | key_provider: &CKP,
562 | | try_all_keys: bool,
563 | | aad: &[u8],
564 | | ) -> Result<(), CoseCipherError<B::Error>>;
| |_______________________________________________^
|
missing documentation for a method:
src/token/cose/sign.rs#L505
warning: missing documentation for a method
--> src/token/cose/sign.rs:505:5
|
505 | / fn try_add_sign_detached<B: CoseSignCipher>(
506 | | self,
507 | | backend: &mut B,
508 | | key: &CoseKey,
... |
511 | | aad: &[u8],
512 | | ) -> Result<Self, CoseCipherError<B::Error>>;
| |_________________________________________________^
|
missing documentation for a method:
src/token/cose/sign.rs#L497
warning: missing documentation for a method
--> src/token/cose/sign.rs:497:5
|
497 | / fn try_add_sign<B: CoseSignCipher>(
498 | | self,
499 | | backend: &mut B,
500 | | key: &CoseKey,
501 | | sig: CoseSignature,
502 | | aad: &[u8],
503 | | ) -> Result<Self, CoseCipherError<B::Error>>;
| |_________________________________________________^
|
missing documentation for a method:
src/token/cose/sign.rs#L437
warning: missing documentation for a method
--> src/token/cose/sign.rs:437:5
|
437 | / fn try_verify_detached<'a, B: CoseSignCipher, CKP: CoseKeyProvider<'a>>(
438 | | &self,
439 | | backend: &mut B,
440 | | key_provider: &CKP,
... |
443 | | aad: &[u8],
444 | | ) -> Result<(), CoseCipherError<B::Error>>;
| |_______________________________________________^
|
missing documentation for a method:
src/token/cose/sign.rs#L429
warning: missing documentation for a method
--> src/token/cose/sign.rs:429:5
|
429 | / fn try_verify<'a, B: CoseSignCipher, CKP: CoseKeyProvider<'a>>(
430 | | &self,
431 | | backend: &mut B,
432 | | key_provider: &CKP,
433 | | try_all_keys: bool,
434 | | aad: &[u8],
435 | | ) -> Result<(), CoseCipherError<B::Error>>;
| |_______________________________________________^
|
missing documentation for a trait:
src/token/cose/sign.rs#L428
warning: missing documentation for a trait
--> src/token/cose/sign.rs:428:1
|
428 | pub trait CoseSign1Ext {
| ^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a method:
src/token/cose/sign.rs#L77
warning: missing documentation for a method
--> src/token/cose/sign.rs:77:5
|
77 | / fn verify_ecdsa(
78 | | &mut self,
79 | | alg: Algorithm,
80 | | key: &CoseEc2Key<'_, Self::Error>,
81 | | signature: &[u8],
82 | | target: &[u8],
83 | | ) -> Result<(), CoseCipherError<Self::Error>>;
| |__________________________________________________^
|
missing documentation for a module:
src/token/cose/mod.rs#L5
warning: missing documentation for a module
--> src/token/cose/mod.rs:5:1
|
5 | pub mod key;
| ^^^^^^^^^^^
|
missing documentation for a module:
src/token/cose/mod.rs#L4
warning: missing documentation for a module
--> src/token/cose/mod.rs:4:1
|
4 | pub mod header_util;
| ^^^^^^^^^^^^^^^^^^^
|
missing documentation for a module:
src/token/cose/mod.rs#L1
warning: missing documentation for a module
--> src/token/cose/mod.rs:1:1
|
1 | pub mod sign;
| ^^^^^^^^^^^^
|
missing documentation for a module:
src/token/mod.rs#L175
warning: missing documentation for a module
--> src/token/mod.rs:175:1
|
175 | pub mod cose;
| ^^^^^^^^^^^^
|
missing documentation for a variant:
src/error/mod.rs#L289
warning: missing documentation for a variant
--> src/error/mod.rs:289:5
|
289 | TypeMismatch(Value),
| ^^^^^^^^^^^^
|
missing documentation for a variant:
src/error/mod.rs#L288
warning: missing documentation for a variant
--> src/error/mod.rs:288:5
|
288 | InvalidKeyParam(KeyParam, Value),
| ^^^^^^^^^^^^^^^
|
missing documentation for a variant:
src/error/mod.rs#L287
warning: missing documentation for a variant
--> src/error/mod.rs:287:5
|
287 | MissingKeyParam(KeyParam),
| ^^^^^^^^^^^^^^^
|
missing documentation for a variant:
src/error/mod.rs#L286
warning: missing documentation for a variant
--> src/error/mod.rs:286:5
|
286 | InvalidKeyId(Vec<u8>),
| ^^^^^^^^^^^^
|
missing documentation for a variant:
src/error/mod.rs#L285
warning: missing documentation for a variant
--> src/error/mod.rs:285:5
|
285 | DuplicateHeaders(Vec<Label>),
| ^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> src/lib.rs:308:9
|
308 | #![warn(missing_docs, rustdoc::missing_crate_level_docs)]
| ^^^^^^^^^^^^
|
using `clone` on type `bool` which implements the `Copy` trait:
src/token/cose/key.rs#L174
warning: using `clone` on type `bool` which implements the `Copy` trait
--> src/token/cose/key.rs:174:49
|
174 | Some(Value::Bool(b)) => (None, Some(b.clone())),
| ^^^^^^^^^ help: try dereferencing it: `*b`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
Test Suite (no_std)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test Suite (no_std)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Test Suite (no_std)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite (no_std)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite (no_std)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite (no_std)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite (no_std):
src/error/mod.rs#L20
unused import: `iana`
|
Test Suite (no_std):
src/token/mod.rs#L156
unused import: `alloc::vec::Vec`
|
Test Suite (no_std):
src/token/mod.rs#L162
unused imports: `CoseEncrypt0Builder`, `CoseEncrypt0`, `CoseEncryptBuilder`, `CoseEncrypt`, `CoseRecipientBuilder`, `CoseSignatureBuilder`, `EncryptionContext`, `HeaderBuilder`
|
Test Suite (no_std):
src/token/mod.rs#L170
unused imports: `CoseCipherError`, `MultipleCoseError`
|
Test Suite (no_std):
src/token/cose/sign.rs#L13
unused import: `crate::token::cose::header_util`
|
Test Suite (no_std):
src/token/cose/sign.rs#L14
unused import: `crate::token::cose::header_util::check_for_duplicate_headers`
|
Test Suite (no_std):
src/token/cose/sign.rs#L22
unused imports: `KeyType`, `Label`, `ProtectedHeader`
|
Test Suite (no_std):
src/token/cose/sign.rs#L275
unnecessary parentheses around pattern
|
Test Suite (no_std):
src/token/cose/sign.rs#L326
unnecessary parentheses around pattern
|
Test Suite (no_std):
src/token/mod.rs#L256
unused macro definition: `prepare_headers`
|
you are explicitly cloning with `.map()`:
src/token/cose/header_util.rs#L61
warning: you are explicitly cloning with `.map()`
--> src/token/cose/header_util.rs:61:13
|
61 | / duplicate_header_fields
62 | | .into_iter()
63 | | .map(Label::clone)
| |__________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
= note: `#[warn(clippy::map_clone)]` on by default
help: consider calling the dedicated `cloned` method
|
61 ~ duplicate_header_fields
62 + .into_iter().cloned()
|
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/token/cose/header_util.rs#L41
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/token/cose/header_util.rs:41:16
|
41 | param_vec: &'a Vec<(Label, Value)>,
| ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&'a [(Label, Value)]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
unneeded `return` statement:
src/token/cose/header_util.rs#L36
warning: unneeded `return` statement
--> src/token/cose/header_util.rs:36:5
|
36 | return header_bucket_fields;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
36 - return header_bucket_fields;
36 + header_bucket_fields
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/token/cose/crypto_impl/openssl.rs#L227
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/token/cose/crypto_impl/openssl.rs:227:9
|
227 | / &BigNum::from_slice(key.y.unwrap())
228 | | .map_err(CoseCipherError::<CoseOpensslCipherError>::from)?
229 | | .deref(),
| |____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
227 ~ BigNum::from_slice(key.y.unwrap())
228 + .map_err(CoseCipherError::<CoseOpensslCipherError>::from)?
229 ~ .deref(),
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/token/cose/crypto_impl/openssl.rs#L224
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/token/cose/crypto_impl/openssl.rs:224:9
|
224 | / &BigNum::from_slice(key.x.unwrap())
225 | | .map_err(CoseCipherError::<CoseOpensslCipherError>::from)?
226 | | .deref(),
| |____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
224 ~ BigNum::from_slice(key.x.unwrap())
225 + .map_err(CoseCipherError::<CoseOpensslCipherError>::from)?
226 ~ .deref(),
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/token/cose/crypto_impl/openssl.rs#L223
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/token/cose/crypto_impl/openssl.rs:223:9
|
223 | &group,
| ^^^^^^ help: change this to: `group`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/token/cose/crypto_impl/openssl.rs#L199
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/token/cose/crypto_impl/openssl.rs:199:9
|
199 | / &BigNum::from_slice(
200 | | // According to the contract of the trait, this should be ensured by the caller, so it's
201 | | // fine to panic here.
202 | | key.d
... |
205 | | .map_err(CoseCipherError::<CoseOpensslCipherError>::from)?
206 | | .deref(),
| |________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
199 ~ BigNum::from_slice(
200 + // According to the contract of the trait, this should be ensured by the caller, so it's
201 + // fine to panic here.
202 + key.d
203 + .expect("key provided to backend has no private component"),
204 + )
205 + .map_err(CoseCipherError::<CoseOpensslCipherError>::from)?
206 ~ .deref(),
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/token/cose/crypto_impl/openssl.rs#L167
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/token/cose/crypto_impl/openssl.rs:167:53
|
167 | let public_key = cose_ec2_to_ec_public_key(key, &group).map_err(CoseCipherError::from)?;
| ^^^^^^ help: change this to: `group`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/token/cose/crypto_impl/openssl.rs#L123
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/token/cose/crypto_impl/openssl.rs:123:55
|
123 | let private_key = cose_ec2_to_ec_private_key(key, &group).map_err(CoseCipherError::from)?;
| ^^^^^^ help: change this to: `group`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
duplicated attribute:
src/token/cose/crypto_impl/openssl.rs#L11
warning: duplicated attribute
--> src/token/cose/crypto_impl/openssl.rs:11:8
|
11 | #![cfg(feature = "openssl")]
| ^^^^^^^^^^^^^^^^^^^
|
note: first defined here
--> src/token/cose/crypto_impl/mod.rs:16:7
|
16 | #[cfg(feature = "openssl")]
| ^^^^^^^^^^^^^^^^^^^
help: remove this attribute
--> src/token/cose/crypto_impl/openssl.rs:11:8
|
11 | #![cfg(feature = "openssl")]
| ^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicated_attributes
= note: `#[warn(clippy::duplicated_attributes)]` on by default
|
this let-binding has unit value:
src/token/cose/sign.rs#L457
warning: this let-binding has unit value
--> src/token/cose/sign.rs:457:9
|
457 | / let verify = self.verify_signature(aad, |signature, toverify| {
458 | | try_verify(
459 | | backend,
460 | | key_provider,
... |
466 | | )
467 | | })?;
| |____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
|
457 ~ self.verify_signature(aad, |signature, toverify| {
458 + try_verify(
459 + backend,
460 + key_provider,
461 + &prot,
462 + &unprot,
463 + try_all_keys,
464 + signature,
465 + toverify,
466 + )
467 + })?;
|
|
unneeded `return` statement:
src/token/cose/sign.rs#L324
warning: unneeded `return` statement
--> src/token/cose/sign.rs:324:27
|
324 | move |tosign| return backend.verify_ecdsa(algorithm, &ec2_key, signature, tosign)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
324 | move |tosign| backend.verify_ecdsa(algorithm, &ec2_key, signature, tosign)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unneeded `return` statement:
src/token/cose/sign.rs#L273
warning: unneeded `return` statement
--> src/token/cose/sign.rs:273:27
|
273 | move |tosign| return backend.sign_ecdsa(algorithm, &ec2_key, tosign)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
273 | move |tosign| backend.sign_ecdsa(algorithm, &ec2_key, tosign)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
function `check_for_duplicate_headers` is never used:
src/token/cose/header_util.rs#L50
warning: function `check_for_duplicate_headers` is never used
--> src/token/cose/header_util.rs:50:15
|
50 | pub(crate) fn check_for_duplicate_headers<E: Display>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
function `create_header_parameter_set` is never used:
src/token/cose/header_util.rs#L9
warning: function `create_header_parameter_set` is never used
--> src/token/cose/header_util.rs:9:15
|
9 | pub(crate) fn create_header_parameter_set(header_bucket: &Header) -> BTreeSet<Label> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `e`:
src/token/cose/key.rs#L232
warning: unused variable: `e`
--> src/token/cose/key.rs:232:72
|
232 | let crv = EllipticCurve::from_cbor_value(crv.clone()).map_err(|e| {
| ^ help: if this is intentional, prefix it with an underscore: `_e`
|
unused variable: `e`:
src/token/cose/key.rs#L118
warning: unused variable: `e`
--> src/token/cose/key.rs:118:72
|
118 | let crv = EllipticCurve::from_cbor_value(crv.clone()).map_err(|e| {
| ^ help: if this is intentional, prefix it with an underscore: `_e`
|
unused variable: `verify`:
src/token/cose/sign.rs#L457
warning: unused variable: `verify`
--> src/token/cose/sign.rs:457:13
|
457 | let verify = self.verify_signature(aad, |signature, toverify| {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_verify`
|
= note: `#[warn(unused_variables)]` on by default
|
unused import: `EnumI64`:
src/token/cose/sign.rs#L19
warning: unused import: `EnumI64`
--> src/token/cose/sign.rs:19:36
|
19 | use coset::iana::{Ec2KeyParameter, EnumI64};
| ^^^^^^^
|
unused import: `Debug`:
src/token/mod.rs#L157
warning: unused import: `Debug`
--> src/token/mod.rs:157:17
|
157 | use core::fmt::{Debug, Display};
| ^^^^^
|
unused import: `Display`:
src/token/mod.rs#L157
warning: unused import: `Display`
--> src/token/mod.rs:157:24
|
157 | use core::fmt::{Debug, Display};
| ^^^^^^^
|
unused import: `RngCore`:
src/token/mod.rs#L167
warning: unused import: `RngCore`
--> src/token/mod.rs:167:23
|
167 | use rand::{CryptoRng, RngCore};
| ^^^^^^^
|
unused import: `CryptoRng`:
src/token/mod.rs#L167
warning: unused import: `CryptoRng`
--> src/token/mod.rs:167:12
|
167 | use rand::{CryptoRng, RngCore};
| ^^^^^^^^^
|
unused macro definition: `prepare_headers`:
src/token/mod.rs#L256
warning: unused macro definition: `prepare_headers`
--> src/token/mod.rs:256:14
|
256 | macro_rules! prepare_headers {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_macros)]` on by default
|
unused import: `std::convert::Infallible`:
src/token/cose/key.rs#L7
warning: unused import: `std::convert::Infallible`
--> src/token/cose/key.rs:7:5
|
7 | use std::convert::Infallible;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `std::convert::Infallible`:
src/token/cose/crypto_impl/openssl.rs#L29
warning: unused import: `std::convert::Infallible`
--> src/token/cose/crypto_impl/openssl.rs:29:5
|
29 | use std::convert::Infallible;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
unused imports: `CoseKey`, `Header`, `Label`, `ProtectedHeader`:
src/token/cose/crypto_impl/openssl.rs#L20
warning: unused imports: `CoseKey`, `Header`, `Label`, `ProtectedHeader`
--> src/token/cose/crypto_impl/openssl.rs:20:30
|
20 | use coset::{iana, Algorithm, CoseKey, Header, Label, ProtectedHeader};
| ^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^
|
unused import: `coset::iana::EnumI64`:
src/token/cose/crypto_impl/openssl.rs#L19
warning: unused import: `coset::iana::EnumI64`
--> src/token/cose/crypto_impl/openssl.rs:19:5
|
19 | use coset::iana::EnumI64;
| ^^^^^^^^^^^^^^^^^^^^
|
unused import: `ciborium::value::Value`:
src/token/cose/crypto_impl/openssl.rs#L17
warning: unused import: `ciborium::value::Value`
--> src/token/cose/crypto_impl/openssl.rs:17:5
|
17 | use ciborium::value::Value;
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::token::cose::header_util::find_param_by_label`:
src/token/cose/crypto_impl/openssl.rs#L13
warning: unused import: `crate::token::cose::header_util::find_param_by_label`
--> src/token/cose/crypto_impl/openssl.rs:13:5
|
13 | use crate::token::cose::header_util::find_param_by_label;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unnecessary parentheses around pattern:
src/token/cose/sign.rs#L326
warning: unnecessary parentheses around pattern
--> src/token/cose/sign.rs:326:13
|
326 | v @ (Algorithm::Assigned(_)) => {
| ^ ^
|
help: remove these parentheses
|
326 - v @ (Algorithm::Assigned(_)) => {
326 + v @ Algorithm::Assigned(_) => {
|
|
unnecessary parentheses around pattern:
src/token/cose/sign.rs#L275
warning: unnecessary parentheses around pattern
--> src/token/cose/sign.rs:275:13
|
275 | v @ (Algorithm::Assigned(_)) => {
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
275 - v @ (Algorithm::Assigned(_)) => {
275 + v @ Algorithm::Assigned(_) => {
|
|
unused imports: `KeyType`, `Label`, `ProtectedHeader`:
src/token/cose/sign.rs#L22
warning: unused imports: `KeyType`, `Label`, `ProtectedHeader`
--> src/token/cose/sign.rs:22:42
|
22 | CoseSignature, Header, KeyOperation, KeyType, Label, ProtectedHeader, RegisteredLabel,
| ^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^
|
unused import: `crate::token::cose::header_util::check_for_duplicate_headers`:
src/token/cose/sign.rs#L14
warning: unused import: `crate::token::cose::header_util::check_for_duplicate_headers`
--> src/token/cose/sign.rs:14:5
|
14 | use crate::token::cose::header_util::check_for_duplicate_headers;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `crate::token::cose::header_util`:
src/token/cose/sign.rs#L13
warning: unused import: `crate::token::cose::header_util`
--> src/token/cose/sign.rs:13:5
|
13 | use crate::token::cose::header_util;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused imports: `CoseCipherError`, `MultipleCoseError`:
src/token/mod.rs#L170
warning: unused imports: `CoseCipherError`, `MultipleCoseError`
--> src/token/mod.rs:170:38
|
170 | use crate::error::{AccessTokenError, CoseCipherError, MultipleCoseError};
| ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
|
unused imports: `CoseEncrypt0Builder`, `CoseEncrypt0`, `CoseEncryptBuilder`, `CoseEncrypt`, `CoseRecipientBuilder`, `CoseSignatureBuilder`, `EncryptionContext`, `HeaderBuilder`:
src/token/mod.rs#L162
warning: unused imports: `CoseEncrypt0Builder`, `CoseEncrypt0`, `CoseEncryptBuilder`, `CoseEncrypt`, `CoseRecipientBuilder`, `CoseSignatureBuilder`, `EncryptionContext`, `HeaderBuilder`
--> src/token/mod.rs:162:36
|
162 | AsCborValue, CborSerializable, CoseEncrypt, CoseEncrypt0, CoseEncrypt0Builder,
| ^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
163 | CoseEncryptBuilder, CoseKey, CoseRecipientBuilder, CoseSign, CoseSign1, CoseSign1Builder,
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
164 | CoseSignBuilder, CoseSignature, CoseSignatureBuilder, EncryptionContext, Header, HeaderBuilder,
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
|
unused import: `alloc::vec::Vec`:
src/token/mod.rs#L156
warning: unused import: `alloc::vec::Vec`
--> src/token/mod.rs:156:5
|
156 | use alloc::vec::Vec;
| ^^^^^^^^^^^^^^^
|
unused import: `iana`:
src/error/mod.rs#L20
warning: unused import: `iana`
--> src/error/mod.rs:20:13
|
20 | use coset::{iana, Algorithm, CoseError, KeyOperation, KeyType, Label};
| ^^^^
|
unused import: `std::convert::Infallible`:
src/error/mod.rs#L17
warning: unused import: `std::convert::Infallible`
--> src/error/mod.rs:17:5
|
17 | use std::convert::Infallible;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
clippy_check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Check (no_std)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Check (no_std)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Check (no_std)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check (no_std)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check (no_std)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check (no_std)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check (no_std):
src/error/mod.rs#L20
unused import: `iana`
|
Check (no_std):
src/token/mod.rs#L156
unused import: `alloc::vec::Vec`
|
Check (no_std):
src/token/mod.rs#L162
unused imports: `CoseEncrypt0Builder`, `CoseEncrypt0`, `CoseEncryptBuilder`, `CoseEncrypt`, `CoseRecipientBuilder`, `CoseSignatureBuilder`, `EncryptionContext`, `HeaderBuilder`
|
Check (no_std):
src/token/mod.rs#L170
unused imports: `CoseCipherError`, `MultipleCoseError`
|
Check (no_std):
src/token/cose/sign.rs#L13
unused import: `crate::token::cose::header_util`
|
Check (no_std):
src/token/cose/sign.rs#L14
unused import: `crate::token::cose::header_util::check_for_duplicate_headers`
|
Check (no_std):
src/token/cose/sign.rs#L22
unused imports: `KeyType`, `Label`, `ProtectedHeader`
|
Check (no_std):
src/token/cose/sign.rs#L275
unnecessary parentheses around pattern
|
Check (no_std):
src/token/cose/sign.rs#L326
unnecessary parentheses around pattern
|
Check (no_std):
src/token/mod.rs#L256
unused macro definition: `prepare_headers`
|
Check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Check:
src/error/mod.rs#L17
unused import: `std::convert::Infallible`
|
Check:
src/error/mod.rs#L20
unused import: `iana`
|
Check:
src/token/mod.rs#L156
unused import: `alloc::vec::Vec`
|
Check:
src/token/mod.rs#L162
unused imports: `CoseEncrypt0Builder`, `CoseEncrypt0`, `CoseEncryptBuilder`, `CoseEncrypt`, `CoseRecipientBuilder`, `CoseSignatureBuilder`, `EncryptionContext`, `HeaderBuilder`
|
Check:
src/token/mod.rs#L170
unused imports: `CoseCipherError`, `MultipleCoseError`
|
Check:
src/token/cose/sign.rs#L13
unused import: `crate::token::cose::header_util`
|
Check:
src/token/cose/sign.rs#L14
unused import: `crate::token::cose::header_util::check_for_duplicate_headers`
|
Check:
src/token/cose/sign.rs#L22
unused imports: `KeyType`, `Label`, `ProtectedHeader`
|
Check:
src/token/cose/sign.rs#L275
unnecessary parentheses around pattern
|
Check:
src/token/cose/sign.rs#L326
unnecessary parentheses around pattern
|
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test_coverage
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
test_coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
|
test_coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test_coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test_coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test_coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test Suite
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Test Suite
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test Suite:
src/error/mod.rs#L17
unused import: `std::convert::Infallible`
|
Test Suite:
src/error/mod.rs#L20
unused import: `iana`
|
Test Suite:
src/token/mod.rs#L156
unused import: `alloc::vec::Vec`
|
Test Suite:
src/token/mod.rs#L162
unused imports: `CoseEncrypt0Builder`, `CoseEncrypt0`, `CoseEncryptBuilder`, `CoseEncrypt`, `CoseRecipientBuilder`, `CoseSignatureBuilder`, `EncryptionContext`, `HeaderBuilder`
|
Test Suite:
src/token/mod.rs#L170
unused imports: `CoseCipherError`, `MultipleCoseError`
|
Test Suite:
src/token/cose/sign.rs#L13
unused import: `crate::token::cose::header_util`
|
Test Suite:
src/token/cose/sign.rs#L14
unused import: `crate::token::cose::header_util::check_for_duplicate_headers`
|
Test Suite:
src/token/cose/sign.rs#L22
unused imports: `KeyType`, `Label`, `ProtectedHeader`
|
Test Suite:
src/token/cose/sign.rs#L275
unnecessary parentheses around pattern
|
Test Suite:
src/token/cose/sign.rs#L326
unnecessary parentheses around pattern
|