Peter Schellenbach's patch: re-implement the PuTTY cryptographic
[u/mdw/putty] / window.c
index 83e709e..8a87584 100644 (file)
--- a/window.c
+++ b/window.c
@@ -474,8 +474,12 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
        DeleteObject(pal);
     WSACleanup();
 
-    if (cfg.protocol == PROT_SSH)
+    if (cfg.protocol == PROT_SSH) {
        random_save_seed();
+#ifdef MSCRYPTOAPI
+       crypto_wrapup();
+#endif
+    }
 
     return msg.wParam;
 }