Skip to main content

encode_credential

Function encode_credential 

Source
pub fn encode_credential(user_key: &PublicKey, cert: &NodeCert) -> Vec<u8> ⓘ
Expand description

A guest credential (since 0.5.9): this device’s certificate plus its user’s public key (protobuf), so a node of a different user can check the certificate (a NodeCert names its user only by id). Present it with requests to a shared pool (pool::connect_shared does). Public: it holds no secret.

Wire: CBOR map {"guest": 1, "key": <bytes>, "cert": <NodeCert>}. Hosts before 0.5.9 can’t read it as a certificate and refuse the caller (wrong-user), so it never widens access.