mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
stub libsignal::ProvisioningUuid
This commit is contained in:
parent
8951a6d72f
commit
2e2d536dc8
2 changed files with 19 additions and 3 deletions
|
|
@ -154,13 +154,12 @@ impl Manager {
|
|||
log::info!("provisioning websocket established to {host}");
|
||||
match ws.read() {
|
||||
Ok(Message::Binary(uuid)) => {
|
||||
log::info!("raw uuid ProtoBuffer: {:?}", uuid);
|
||||
let uuid = "TODO decode uuid ProtoBuffer";
|
||||
let uuid = libsignal::ProvisioningUuid::decode(uuid).id.clone();
|
||||
let identity_key_pair = libsignal::generate_identity_key_pair();
|
||||
let pub_key = identity_key_pair.djb_identity_key.key.clone();
|
||||
match url::Url::parse_with_params(
|
||||
"sgnl://linkdevice",
|
||||
&[("uuid", &uuid), ("pub_key", &pub_key.as_str())],
|
||||
&[("uuid", &uuid.as_str()), ("pub_key", &pub_key.as_str())],
|
||||
) {
|
||||
Ok(device_link_uri) => {
|
||||
log::info!("device_link_uri: {device_link_uri}");
|
||||
|
|
|
|||
|
|
@ -2,6 +2,23 @@
|
|||
|
||||
|
||||
|
||||
// https://github.com/signalapp/Signal-Android/blob/d2053d2db7b1b930b7058ce5506dd6037ac3b808/libsignal-service/src/main/protowire/Provisioning.proto#L13C9-L15
|
||||
//
|
||||
// message ProvisioningUuid {
|
||||
// optional string uuid = 1;
|
||||
// }
|
||||
pub struct ProvisioningUuid {
|
||||
pub id : String,
|
||||
}
|
||||
impl ProvisioningUuid {
|
||||
pub fn decode(bytes: Vec<u8>) -> ProvisioningUuid {
|
||||
log::info!("raw uuid Protocol Buffer: {:?}", bytes);
|
||||
ProvisioningUuid {id : "TODO decode uuid Protocol Buffer".to_string()}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
// use org.signal.libsignal.protocol.IdentityKey;
|
||||
pub struct IdentityKey {
|
||||
pub key:String,
|
||||
|
|
|
|||
Loading…
Reference in a new issue