Skip to content

Commit

Permalink
Change from eager to lazy evaluation on error branch. Otherwise confu…
Browse files Browse the repository at this point in the history
…sing error logging appears
  • Loading branch information
ohuopio committed Mar 7, 2024
1 parent 5768ad6 commit 82ab8b6
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,13 @@ impl Authentication for AuthenticationBuiltin {
//
let certificate_algorithm = identity_certificate
.key_algorithm()
.ok_or(create_security_error!(
"Identity Certificate specifies no public key algorithm"
))
.ok_or_else(|| {
create_security_error!("Identity Certificate specifies no public key algorithm")
})
.and_then(CertificateAlgorithm::try_from)?;
let ca_algorithm = identity_ca
.key_algorithm()
.ok_or(create_security_error!(
"CA Certificate specifies no public key algorithm"
))
.ok_or_else(|| create_security_error!("CA Certificate specifies no public key algorithm"))
.and_then(CertificateAlgorithm::try_from)?;

let identity_token = BuiltinIdentityToken {
Expand Down

0 comments on commit 82ab8b6

Please sign in to comment.