Changeset View
Changeset View
Standalone View
Standalone View
keyserver/addons/rust-node-addon/src/identity_client/register_user.rs
Show All 21 Lines | ) -> Result<bool> { | ||||
); | ); | ||||
// Start OPAQUE registration and send initial registration request | // Start OPAQUE registration and send initial registration request | ||||
let mut opaque_registration = comm_opaque2::client::Registration::new(); | let mut opaque_registration = comm_opaque2::client::Registration::new(); | ||||
let opaque_registration_request = opaque_registration | let opaque_registration_request = opaque_registration | ||||
.start(&password) | .start(&password) | ||||
.map_err(|_| Error::from_status(Status::GenericFailure))?; | .map_err(|_| Error::from_status(Status::GenericFailure))?; | ||||
let device_key_upload = DeviceKeyUpload { | let device_key_upload = DeviceKeyUpload { | ||||
device_key_info: Some(IdentityKeyInfo { | device_key_info: Some(ContentKeyInfo { | ||||
payload: signed_identity_keys_blob.payload, | payload: signed_identity_keys_blob.payload, | ||||
payload_signature: signed_identity_keys_blob.signature, | payload_signature: signed_identity_keys_blob.signature, | ||||
social_proof: None, | social_proof: None, | ||||
}), | }), | ||||
identity_upload: Some(identity_client::PreKey { | content_upload: Some(identity_client::PreKey { | ||||
pre_key: String::new(), | pre_key: String::new(), | ||||
pre_key_signature: String::new(), | pre_key_signature: String::new(), | ||||
}), | }), | ||||
notif_upload: Some(identity_client::PreKey { | notif_upload: Some(identity_client::PreKey { | ||||
pre_key: String::new(), | pre_key: String::new(), | ||||
pre_key_signature: String::new(), | pre_key_signature: String::new(), | ||||
}), | }), | ||||
onetime_identity_prekeys: Vec::new(), | onetime_content_prekeys: Vec::new(), | ||||
onetime_notif_prekeys: Vec::new(), | onetime_notif_prekeys: Vec::new(), | ||||
}; | }; | ||||
let registration_start_request = Request::new(RegistrationStartRequest { | let registration_start_request = Request::new(RegistrationStartRequest { | ||||
opaque_registration_request, | opaque_registration_request, | ||||
username, | username, | ||||
device_key_upload: Some(device_key_upload), | device_key_upload: Some(device_key_upload), | ||||
}); | }); | ||||
Show All 28 Lines |