plugin_framework, add peer id for plugin signature
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
97e9682757
commit
cc46fd59fc
@ -80,6 +80,7 @@ pub(super) struct MsgToExtSupport {
|
|||||||
|
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
struct PluginSignReq {
|
struct PluginSignReq {
|
||||||
|
peer_id: String,
|
||||||
plugin_id: String,
|
plugin_id: String,
|
||||||
version: String,
|
version: String,
|
||||||
msg: Vec<u8>,
|
msg: Vec<u8>,
|
||||||
@ -282,7 +283,10 @@ fn request_plugin_sign(id: String, msg_to_rustdesk: MsgToRustDesk) -> PluginRetu
|
|||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
let sign_url = format!("{}/lic/web/api/plugin-sign", get_api_server());
|
let sign_url = format!("{}/lic/web/api/plugin-sign", get_api_server());
|
||||||
let client = reqwest::blocking::Client::new();
|
let client = reqwest::blocking::Client::new();
|
||||||
|
// to-do: Add peer id and plugin_id in the message to sign.
|
||||||
|
// So that the server can verify the ids.
|
||||||
let req = PluginSignReq {
|
let req = PluginSignReq {
|
||||||
|
peer_id: crate::ui_interface::get_id(),
|
||||||
plugin_id: id.clone(),
|
plugin_id: id.clone(),
|
||||||
version: signature_data.version,
|
version: signature_data.version,
|
||||||
msg: signature_data.data,
|
msg: signature_data.data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user