mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-16 07:08:32 +03:00
This commit is contained in:
parent
53e4dd8c2d
commit
17f17a80f8
6
.changes/cli-private-key-pwd-panic.md
Normal file
6
.changes/cli-private-key-pwd-panic.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"cli.rs": patch
|
||||||
|
"cli.js": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Do not panic if the updater private key password is wrong.
|
@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
use anyhow::Context;
|
||||||
use base64::{decode, encode};
|
use base64::{decode, encode};
|
||||||
use minisign::{sign, KeyPair as KP, SecretKeyBox};
|
use minisign::{sign, KeyPair as KP, SecretKeyBox};
|
||||||
use std::{
|
use std::{
|
||||||
@ -109,8 +110,11 @@ where
|
|||||||
P: AsRef<Path>,
|
P: AsRef<Path>,
|
||||||
{
|
{
|
||||||
let decoded_secret = decode_key(private_key)?;
|
let decoded_secret = decode_key(private_key)?;
|
||||||
let sk_box = SecretKeyBox::from_string(&decoded_secret).unwrap();
|
let sk_box = SecretKeyBox::from_string(&decoded_secret)
|
||||||
let sk = sk_box.into_secret_key(password).unwrap();
|
.with_context(|| "failed to load updater private key")?;
|
||||||
|
let sk = sk_box
|
||||||
|
.into_secret_key(password)
|
||||||
|
.with_context(|| "incorrect updater private key password")?;
|
||||||
|
|
||||||
// We need to append .sig at the end it's where the signature will be stored
|
// We need to append .sig at the end it's where the signature will be stored
|
||||||
let signature_path_string = format!("{}.sig", bin_path.as_ref().display());
|
let signature_path_string = format!("{}.sig", bin_path.as_ref().display());
|
||||||
|
Loading…
Reference in New Issue
Block a user