Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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