diff --git a/identity_core/src/custom_time.rs b/identity_core/src/custom_time.rs index a0c8aca381..ef509a19de 100644 --- a/identity_core/src/custom_time.rs +++ b/identity_core/src/custom_time.rs @@ -1,3 +1,6 @@ +// Copyright 2020-2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + //! An implementation of `now_utc` which calls out to an externally defined function. use crate::common::Timestamp; diff --git a/identity_core/tests/custom_time.rs b/identity_core/tests/custom_time.rs index e60ca6eb67..9c700d523e 100644 --- a/identity_core/tests/custom_time.rs +++ b/identity_core/tests/custom_time.rs @@ -1,3 +1,6 @@ +// Copyright 2020-2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + use identity_core::common::Timestamp; use identity_core::register_custom_now_utc; diff --git a/identity_jose/src/tests/rfc8037.rs b/identity_jose/src/tests/rfc8037.rs index aada7a7369..0d0904810f 100644 --- a/identity_jose/src/tests/rfc8037.rs +++ b/identity_jose/src/tests/rfc8037.rs @@ -49,21 +49,18 @@ fn test_rfc8037_ed25519() { .decode_compact_serialization(jws.as_bytes(), None) .and_then(|decoded| decoded.verify(&jws_verifier, &public)) .unwrap(); + let jws_signature_verifier = JwsVerifierFn::from(|input: VerificationInput, key: &Jwk| match input.alg { + JwsAlgorithm::EdDSA => ed25519::verify(input, key), + other => unimplemented!("{other}"), + }); - #[cfg(feature = "eddsa")] - { - let jws_signature_verifier = JwsVerifierFn::from(|input: VerificationInput, key: &Jwk| match input.alg { - JwsAlgorithm::EdDSA => ed25519::verify(input, key), - other => unimplemented!("{other}"), - }); + let decoder = Decoder::new(); + let token_with_default = decoder + .decode_compact_serialization(jws.as_bytes(), None) + .and_then(|decoded| decoded.verify(&jws_signature_verifier, &public)) + .unwrap(); - let decoder = Decoder::new(); - let token_with_default = decoder - .decode_compact_serialization(jws.as_bytes(), None) - .and_then(|decoded| decoded.verify(&jws_signature_verifier, &public)) - .unwrap(); - assert_eq!(token, token_with_default); - } + assert_eq!(token, token_with_default); assert_eq!(token.protected, header); assert_eq!(token.claims, tv.payload.as_bytes()); }