You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib.rs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,12 @@ pub fn sign<R>(
76
76
where
77
77
R:Read,
78
78
{
79
+
if sk.is_encrypted(){
80
+
returnErr(PError::new(
81
+
ErrorKind::EncryptedKey,
82
+
"Cannot sign with an encrypted secret key. The key must be decrypted first. Options include: SecretKeyBox::into_secret_key(password), SecretKey::from_box(box, password), SecretKey::from_file(path, password), or use KeyPair::generate_unencrypted_keypair() for passwordless keys.",
0 commit comments