]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - pageant.c
Pass the ssh_signkey structure itself to public key methods.
[PuTTY.git] / pageant.c
index 2bb1c8f55cef2cdca20634d030b16634c476b486..d1db8623e5b917d58a091a0336cfb8e1bd457a9e 100644 (file)
--- a/pageant.c
+++ b/pageant.c
@@ -674,7 +674,7 @@ void *pageant_handle_msg(const void *msg, int msglen, int *outlen,
            }
 
            bloblen = msgend - p;
-           key->data = key->alg->openssh_createkey(&p, &bloblen);
+           key->data = key->alg->openssh_createkey(key->alg, &p, &bloblen);
            if (!key->data) {
                sfree(key);
                 fail_reason = "key setup failed";
@@ -1172,6 +1172,9 @@ static tree234 *passphrases = NULL;
  */
 void pageant_forget_passphrases(void)
 {
+    if (!passphrases)                  /* in case we never set it up at all */
+        return;
+
     while (count234(passphrases) > 0) {
        char *pp = index234(passphrases, 0);
        smemclr(pp, strlen(pp));