Skip to content

Commit dabf360

Browse files
committed
fix: send publickey instead of encrypted one
1 parent 06455d1 commit dabf360

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/backend/src/service/payload_sec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,15 @@ impl PayloadSecurityServiceTrait for PayloadSecurityService {
270270
.map_err(|e| KeypairError::Yabai(e.to_string()))?;
271271

272272
let payload = EphemeralMasterKeyPair {
273-
public_key: enc_pk,
273+
public_key: enc_pk.clone(),
274274
private_key: enc_secret,
275275
keypair_hash: BASE64URL.encode(&hashed),
276276
};
277277

278278
return match self.master_repository.insert_keypair(payload.clone()).await {
279279
Ok(()) => Ok(MasterPKResponse {
280280
id: String::default(),
281-
public_key: BASE64.encode(&payload.public_key),
281+
public_key: BASE64.encode(&pk),
282282
keypair_hash: BASE64URL.encode(&hashed)
283283
}),
284284
Err(e) => Err(KeypairError::CreationError(e.to_string())),

crates/corelib/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ sha2 = {version = "0.10.7", default-features = false}
1414
hkdf = {version = "0.12.3", default-features = false}
1515
thiserror = "1.0.40"
1616
axum = { version = "0.6.3", features = ["json", "tokio"] }
17-
rand_core = {version = "0.6.4", default-features = false }
18-
rand_chacha = {version = "0.3.1"}
17+
rand_core = {version = "0.6.4", default-features = false }

0 commit comments

Comments
 (0)