sbidy / KeePass-KeyManager

A public key manager to manage mutlible x509 certificates for a KeePass password database.
GNU General Public License v3.0
38 stars 6 forks source link

Error on key creation #1

Closed sbidy closed 6 years ago

sbidy commented 6 years ago

If a user selects an "bad" initial certificate for encryption, the following exception occurs:

System.Security.Cryptography.CryptographicException: Bad Key.

   at System.Security.Cryptography.Pkcs.EnvelopedCms.DecryptContent(RecipientInfoCollection recipientInfos, X509Certificate2Collection extraStore)
   at KeyManagerUI.Certmanager.DecryptMsg(Byte[] encodedEnvelopedCms)
   at KeyManagerUI.KeyManagerUIForm.change_click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)