class

LocalSend::Identity

Inherits Reference < Object

The local device identity and its TLS material.

LocalSend identifies devices by certificate fingerprint, not a CA. Share one identity between Discovery, Client, and Receiver.

The caller chooses where to store the certificate and private key.

Constants

Log = LocalSend::Log.for("identity")

Constructors

load_or_create(dir : Path, alias name : String, device_model : String | Nil = nil, device_type : DeviceType | Symbol = DeviceType::Headless) : Identity

Loads the identity from dir, creating a self-signed certificate if needed.

Source
new(alias __arg0 : String, certificate_path : String, private_key_path : String, device_model : Nil | String = nil, device_type : LocalSend::DeviceType = DeviceType::Headless)
Source

Class methods

normalize(hash : String) : String

Peers may use uppercase letters and colons in the same fingerprint.

Source

Instance methods

alias
Source
certificate_path
Source
device_model
Source
device_type
Source
fingerprint

SHA-256 fingerprint announced to peers.

Source
private_key_path
Source