Load an identity for VERIFICATION only — the public key, never a secret key. The external-signing flow (`--prepare`/`--signed`) must work for an identity whose key is held elsewhere, so it may not touch the key store. The name is required: an unbound caller cannot borrow the daemon's default human key by signing as nobody (CONTRACT "Sandbox and vault writes": unbound grants cannot use daemon defau
(name: &str)
| 3008 | /// default human key by signing as nobody (CONTRACT "Sandbox and vault |
| 3009 | /// writes": unbound grants cannot use daemon default human keys). |
| 3010 | fn load_identity_public(name: &str) -> Result<Identity, Status> { |
| 3011 | let store = IdentityStore::open_default() |
| 3012 | .map_err(|error| domain_status(ErrorCode::Internal, format!("identity store: {error}")))?; |
| 3013 | if name.is_empty() { |
| 3014 | return Err(domain_status( |
| 3015 | ErrorCode::InvalidArgument, |
| 3016 | "an externally-signed attestation names the identity it is signed by", |
| 3017 | )); |
| 3018 | } |
| 3019 | store |
| 3020 | .load_by_name(name) |
| 3021 | .map_err(|error| domain_status(ErrorCode::NotFound, format!("identity '{name}': {error}"))) |
| 3022 | } |
| 3023 | |
| 3024 | // Resolve verification material only. Never open/create an identity store or |
| 3025 | // load a secret key; the proof's DID, not the default identity, selects a signer. |
no test coverage detected