Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob-Hague committed Nov 5, 2023
1 parent 826222f commit 8619062
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 780 deletions.
9 changes: 8 additions & 1 deletion src/Renci.SshNet/PrivateKeyFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,14 @@ private static Key ParseOpenSshV1Key(byte[] keyFileData, string passPhrase)
throw new SshException("Cipher '" + cipherName + "' is not supported for an OpenSSH key.");
}

privateKeyBytes = cipher.Decrypt(privateKeyBytes);
try
{
privateKeyBytes = cipher.Decrypt(privateKeyBytes);
}
finally
{
cipher.Dispose();
}
}

// validate private key length
Expand Down
Loading

0 comments on commit 8619062

Please sign in to comment.