Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Unable to process attestation result when carrying Veraison's "key attestation" claims #7

Closed
thomas-fossati opened this issue Jan 11, 2024 · 1 comment · Fixed by #8
Assignees

Comments

@thomas-fossati
Copy link
Contributor

Running:

let ear = Ear::from_jwt(    // Ear comes from rust-ear
    &attestation_result,
    jwt::Algorithm::ES256,  // jwt comes from jsonwebtoken
    &jwt::DecodingKey::from_ec_pem(
        verification_api
            .ear_verification_key_as_pem()
            .unwrap()
            .as_bytes()
    ).unwrap()
);

let ear = match ear {
    Err(e) => {
        println!("Unable to process attestation result ({})", e);
        return -1
    },
    Ok(r) => r,
};

Using:

Returns:

Unable to process attestation result (verify error: JSON error: expected `,` or `}` at line 1 column 1382)

Reported by @gbryant-arm

@thomas-fossati thomas-fossati self-assigned this Jan 11, 2024
@thomas-fossati
Copy link
Contributor Author

The slightly confusing error from serde stems from the fact that "ear.veraison.key-attestation" is not handled in the submod parsing loop:

match map.next_key::<&str>()? {

thomas-fossati added a commit that referenced this issue Jan 11, 2024
Fix #7

Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
thomas-fossati added a commit that referenced this issue Jan 11, 2024
Fix #7

Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant