Conversation
… sub-variants + fix C FFI Replace the catch-all VerificationError(String) with 5 specific variants: IssuerSignatureFailed, DeviceSignatureFailed, AttestationExpired, AttestationRevoked, TimestampInFuture. Each gets a distinct error_code() and suggestion(). Update all 11 construction sites across auths-verifier and auths-id. Replace C FFI TECH-DEBT string matching with error_code() dispatch via new attestation_error_to_code() helper. Add ERR_VERIFY_FUTURE_TIMESTAMP constant. Update CLI renderer docs_url() and tests.
…ASM verification results Python FFI: Add error_code field to VerificationResult, populate from AuthsErrorInfo::error_code() at all error paths. Use bracket-prefix format [AUTHS_CODE] for exception messages. WASM: Add error_code field to WasmVerificationResult. Change internal verify functions to return AttestationError instead of String, preserving typed error info. Include error_code in chain verification JSON responses.
…ased dispatch Delete _map_verify_error() and _map_sign_error(). Add _ERROR_CODE_MAP dict covering all AUTHS_* error codes with Python error class mappings. Add _map_error() that parses bracket-prefix [AUTHS_CODE] format from FFI exception messages and dispatches to the correct Python error class. Update all call sites in _client.py.
…orrect Python exception types - FFI: match on AttestationError variants directly instead of error_code() strings for compiler exhaustiveness - WASM: replace hand-rolled format! JSON with serde_json::json!() to prevent malformed output - Python: add default_cls param to _map_error(), signing paths now default to CryptoError - Python: remove stale AUTHS_VERIFICATION_ERROR from code map, use AUTHS_ISSUER_SIG_FAILED in sign.rs - Fix pre-existing clippy errors in auths-python: remove dead keychain-pkcs11 cfg, allow presentation-boundary Utc::now()/env::var
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VerificationError(String)into 5 structured sub-variants with unique error codes and suggestionserror_codefield to Python FFI and WASM verification resultsCommits
VerificationError(String)→IssuerSignatureFailed,DeviceSignatureFailed,AttestationExpired,AttestationRevoked,TimestampInFutureerror_codeto PythonVerificationResultand WASMWasmVerificationResultattestation_error_to_code()_map_verify_error/_map_sign_errorwith code-based_map_error()Test plan
cargo nextest run --workspace— 1593 tests passcargo clippy --all-targets --all-features -- -D warningscleancargo clippyclean on auths-python