mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Add gpgui-helper (#326)
This commit is contained in:
@@ -6,6 +6,7 @@ use gpapi::{
|
||||
utils::{crypto::Crypto, lock_file::LockFile, redact::Redaction},
|
||||
};
|
||||
use log::{info, warn};
|
||||
use serde::de::DeserializeOwned;
|
||||
use tokio::{
|
||||
net::TcpListener,
|
||||
sync::{mpsc, watch, RwLock},
|
||||
@@ -38,6 +39,10 @@ impl WsServerContext {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn decrypt<T: DeserializeOwned>(&self, encrypted: Vec<u8>) -> anyhow::Result<T> {
|
||||
self.crypto.decrypt(encrypted)
|
||||
}
|
||||
|
||||
pub async fn send_event(&self, event: WsEvent) {
|
||||
let connections = self.connections.read().await;
|
||||
|
||||
|
Reference in New Issue
Block a user