OxL Справочник OxL
РусскийEnglish

data ClientTls

tls: of S.connect(addr, tls: …) (§13.1): a CA file to trust and a pinned certificate hash.

Example:

oxl✓ проверяется в CI
service Bank {
  @public rpc balance(id: u64) -> i64
}

impl Bank {
  rpc balance(id) => 0
}

fn external() -> i64 | NetError net {
  let tls = ClientTls{ ca: "ca.pem" }
  Bank.connect("bank.example.org:7443", tls: tls).balance(1)
}
pub(api) data ClientTls

С версии. 1.0.0-beta

Поля

pub(api) ca: str? = none

File with the certificate authorities to trust; none for the system roots.

pub(api) pin: str? = none

Hex SHA-256 of the server certificate to require; none for no pin.

Определено в: std/core/rpc.oxl:342

См. также