Function sovrin::api::signus::sovrin_verify_signature
[−]
[src]
#[no_mangle]pub extern "C" fn sovrin_verify_signature(
command_handle: i32,
wallet_handle: i32,
pool_handle: i32,
did: *const c_char,
signed_msg: *const c_char,
cb: Option<extern "C" fn(_: i32, _: ErrorCode, _: bool)>
) -> ErrorCode
Verify a signature created by a key associated with a DID. If a secure wallet doesn't contain a verkey associated with the given DID, then verkey is read from the Ledger. Otherwise either an existing verkey from wallet is used (see wallet_store_their_identity), or it checks the Ledger (according to freshness settings set during initialization) whether verkey is still the same and updates verkey for the DID if needed.
Params
wallet_handle: wallet handler (created by open_wallet). command_handle: command handle to map callback to user context. pool_handle: pool handle. did: DID that signed the message msg: message signature: a signature to be verified cb: Callback that takes command result as parameter.
Returns
valid: true - if signature is valid, false - otherwise
Errors
Common* Wallet* Ledger* Crypto*