NB! This project is outdated and unmaintained, please refer to the OpenSC WindowsInstaller instead!

Changeset 20


Ignore:
Timestamp:
06/06/05 10:31:45 (7 years ago)
Author:
aj
Message:

first try at 0.4rc2

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r19 r20  
     1Smart card bundle 0.4rc2 
     2 * added Pageant patch by Kevin Stefanik 
     3 
    14Smart card bundle 0.4rc1 
    25 * Add RSA PKCS#11 copyright information 
  • trunk/MANIFEST

    r17 r20  
    22======================= 
    33 
    4 scb-0.4rc1.exe 
     4scb-0.4rc2.exe 
    55        Smart card bundle 0.4rc1 
    66        with OpenSSL 0.9.7g, OpenSC 0.9.6 
  • trunk/putty-0.58-smartcard.diff

    r18 r20  
    11diff -udrNP putty-0.58.orig/Recipe putty-0.58/Recipe 
    22--- putty-0.58.orig/Recipe      2005-04-05 21:37:51.000000000 +0200 
    3 +++ putty-0.58/Recipe   2005-05-11 17:53:09.000000000 +0200 
     3+++ putty-0.58/Recipe   2005-06-06 12:14:36.878106032 +0200 
    44@@ -205,7 +205,7 @@ 
    55 # SSH back end (putty, plink, pscp, psftp). 
     
    1111 UXSSH    = SSH uxnoise uxagentc 
    1212 MACSSH   = SSH macnoise 
     13@@ -252,7 +252,7 @@ 
     14  
     15 pageant  : [G] winpgnt sshrsa sshpubk sshdes sshbn sshmd5 version tree234 
     16          + misc sshaes sshsha winpgntc sshdss sshsh512 winutils winmisc 
     17-         + pageant.res LIBS 
     18+         + pageant.res libpkcs11 sshscard LIBS 
     19  
     20 puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version 
     21          + sshrand winnoise sshsha winstore misc winctrls sshrsa sshdss winmisc 
    1322diff -udrNP putty-0.58.orig/config.c putty-0.58/config.c 
    1423--- putty-0.58.orig/config.c    2005-04-05 21:37:51.000000000 +0200 
    15 +++ putty-0.58/config.c 2005-05-11 17:53:09.000000000 +0200 
     24+++ putty-0.58/config.c 2005-06-06 11:50:58.469736880 +0200 
    1625@@ -1685,6 +1685,21 @@ 
    1726                          I(offsetof(Config,ssh2_des_cbc))); 
     
    7382diff -udrNP putty-0.58.orig/libpkcs11.c putty-0.58/libpkcs11.c 
    7483--- putty-0.58.orig/libpkcs11.c 1970-01-01 01:00:00.000000000 +0100 
    75 +++ putty-0.58/libpkcs11.c      2005-05-11 17:53:09.000000000 +0200 
     84+++ putty-0.58/libpkcs11.c      2005-06-06 11:50:58.470736728 +0200 
    7685@@ -0,0 +1,268 @@ 
    7786+/* 
     
    345354diff -udrNP putty-0.58.orig/local_cmd.c putty-0.58/local_cmd.c 
    346355--- putty-0.58.orig/local_cmd.c 1970-01-01 01:00:00.000000000 +0100 
    347 +++ putty-0.58/local_cmd.c      2005-05-11 17:53:09.000000000 +0200 
     356+++ putty-0.58/local_cmd.c      2005-06-06 11:50:58.471736576 +0200 
    348357@@ -0,0 +1,69 @@ 
    349358+#include <windows.h> 
     
    417426+ 
    418427diff -udrNP putty-0.58.orig/mac/Makefile.mpw putty-0.58/mac/Makefile.mpw 
    419 --- putty-0.58.orig/mac/Makefile.mpw    2005-05-11 19:10:29.426750288 +0200 
    420 +++ putty-0.58/mac/Makefile.mpw 2005-05-11 19:10:24.007574128 +0200 
     428--- putty-0.58.orig/mac/Makefile.mpw    2005-06-06 11:51:12.736567992 +0200 
     429+++ putty-0.58/mac/Makefile.mpw 2005-06-06 12:14:39.499707488 +0200 
    421430@@ -158,17 +158,18 @@ 
    422431 PuTTY Ä PuTTY.68k PuTTY.ppc PuTTY.carbon 
     
    728737                ::misc.h 
    729738        {C_68K} ::sshsh512.c -o {Targ} {COptions_68K} 
     739@@ -1224,7 +1251,7 @@ 
     740        {C_68K} ::windows:winpgen.c -o {Targ} {COptions_68K} 
     741  
     742 winpgnt.68k.o Ä ::windows:winpgnt.c ::putty.h ::ssh.h ::misc.h ::tree234.h ¶ 
     743-               ::puttyps.h ::network.h ::puttymem.h ::int64.h ¶ 
     744+               ::sshscard.h ::puttyps.h ::network.h ::puttymem.h ::int64.h ¶ 
     745                ::windows:winstuff.h ::mac:macstuff.h ::macosx:osx.h ¶ 
     746                ::unix:unix.h ::windows:winhelp.h ::charset:charset.h 
     747        {C_68K} ::windows:winpgnt.c -o {Targ} {COptions_68K} 
    730748@@ -1389,6 +1416,14 @@ 
    731749                ::charset:charset.h 
     
    773791                ::misc.h 
    774792        {C_CFM68K} ::sshsh512.c -o {Targ} {COptions_CFM68K} 
    775 @@ -2162,6 +2208,18 @@ 
     793@@ -1963,9 +2009,10 @@ 
     794        {C_CFM68K} ::windows:winpgen.c -o {Targ} {COptions_CFM68K} 
     795  
     796 winpgnt.cfm68k.o Ä ::windows:winpgnt.c ::putty.h ::ssh.h ::misc.h ¶ 
     797-               ::tree234.h ::puttyps.h ::network.h ::puttymem.h ::int64.h ¶ 
     798-               ::windows:winstuff.h ::mac:macstuff.h ::macosx:osx.h ¶ 
     799-               ::unix:unix.h ::windows:winhelp.h ::charset:charset.h 
     800+               ::tree234.h ::sshscard.h ::puttyps.h ::network.h ¶ 
     801+               ::puttymem.h ::int64.h ::windows:winstuff.h ::mac:macstuff.h ¶ 
     802+               ::macosx:osx.h ::unix:unix.h ::windows:winhelp.h ¶ 
     803+               ::charset:charset.h 
     804        {C_CFM68K} ::windows:winpgnt.c -o {Targ} {COptions_CFM68K} 
     805  
     806 winpgntc.cfm68k.o Ä ::windows:winpgntc.c ::putty.h ::puttyps.h ::network.h ¶ 
     807@@ -2162,6 +2209,18 @@ 
    776808        setfile -t XCOF {Targ} 
    777809        {C_PPC} ::ldiscucs.c -o {Targ} {COptions_PPC} 
     
    792824                ::charset:internal.h 
    793825        echo -n > {Targ} 
    794 @@ -2491,9 +2549,11 @@ 
     826@@ -2491,9 +2550,11 @@ 
    795827        setfile -t XCOF {Targ} 
    796828        {C_PPC} ::charset:slookup.c -o {Targ} {COptions_PPC} 
     
    806838        echo -n > {Targ} 
    807839        setfile -t XCOF {Targ} 
    808 @@ -2591,6 +2651,17 @@ 
     840@@ -2591,6 +2652,17 @@ 
    809841        setfile -t XCOF {Targ} 
    810842        {C_PPC} ::sshrsag.c -o {Targ} {COptions_PPC} 
     
    824856                ::misc.h 
    825857        echo -n > {Targ} 
    826 @@ -3160,6 +3231,18 @@ 
     858@@ -2935,7 +3007,7 @@ 
     859        {C_PPC} ::windows:winpgen.c -o {Targ} {COptions_PPC} 
     860  
     861 winpgnt.ppc.o Ä ::windows:winpgnt.c ::putty.h ::ssh.h ::misc.h ::tree234.h ¶ 
     862-               ::puttyps.h ::network.h ::puttymem.h ::int64.h ¶ 
     863+               ::sshscard.h ::puttyps.h ::network.h ::puttymem.h ::int64.h ¶ 
     864                ::windows:winstuff.h ::mac:macstuff.h ::macosx:osx.h ¶ 
     865                ::unix:unix.h ::windows:winhelp.h ::charset:charset.h 
     866        echo -n > {Targ} 
     867@@ -3160,6 +3232,18 @@ 
    827868        setfile -t XCOF {Targ} 
    828869        {C_Carbon} ::ldiscucs.c -o {Targ} {COptions_Carbon} 
     
    843884                ::charset:internal.h 
    844885        echo -n > {Targ} 
    845 @@ -3494,9 +3577,11 @@ 
     886@@ -3494,9 +3578,11 @@ 
    846887        setfile -t XCOF {Targ} 
    847888        {C_Carbon} ::charset:slookup.c -o {Targ} {COptions_Carbon} 
     
    857898        echo -n > {Targ} 
    858899        setfile -t XCOF {Targ} 
    859 @@ -3596,6 +3681,17 @@ 
     900@@ -3596,6 +3682,17 @@ 
    860901        setfile -t XCOF {Targ} 
    861902        {C_Carbon} ::sshrsag.c -o {Targ} {COptions_Carbon} 
     
    875916                ::misc.h 
    876917        echo -n > {Targ} 
     918@@ -3940,9 +4037,10 @@ 
     919        {C_Carbon} ::windows:winpgen.c -o {Targ} {COptions_Carbon} 
     920  
     921 winpgnt.carbon.o Ä ::windows:winpgnt.c ::putty.h ::ssh.h ::misc.h ¶ 
     922-               ::tree234.h ::puttyps.h ::network.h ::puttymem.h ::int64.h ¶ 
     923-               ::windows:winstuff.h ::mac:macstuff.h ::macosx:osx.h ¶ 
     924-               ::unix:unix.h ::windows:winhelp.h ::charset:charset.h 
     925+               ::tree234.h ::sshscard.h ::puttyps.h ::network.h ¶ 
     926+               ::puttymem.h ::int64.h ::windows:winstuff.h ::mac:macstuff.h ¶ 
     927+               ::macosx:osx.h ::unix:unix.h ::windows:winhelp.h ¶ 
     928+               ::charset:charset.h 
     929        echo -n > {Targ} 
     930        setfile -t XCOF {Targ} 
     931        {C_Carbon} ::windows:winpgnt.c -o {Targ} {COptions_Carbon} 
    877932diff -udrNP putty-0.58.orig/macosx/Makefile putty-0.58/macosx/Makefile 
    878 --- putty-0.58.orig/macosx/Makefile     2005-05-11 19:10:29.467744056 +0200 
    879 +++ putty-0.58/macosx/Makefile  2005-05-11 19:10:24.049567744 +0200 
     933--- putty-0.58.orig/macosx/Makefile     2005-06-06 11:51:12.776561912 +0200 
     934+++ putty-0.58/macosx/Makefile  2005-06-06 12:14:39.540701256 +0200 
    880935@@ -104,78 +104,83 @@ 
    881936                PuTTY.app/Contents/Info.plist $(PuTTY_extra) 
     
    10591114                ../misc.h 
    10601115        $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) -c $< 
     1116@@ -741,9 +761,10 @@ 
     1117                ../charset/charset.h 
     1118        $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) -c $< 
     1119 winpgnt.o: ../windows/winpgnt.c ../putty.h ../ssh.h ../misc.h ../tree234.h \ 
     1120-               ../puttyps.h ../network.h ../puttymem.h ../int64.h \ 
     1121-               ../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \ 
     1122-               ../unix/unix.h ../windows/winhelp.h ../charset/charset.h 
     1123+               ../sshscard.h ../puttyps.h ../network.h ../puttymem.h \ 
     1124+               ../int64.h ../windows/winstuff.h ../mac/macstuff.h \ 
     1125+               ../macosx/osx.h ../unix/unix.h ../windows/winhelp.h \ 
     1126+               ../charset/charset.h 
     1127        $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) -c $< 
     1128 winpgntc.o: ../windows/winpgntc.c ../putty.h ../puttyps.h ../network.h \ 
     1129                ../misc.h ../windows/winstuff.h ../mac/macstuff.h \ 
    10611130diff -udrNP putty-0.58.orig/pkcs11.h putty-0.58/pkcs11.h 
    10621131--- putty-0.58.orig/pkcs11.h    1970-01-01 01:00:00.000000000 +0100 
    1063 +++ putty-0.58/pkcs11.h 2005-05-11 17:53:09.000000000 +0200 
     1132+++ putty-0.58/pkcs11.h 2005-06-06 11:50:58.478735512 +0200 
    10641133@@ -0,0 +1,48 @@ 
    10651134+/* 
     
    11131182diff -udrNP putty-0.58.orig/putty.h putty-0.58/putty.h 
    11141183--- putty-0.58.orig/putty.h     2005-04-05 21:37:51.000000000 +0200 
    1115 +++ putty-0.58/putty.h  2005-05-11 17:53:09.000000000 +0200 
     1184+++ putty-0.58/putty.h  2005-06-06 11:50:58.479735360 +0200 
    11161185@@ -431,6 +431,9 @@ 
    11171186     int ssh2_des_cbc;                 /* "des-cbc" unrecommended SSH-2 cipher */ 
     
    11361205diff -udrNP putty-0.58.orig/rsaref/pkcs11.h putty-0.58/rsaref/pkcs11.h 
    11371206--- putty-0.58.orig/rsaref/pkcs11.h     1970-01-01 01:00:00.000000000 +0100 
    1138 +++ putty-0.58/rsaref/pkcs11.h  2005-05-11 17:54:01.000000000 +0200 
     1207+++ putty-0.58/rsaref/pkcs11.h  2005-06-06 11:50:58.480735208 +0200 
    11391208@@ -0,0 +1,286 @@ 
    11401209+/* pkcs11.h include file for PKCS #11.  2001 June 25 */ 
     
    14261495diff -udrNP putty-0.58.orig/rsaref/pkcs11f.h putty-0.58/rsaref/pkcs11f.h 
    14271496--- putty-0.58.orig/rsaref/pkcs11f.h    1970-01-01 01:00:00.000000000 +0100 
    1428 +++ putty-0.58/rsaref/pkcs11f.h 2005-05-11 17:53:35.000000000 +0200 
     1497+++ putty-0.58/rsaref/pkcs11f.h 2005-06-06 11:50:58.483734752 +0200 
    14291498@@ -0,0 +1,898 @@ 
    14301499+/* pkcs11f.h include file for PKCS #11.  2001 June 25 */ 
     
    23282397diff -udrNP putty-0.58.orig/rsaref/pkcs11t.h putty-0.58/rsaref/pkcs11t.h 
    23292398--- putty-0.58.orig/rsaref/pkcs11t.h    1970-01-01 01:00:00.000000000 +0100 
    2330 +++ putty-0.58/rsaref/pkcs11t.h 2005-05-11 17:53:35.000000000 +0200 
     2399+++ putty-0.58/rsaref/pkcs11t.h 2005-06-06 11:50:58.486734296 +0200 
    23312400@@ -0,0 +1,1334 @@ 
    23322401+/* pkcs11t.h include file for PKCS #11.  2001 June 25 */ 
     
    36663735diff -udrNP putty-0.58.orig/rsaref/unix.h putty-0.58/rsaref/unix.h 
    36673736--- putty-0.58.orig/rsaref/unix.h       1970-01-01 01:00:00.000000000 +0100 
    3668 +++ putty-0.58/rsaref/unix.h    2005-05-11 17:53:35.000000000 +0200 
     3737+++ putty-0.58/rsaref/unix.h    2005-06-06 11:50:58.487734144 +0200 
    36693738@@ -0,0 +1,24 @@ 
    36703739+ 
     
    36943763diff -udrNP putty-0.58.orig/rsaref/win32.h putty-0.58/rsaref/win32.h 
    36953764--- putty-0.58.orig/rsaref/win32.h      1970-01-01 01:00:00.000000000 +0100 
    3696 +++ putty-0.58/rsaref/win32.h   2005-05-11 17:53:35.000000000 +0200 
     3765+++ putty-0.58/rsaref/win32.h   2005-06-06 11:50:58.487734144 +0200 
    36973766@@ -0,0 +1,24 @@ 
    36983767+ 
     
    37223791diff -udrNP putty-0.58.orig/settings.c putty-0.58/settings.c 
    37233792--- putty-0.58.orig/settings.c  2005-04-05 21:37:51.000000000 +0200 
    3724 +++ putty-0.58/settings.c       2005-05-11 17:53:09.000000000 +0200 
     3793+++ putty-0.58/settings.c       2005-06-06 11:50:58.488733992 +0200 
    37253794@@ -243,11 +243,16 @@ 
    37263795     write_setting_s(sesskey, "RekeyBytes", cfg->ssh_rekey_data); 
     
    37603829diff -udrNP putty-0.58.orig/ssh.c putty-0.58/ssh.c 
    37613830--- putty-0.58.orig/ssh.c       2005-04-05 21:37:51.000000000 +0200 
    3762 +++ putty-0.58/ssh.c    2005-05-11 17:53:09.000000000 +0200 
     3831+++ putty-0.58/ssh.c    2005-06-06 11:50:58.493733232 +0200 
    37633832@@ -6,6 +6,11 @@ 
    37643833 #include "putty.h" 
     
    40424111diff -udrNP putty-0.58.orig/ssh.h putty-0.58/ssh.h 
    40434112--- putty-0.58.orig/ssh.h       2005-04-05 21:37:51.000000000 +0200 
    4044 +++ putty-0.58/ssh.h    2005-05-11 17:54:24.000000000 +0200 
     4113+++ putty-0.58/ssh.h    2005-06-06 12:06:34.718405448 +0200 
    40454114@@ -11,6 +11,10 @@ 
    40464115 extern void sshfwd_close(struct ssh_channel *c); 
     
    40544123 /* 
    40554124  * Useful thing. 
     4125@@ -378,7 +382,8 @@ 
     4126     SSH_KEYTYPE_UNOPENABLE, 
     4127     SSH_KEYTYPE_UNKNOWN, 
     4128     SSH_KEYTYPE_SSH1, SSH_KEYTYPE_SSH2, 
     4129-    SSH_KEYTYPE_OPENSSH, SSH_KEYTYPE_SSHCOM 
     4130+    SSH_KEYTYPE_OPENSSH, SSH_KEYTYPE_SSHCOM, 
     4131+    SSH_KEYTYPE_SMARTCARD 
     4132 }; 
     4133 int key_type(const Filename *filename); 
     4134 char *key_type_to_str(int type); 
     4135diff -udrNP putty-0.58.orig/sshpubk.c putty-0.58/sshpubk.c 
     4136--- putty-0.58.orig/sshpubk.c   2005-04-05 21:37:51.000000000 +0200 
     4137+++ putty-0.58/sshpubk.c        2005-06-06 11:51:02.166174936 +0200 
     4138@@ -1182,6 +1182,7 @@ 
     4139     const char putty2_sig[] = "PuTTY-User-Key-File-"; 
     4140     const char sshcom_sig[] = "---- BEGIN SSH2 ENCRYPTED PRIVAT"; 
     4141     const char openssh_sig[] = "-----BEGIN "; 
     4142+    const char putty_scard_sig[] = "PuTTY-User-Smartcard-Key-File-"; 
     4143     int i; 
     4144  
     4145     fp = f_open(*filename, "r"); 
     4146@@ -1199,6 +1200,8 @@ 
     4147        return SSH_KEYTYPE_SSH2; 
     4148     if (!memcmp(buf, openssh_sig, sizeof(openssh_sig)-1)) 
     4149        return SSH_KEYTYPE_OPENSSH; 
     4150+    if (!memcmp(buf, putty_scard_sig, sizeof(putty_scard_sig)-1)) 
     4151+       return SSH_KEYTYPE_SMARTCARD; 
     4152     if (!memcmp(buf, sshcom_sig, sizeof(sshcom_sig)-1)) 
     4153        return SSH_KEYTYPE_SSHCOM; 
     4154     return SSH_KEYTYPE_UNKNOWN;               /* unrecognised or EOF */ 
    40564155diff -udrNP putty-0.58.orig/sshrsa.h putty-0.58/sshrsa.h 
    40574156--- putty-0.58.orig/sshrsa.h    1970-01-01 01:00:00.000000000 +0100 
    4058 +++ putty-0.58/sshrsa.h 2005-05-11 17:53:09.000000000 +0200 
     4157+++ putty-0.58/sshrsa.h 2005-06-06 11:50:58.496732776 +0200 
    40594158@@ -0,0 +1,14 @@ 
    40604159+ 
     
    40744173diff -udrNP putty-0.58.orig/sshscard.c putty-0.58/sshscard.c 
    40754174--- putty-0.58.orig/sshscard.c  1970-01-01 01:00:00.000000000 +0100 
    4076 +++ putty-0.58/sshscard.c       2005-05-11 17:53:09.000000000 +0200 
    4077 @@ -0,0 +1,366 @@ 
     4175+++ putty-0.58/sshscard.c       2005-06-06 12:12:44.681162560 +0200 
     4176@@ -0,0 +1,387 @@ 
    40784177+#include "ssh.h" 
    40794178+#include "sshrsa.h" 
     
    41844283+} 
    41854284+ 
     4285+struct ssh2_userkey *ssh2_load_pkcs11key_fromfile(char* filename, char *passphrase, const char **errorstr) { 
     4286+    char * keylabel=NULL; 
     4287+    /* again, need to get keylabel from file */ 
     4288+    return ssh2_load_pkcs11key(keylabel,passphrase, errorstr); 
     4289+} 
     4290+ 
    41864291+struct ssh2_userkey *ssh2_load_pkcs11key(char* label, char *passphrase) 
    41874292+{ 
     
    42914396+} 
    42924397+ 
     4398+unsigned char * ssh2_userkey_loadpkcs11pub_fromfile(char* keyfile, char** algorithm, int *pub_blob_len, const char **errorstr, void (*diewithme) (char*, ...) ) 
     4399+{ 
     4400+    char * keylabel=NULL; 
     4401+    char * pkcs11_library_file=NULL; 
     4402+ 
     4403+    /* keylabel= */ 
     4404+    /* set library name and keylabel from file in order to get specific key */ 
     4405+    /* otherwise, initialize pkcs11 session based on info in keyfile */ 
     4406+    /* note - not implemented - use defaults and first key */ 
     4407+     
     4408+    init_pkcs11_library(frontend,pkcs11_library_file); 
     4409+    /* session is currently static - only one smartcard key can be loaded */ 
     4410+ 
     4411+    return ssh2_userkey_loadpkcs11pub( keylabel, algorithm, pub_blob_len, errorstr); 
     4412+} 
    42934413+ 
    42944414+unsigned char * ssh2_userkey_loadpkcs11pub(char* keylabel,  
     
    44444564diff -udrNP putty-0.58.orig/sshscard.h putty-0.58/sshscard.h 
    44454565--- putty-0.58.orig/sshscard.h  1970-01-01 01:00:00.000000000 +0100 
    4446 +++ putty-0.58/sshscard.h       2005-05-11 17:53:09.000000000 +0200 
     4566+++ putty-0.58/sshscard.h       2005-06-06 11:50:58.524728520 +0200 
    44474567@@ -0,0 +1,15 @@ 
    44484568+ 
     
    44624582+ 
    44634583diff -udrNP putty-0.58.orig/unix/Makefile.gtk putty-0.58/unix/Makefile.gtk 
    4464 --- putty-0.58.orig/unix/Makefile.gtk   2005-05-11 19:10:29.338763664 +0200 
    4465 +++ putty-0.58/unix/Makefile.gtk        2005-05-11 19:10:23.916587960 +0200 
     4584--- putty-0.58.orig/unix/Makefile.gtk   2005-06-06 11:51:12.652580760 +0200 
     4585+++ putty-0.58/unix/Makefile.gtk        2005-06-06 12:14:39.412720712 +0200 
    44664586@@ -101,54 +101,57 @@ 
    44674587  
     
    46464766                ../misc.h 
    46474767        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../sshsh512.c 
     4768@@ -770,9 +789,10 @@ 
     4769                ../charset/charset.h 
     4770        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../windows/winpgen.c 
     4771 winpgnt.o: ../windows/winpgnt.c ../putty.h ../ssh.h ../misc.h ../tree234.h \ 
     4772-               ../puttyps.h ../network.h ../puttymem.h ../int64.h \ 
     4773-               ../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \ 
     4774-               ../unix/unix.h ../windows/winhelp.h ../charset/charset.h 
     4775+               ../sshscard.h ../puttyps.h ../network.h ../puttymem.h \ 
     4776+               ../int64.h ../windows/winstuff.h ../mac/macstuff.h \ 
     4777+               ../macosx/osx.h ../unix/unix.h ../windows/winhelp.h \ 
     4778+               ../charset/charset.h 
     4779        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../windows/winpgnt.c 
     4780 winpgntc.o: ../windows/winpgntc.c ../putty.h ../puttyps.h ../network.h \ 
     4781                ../misc.h ../windows/winstuff.h ../mac/macstuff.h \ 
     4782diff -udrNP putty-0.58.orig/windows/MSVC/pageant/pageant.dsp putty-0.58/windows/MSVC/pageant/pageant.dsp 
     4783--- putty-0.58.orig/windows/MSVC/pageant/pageant.dsp    2005-06-06 11:51:12.620585624 +0200 
     4784+++ putty-0.58/windows/MSVC/pageant/pageant.dsp 2005-06-06 12:14:39.378725880 +0200 
     4785@@ -94,6 +94,10 @@ 
     4786 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 
     4787 # Begin Source File 
     4788  
     4789+SOURCE=..\..\..\libpkcs11.c 
     4790+# End Source File 
     4791+# Begin Source File 
     4792+ 
     4793 SOURCE=..\..\..\misc.c 
     4794 # End Source File 
     4795 # Begin Source File 
     4796@@ -126,6 +130,10 @@ 
     4797 # End Source File 
     4798 # Begin Source File 
     4799  
     4800+SOURCE=..\..\..\sshscard.c 
     4801+# End Source File 
     4802+# Begin Source File 
     4803+ 
     4804 SOURCE=..\..\..\sshsh512.c 
     4805 # End Source File 
     4806 # Begin Source File 
     4807@@ -186,6 +194,10 @@ 
     4808 # End Source File 
     4809 # Begin Source File 
     4810  
     4811+SOURCE=..\..\..\pkcs11.h 
     4812+# End Source File 
     4813+# Begin Source File 
     4814+ 
     4815 SOURCE=..\..\..\putty.h 
     4816 # End Source File 
     4817 # Begin Source File 
     4818@@ -198,10 +210,38 @@ 
     4819 # End Source File 
     4820 # Begin Source File 
     4821  
     4822+SOURCE=..\..\..\rsaref\pkcs11.h 
     4823+# End Source File 
     4824+# Begin Source File 
     4825+ 
     4826+SOURCE=..\..\..\rsaref\pkcs11f.h 
     4827+# End Source File 
     4828+# Begin Source File 
     4829+ 
     4830+SOURCE=..\..\..\rsaref\pkcs11t.h 
     4831+# End Source File 
     4832+# Begin Source File 
     4833+ 
     4834+SOURCE=..\..\..\rsaref\unix.h 
     4835+# End Source File 
     4836+# Begin Source File 
     4837+ 
     4838+SOURCE=..\..\..\rsaref\win32.h 
     4839+# End Source File 
     4840+# Begin Source File 
     4841+ 
     4842 SOURCE=..\..\..\ssh.h 
     4843 # End Source File 
     4844 # Begin Source File 
     4845  
     4846+SOURCE=..\..\..\sshrsa.h 
     4847+# End Source File 
     4848+# Begin Source File 
     4849+ 
     4850+SOURCE=..\..\..\sshscard.h 
     4851+# End Source File 
     4852+# Begin Source File 
     4853+ 
     4854 SOURCE=..\..\..\tree234.h 
     4855 # End Source File 
     4856 # Begin Source File 
    46484857diff -udrNP putty-0.58.orig/windows/MSVC/plink/plink.dsp putty-0.58/windows/MSVC/plink/plink.dsp 
    4649 --- putty-0.58.orig/windows/MSVC/plink/plink.dsp        2005-05-11 19:10:29.309768072 +0200 
    4650 +++ putty-0.58/windows/MSVC/plink/plink.dsp     2005-05-11 19:10:23.884592824 +0200 
     4858--- putty-0.58.orig/windows/MSVC/plink/plink.dsp        2005-06-06 11:51:12.622585320 +0200 
     4859+++ putty-0.58/windows/MSVC/plink/plink.dsp     2005-06-06 12:14:39.379725728 +0200 
    46514860@@ -110,6 +110,14 @@ 
    46524861 # End Source File 
     
    47264935 # Begin Source File 
    47274936diff -udrNP putty-0.58.orig/windows/MSVC/pscp/pscp.dsp putty-0.58/windows/MSVC/pscp/pscp.dsp 
    4728 --- putty-0.58.orig/windows/MSVC/pscp/pscp.dsp  2005-05-11 19:10:29.311767768 +0200 
    4729 +++ putty-0.58/windows/MSVC/pscp/pscp.dsp       2005-05-11 19:10:23.886592520 +0200 
     4937--- putty-0.58.orig/windows/MSVC/pscp/pscp.dsp  2005-06-06 11:51:12.624585016 +0200 
     4938+++ putty-0.58/windows/MSVC/pscp/pscp.dsp       2005-06-06 12:14:39.382725272 +0200 
    47304939@@ -110,6 +110,14 @@ 
    47314940 # End Source File 
     
    48085017 # Begin Source File 
    48095018diff -udrNP putty-0.58.orig/windows/MSVC/psftp/psftp.dsp putty-0.58/windows/MSVC/psftp/psftp.dsp 
    4810 --- putty-0.58.orig/windows/MSVC/psftp/psftp.dsp        2005-05-11 19:10:29.312767616 +0200 
    4811 +++ putty-0.58/windows/MSVC/psftp/psftp.dsp     2005-05-11 19:10:23.887592368 +0200 
     5019--- putty-0.58.orig/windows/MSVC/psftp/psftp.dsp        2005-06-06 11:51:12.625584864 +0200 
     5020+++ putty-0.58/windows/MSVC/psftp/psftp.dsp     2005-06-06 12:14:39.384724968 +0200 
    48125021@@ -110,6 +110,14 @@ 
    48135022 # End Source File 
     
    48905099 # Begin Source File 
    48915100diff -udrNP putty-0.58.orig/windows/MSVC/putty/putty.dsp putty-0.58/windows/MSVC/putty/putty.dsp 
    4892 --- putty-0.58.orig/windows/MSVC/putty/putty.dsp        2005-05-11 19:10:29.314767312 +0200 
    4893 +++ putty-0.58/windows/MSVC/putty/putty.dsp     2005-05-11 19:10:23.890591912 +0200 
     5101--- putty-0.58.orig/windows/MSVC/putty/putty.dsp        2005-06-06 11:51:12.627584560 +0200 
     5102+++ putty-0.58/windows/MSVC/putty/putty.dsp     2005-06-06 12:14:39.386724664 +0200 
    48945103@@ -122,6 +122,14 @@ 
    48955104 # End Source File 
     
    49695178 # Begin Source File 
    49705179diff -udrNP putty-0.58.orig/windows/Makefile.bor putty-0.58/windows/Makefile.bor 
    4971 --- putty-0.58.orig/windows/Makefile.bor        2005-05-11 19:10:29.268774304 +0200 
    4972 +++ putty-0.58/windows/Makefile.bor     2005-05-11 19:10:23.844598904 +0200 
    4973 @@ -108,49 +108,53 @@ 
    4974                 winutils.obj pageant.rsp 
     5180--- putty-0.58.orig/windows/Makefile.bor        2005-06-06 11:51:12.584591096 +0200 
     5181+++ putty-0.58/windows/Makefile.bor     2005-06-06 12:14:39.340731656 +0200 
     5182@@ -102,55 +102,60 @@ 
     5183 all: pageant.exe plink.exe pscp.exe psftp.exe putty.exe puttygen.exe \ 
     5184                puttytel.exe 
     5185  
     5186-pageant.exe: misc.obj pageant.res sshaes.obj sshbn.obj sshdes.obj sshdss.obj \ 
     5187-               sshmd5.obj sshpubk.obj sshrsa.obj sshsh512.obj sshsha.obj \ 
     5188-               tree234.obj version.obj winmisc.obj winpgnt.obj winpgntc.obj \ 
     5189-               winutils.obj pageant.rsp 
     5190+pageant.exe: libpkcs11.obj misc.obj pageant.res sshaes.obj sshbn.obj \ 
     5191+               sshdes.obj sshdss.obj sshmd5.obj sshpubk.obj sshrsa.obj \ 
     5192+               sshscard.obj sshsh512.obj sshsha.obj tree234.obj version.obj \ 
     5193+               winmisc.obj winpgnt.obj winpgntc.obj winutils.obj \ 
     5194+               pageant.rsp 
    49755195        ilink32 -aa -Gn -L$(BCB)\lib @pageant.rsp 
    49765196  
     
    50595279                winutils.obj x11fwd.obj putty.rsp 
    50605280        ilink32 -aa -Gn -L$(BCB)\lib @putty.rsp 
    5061 @@ -186,16 +190,17 @@ 
     5281@@ -175,10 +180,11 @@ 
     5282  
     5283 pageant.rsp: $(MAKEFILE) 
     5284        echo c0w32 + > pageant.rsp 
     5285-       echo misc.obj sshaes.obj sshbn.obj sshdes.obj + >> pageant.rsp 
     5286-       echo sshdss.obj sshmd5.obj sshpubk.obj sshrsa.obj + >> pageant.rsp 
     5287-       echo sshsh512.obj sshsha.obj tree234.obj version.obj + >> pageant.rsp 
     5288-       echo winmisc.obj winpgnt.obj winpgntc.obj winutils.obj >> pageant.rsp 
     5289+       echo libpkcs11.obj misc.obj sshaes.obj sshbn.obj + >> pageant.rsp 
     5290+       echo sshdes.obj sshdss.obj sshmd5.obj sshpubk.obj + >> pageant.rsp 
     5291+       echo sshrsa.obj sshscard.obj sshsh512.obj sshsha.obj + >> pageant.rsp 
     5292+       echo tree234.obj version.obj winmisc.obj winpgnt.obj + >> pageant.rsp 
     5293+       echo winpgntc.obj winutils.obj >> pageant.rsp 
     5294        echo pageant.exe >> pageant.rsp 
     5295        echo nul,cw32 import32, >> pageant.rsp 
     5296        echo pageant.res >> pageant.rsp 
     5297@@ -186,16 +192,17 @@ 
    50625298 plink.rsp: $(MAKEFILE) 
    50635299        echo c0x32 + > plink.rsp 
     
    50875323        echo nul,cw32 import32, >> plink.rsp 
    50885324        echo plink.res >> plink.rsp 
    5089 @@ -203,16 +208,17 @@ 
     5325@@ -203,16 +210,17 @@ 
    50905326 pscp.rsp: $(MAKEFILE) 
    50915327        echo c0x32 + > pscp.rsp 
     
    51155351        echo nul,cw32 import32, >> pscp.rsp 
    51165352        echo pscp.res >> pscp.rsp 
    5117 @@ -220,15 +226,16 @@ 
     5353@@ -220,15 +228,16 @@ 
    51185354 psftp.rsp: $(MAKEFILE) 
    51195355        echo c0x32 + > psftp.rsp 
     
    51415377        echo psftp.exe >> psftp.rsp 
    51425378        echo nul,cw32 import32, >> psftp.rsp 
    5143 @@ -237,20 +244,20 @@ 
     5379@@ -237,20 +246,20 @@ 
    51445380 putty.rsp: $(MAKEFILE) 
    51455381        echo c0w32 + > putty.rsp 
     
    51765412        echo nul,cw32 import32, >> putty.rsp 
    51775413        echo win_res.res >> putty.rsp 
    5178 @@ -347,6 +354,10 @@ 
     5414@@ -347,6 +356,10 @@ 
    51795415                ..\network.h ..\misc.h ..\tree234.h ..\windows\winstuff.h \ 
    51805416                ..\mac\macstuff.h ..\macosx\osx.h ..\unix\unix.h \ 
     
    51875423                ..\charset\internal.h 
    51885424 logging.obj: ..\logging.c ..\putty.h ..\puttyps.h ..\network.h ..\misc.h \ 
    5189 @@ -524,9 +535,11 @@ 
     5425@@ -524,9 +537,11 @@ 
    51905426                ..\windows\winhelp.h ..\charset\charset.h 
    51915427 slookup.obj: ..\charset\slookup.c ..\charset\charset.h ..\charset\internal.h \ 
     
    52015437 sshaes.obj: ..\sshaes.c ..\ssh.h ..\puttymem.h ..\network.h ..\int64.h \ 
    52025438                ..\misc.h 
    5203 @@ -562,6 +575,13 @@ 
     5439@@ -562,6 +577,13 @@ 
    52045440                ..\int64.h 
    52055441 sshrsag.obj: ..\sshrsag.c ..\ssh.h ..\puttymem.h ..\network.h ..\int64.h \ 
     
    52155451                ..\misc.h 
    52165452 sshsha.obj: ..\sshsha.c ..\ssh.h ..\puttymem.h ..\network.h ..\int64.h \ 
     5453@@ -732,9 +754,10 @@ 
     5454                ..\unix\unix.h ..\tree234.h ..\windows\winhelp.h \ 
     5455                ..\charset\charset.h 
     5456 winpgnt.obj: ..\windows\winpgnt.c ..\putty.h ..\ssh.h ..\misc.h ..\tree234.h \ 
     5457-               ..\puttyps.h ..\network.h ..\puttymem.h ..\int64.h \ 
     5458-               ..\windows\winstuff.h ..\mac\macstuff.h ..\macosx\osx.h \ 
     5459-               ..\unix\unix.h ..\windows\winhelp.h ..\charset\charset.h 
     5460+               ..\sshscard.h ..\puttyps.h ..\network.h ..\puttymem.h \ 
     5461+               ..\int64.h ..\windows\winstuff.h ..\mac\macstuff.h \ 
     5462+               ..\macosx\osx.h ..\unix\unix.h ..\windows\winhelp.h \ 
     5463+               ..\charset\charset.h 
     5464 winpgntc.obj: ..\windows\winpgntc.c ..\putty.h ..\puttyps.h ..\network.h \ 
     5465                ..\misc.h ..\windows\winstuff.h ..\mac\macstuff.h \ 
     5466                ..\macosx\osx.h ..\unix\unix.h ..\puttymem.h ..\tree234.h \ 
    52175467diff -udrNP putty-0.58.orig/windows/Makefile.cyg putty-0.58/windows/Makefile.cyg 
    5218 --- putty-0.58.orig/windows/Makefile.cyg        2005-05-11 19:10:29.242778256 +0200 
    5219 +++ putty-0.58/windows/Makefile.cyg     2005-05-11 19:10:23.817603008 +0200 
    5220 @@ -111,86 +111,89 @@ 
    5221                 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 -lshell32 -luser32 \ 
    5222                 -lwinmm -lwinspool 
    5223   
    5224 -plink.exe: be_all.o cmdline.o cproxy.o ldisc.o logging.o misc.o pinger.o \ 
    5225 -               plink.res.o portfwd.o pproxy.o proxy.o raw.o rlogin.o \ 
    5226 -               settings.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o \ 
    5227 -               sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o \ 
    5228 -               sshrand.o sshrsa.o sshsh512.o sshsha.o sshzlib.o telnet.o \ 
    5229 -               timing.o tree234.o version.o wildcard.o wincons.o windefs.o \ 
    5230 -               winmisc.o winnet.o winnoise.o winpgntc.o winplink.o \ 
    5231 -               winstore.o wintime.o x11fwd.o 
     5468--- putty-0.58.orig/windows/Makefile.cyg        2005-06-06 11:51:12.559594896 +0200 
     5469+++ putty-0.58/windows/Makefile.cyg     2005-06-06 12:14:39.314735608 +0200 
     5470@@ -101,96 +101,100 @@ 
     5471 all: pageant.exe plink.exe pscp.exe psftp.exe putty.exe puttygen.exe \ 
     5472                puttytel.exe 
     5473  
     5474-pageant.exe: misc.o pageant.res.o sshaes.o sshbn.o sshdes.o sshdss.o \ 
     5475-               sshmd5.o sshpubk.o sshrsa.o sshsh512.o sshsha.o tree234.o \ 
     5476-               version.o winmisc.o winpgnt.o winpgntc.o winutils.o 
     5477-       $(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,pageant.map misc.o \ 
     5478-               pageant.res.o sshaes.o sshbn.o sshdes.o sshdss.o sshmd5.o \ 
     5479-               sshpubk.o sshrsa.o sshsh512.o sshsha.o tree234.o version.o \ 
     5480-               winmisc.o winpgnt.o winpgntc.o winutils.o -ladvapi32 \ 
     5481+pageant.exe: libpkcs11.o misc.o pageant.res.o sshaes.o sshbn.o sshdes.o \ 
     5482+               sshdss.o sshmd5.o sshpubk.o sshrsa.o sshscard.o sshsh512.o \ 
     5483+               sshsha.o tree234.o version.o winmisc.o winpgnt.o winpgntc.o \ 
     5484+               winutils.o 
     5485+       $(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,pageant.map libpkcs11.o \ 
     5486+               misc.o pageant.res.o sshaes.o sshbn.o sshdes.o sshdss.o \ 
     5487+               sshmd5.o sshpubk.o sshrsa.o sshscard.o sshsh512.o sshsha.o \ 
     5488+               tree234.o version.o winmisc.o winpgnt.o winpgntc.o \ 
     5489+               winutils.o -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 \ 
     5490+               -lshell32 -luser32 -lwinmm -lwinspool 
     5491+ 
    52325492+plink.exe: be_all.o cmdline.o cproxy.o ldisc.o libpkcs11.o local_cmd.o \ 
    52335493+               logging.o misc.o pinger.o plink.res.o portfwd.o pproxy.o \ 
     
    52385498+               wildcard.o wincons.o windefs.o winmisc.o winnet.o winnoise.o \ 
    52395499+               winpgntc.o winplink.o winstore.o wintime.o x11fwd.o 
    5240         $(CC) $(LDFLAGS) -o $@ -Wl,-Map,plink.map be_all.o cmdline.o \ 
     5500+       $(CC) $(LDFLAGS) -o $@ -Wl,-Map,plink.map be_all.o cmdline.o \ 
     5501+               cproxy.o ldisc.o libpkcs11.o local_cmd.o logging.o misc.o \ 
     5502+               pinger.o plink.res.o portfwd.o pproxy.o proxy.o raw.o \ 
     5503+               rlogin.o settings.o ssh.o sshaes.o sshblowf.o sshbn.o \ 
     5504+               sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o \ 
     5505+               sshpubk.o sshrand.o sshrsa.o sshscard.o sshsh512.o sshsha.o \ 
     5506+               sshzlib.o telnet.o timing.o tree234.o version.o wildcard.o \ 
     5507+               wincons.o windefs.o winmisc.o winnet.o winnoise.o winpgntc.o \ 
     5508+               winplink.o winstore.o wintime.o x11fwd.o -ladvapi32 \ 
     5509                -lcomctl32 -lcomdlg32 -lgdi32 -limm32 -lshell32 -luser32 \ 
     5510                -lwinmm -lwinspool 
     5511  
     5512-plink.exe: be_all.o cmdline.o cproxy.o ldisc.o logging.o misc.o pinger.o \ 
     5513-               plink.res.o portfwd.o pproxy.o proxy.o raw.o rlogin.o \ 
     5514-               settings.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o \ 
     5515+pscp.exe: be_none.o cmdline.o cproxy.o int64.o libpkcs11.o local_cmd.o \ 
     5516+               logging.o misc.o pinger.o portfwd.o pproxy.o proxy.o pscp.o \ 
     5517+               pscp.res.o settings.o sftp.o ssh.o sshaes.o sshblowf.o \ 
     5518+               sshbn.o sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o \ 
     5519+               sshmd5.o sshpubk.o sshrand.o sshrsa.o sshscard.o sshsh512.o \ 
     5520+               sshsha.o sshzlib.o timing.o tree234.o version.o wildcard.o \ 
     5521+               wincons.o windefs.o winmisc.o winnet.o winnoise.o winpgntc.o \ 
     5522+               winsftp.o winstore.o wintime.o x11fwd.o 
     5523+       $(CC) $(LDFLAGS) -o $@ -Wl,-Map,pscp.map be_none.o cmdline.o \ 
     5524+               cproxy.o int64.o libpkcs11.o local_cmd.o logging.o misc.o \ 
     5525+               pinger.o portfwd.o pproxy.o proxy.o pscp.o pscp.res.o \ 
     5526+               settings.o sftp.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o \ 
     5527                sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o \ 
     5528-               sshrand.o sshrsa.o sshsh512.o sshsha.o sshzlib.o telnet.o \ 
     5529+               sshrand.o sshrsa.o sshscard.o sshsh512.o sshsha.o sshzlib.o \ 
     5530                timing.o tree234.o version.o wildcard.o wincons.o windefs.o \ 
     5531-               winmisc.o winnet.o winnoise.o winpgntc.o winplink.o \ 
     5532-               winstore.o wintime.o x11fwd.o 
     5533-       $(CC) $(LDFLAGS) -o $@ -Wl,-Map,plink.map be_all.o cmdline.o \ 
    52415534-               cproxy.o ldisc.o logging.o misc.o pinger.o plink.res.o \ 
    52425535-               portfwd.o pproxy.o proxy.o raw.o rlogin.o settings.o ssh.o \ 
     
    52485541-               x11fwd.o -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 \ 
    52495542-               -lshell32 -luser32 -lwinmm -lwinspool 
    5250 +               cproxy.o ldisc.o libpkcs11.o local_cmd.o logging.o misc.o \ 
    5251 +               pinger.o plink.res.o portfwd.o pproxy.o proxy.o raw.o \ 
    5252 +               rlogin.o settings.o ssh.o sshaes.o sshblowf.o sshbn.o \ 
    5253 +               sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o \ 
    5254 +               sshpubk.o sshrand.o sshrsa.o sshscard.o sshsh512.o sshsha.o \ 
    5255 +               sshzlib.o telnet.o timing.o tree234.o version.o wildcard.o \ 
    5256 +               wincons.o windefs.o winmisc.o winnet.o winnoise.o winpgntc.o \ 
    5257 +               winplink.o winstore.o wintime.o x11fwd.o -ladvapi32 \ 
    5258 +               -lcomctl32 -lcomdlg32 -lgdi32 -limm32 -lshell32 -luser32 \ 
    5259 +               -lwinmm -lwinspool 
     5543+               winmisc.o winnet.o winnoise.o winpgntc.o winsftp.o \ 
     5544+               winstore.o wintime.o x11fwd.o -ladvapi32 -lcomctl32 \ 
     5545+               -lcomdlg32 -lgdi32 -limm32 -lshell32 -luser32 -lwinmm \ 
     5546+               -lwinspool 
    52605547  
    52615548-pscp.exe: be_none.o cmdline.o cproxy.o int64.o logging.o misc.o pinger.o \ 
     
    52675554-               winnoise.o winpgntc.o winsftp.o winstore.o wintime.o \ 
    52685555-               x11fwd.o 
    5269 +pscp.exe: be_none.o cmdline.o cproxy.o int64.o libpkcs11.o local_cmd.o \ 
    5270 +               logging.o misc.o pinger.o portfwd.o pproxy.o proxy.o pscp.o \ 
    5271 +               pscp.res.o settings.o sftp.o ssh.o sshaes.o sshblowf.o \ 
    5272 +               sshbn.o sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o \ 
    5273 +               sshmd5.o sshpubk.o sshrand.o sshrsa.o sshscard.o sshsh512.o \ 
    5274 +               sshsha.o sshzlib.o timing.o tree234.o version.o wildcard.o \ 
    5275 +               wincons.o windefs.o winmisc.o winnet.o winnoise.o winpgntc.o \ 
    5276 +               winsftp.o winstore.o wintime.o x11fwd.o 
    5277         $(CC) $(LDFLAGS) -o $@ -Wl,-Map,pscp.map be_none.o cmdline.o \ 
     5556-       $(CC) $(LDFLAGS) -o $@ -Wl,-Map,pscp.map be_none.o cmdline.o \ 
    52785557-               cproxy.o int64.o logging.o misc.o pinger.o portfwd.o \ 
    52795558-               pproxy.o proxy.o pscp.o pscp.res.o settings.o sftp.o ssh.o \ 
    5280 -               sshaes.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o \ 
    5281 -               sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o \ 
    5282 -               sshsh512.o sshsha.o sshzlib.o timing.o tree234.o version.o \ 
    5283 -               wildcard.o wincons.o windefs.o winmisc.o winnet.o winnoise.o \ 
    5284 -               winpgntc.o winsftp.o winstore.o wintime.o x11fwd.o \ 
    5285 -               -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 -lshell32 \ 
    5286 -               -luser32 -lwinmm -lwinspool 
    5287 +               cproxy.o int64.o libpkcs11.o local_cmd.o logging.o misc.o \ 
    5288 +               pinger.o portfwd.o pproxy.o proxy.o pscp.o pscp.res.o \ 
    5289 +               settings.o sftp.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o \ 
    5290 +               sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o \ 
    5291 +               sshrand.o sshrsa.o sshscard.o sshsh512.o sshsha.o sshzlib.o \ 
    5292 +               timing.o tree234.o version.o wildcard.o wincons.o windefs.o \ 
    5293 +               winmisc.o winnet.o winnoise.o winpgntc.o winsftp.o \ 
    5294 +               winstore.o wintime.o x11fwd.o -ladvapi32 -lcomctl32 \ 
    5295 +               -lcomdlg32 -lgdi32 -limm32 -lshell32 -luser32 -lwinmm \ 
    5296 +               -lwinspool 
    5297   
    5298 -psftp.exe: be_none.o cmdline.o cproxy.o int64.o logging.o misc.o pinger.o \ 
    5299 -               portfwd.o pproxy.o proxy.o pscp.res.o psftp.o settings.o \ 
    5300 -               sftp.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o \ 
    5301 -               sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o \ 
    5302 -               sshrsa.o sshsh512.o sshsha.o sshzlib.o timing.o tree234.o \ 
    5303 -               version.o wildcard.o wincons.o windefs.o winmisc.o winnet.o \ 
    5304 -               winnoise.o winpgntc.o winsftp.o winstore.o wintime.o \ 
    5305 -               x11fwd.o 
    5306 -       $(CC) $(LDFLAGS) -o $@ -Wl,-Map,psftp.map be_none.o cmdline.o \ 
    5307 -               cproxy.o int64.o logging.o misc.o pinger.o portfwd.o \ 
    5308 -               pproxy.o proxy.o pscp.res.o psftp.o settings.o sftp.o ssh.o \ 
    53095559-               sshaes.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o \ 
    53105560-               sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o \ 
     
    53195569-               -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 -lshell32 \ 
    53205570-               -luser32 -lwinmm -lwinspool 
     5571- 
     5572-psftp.exe: be_none.o cmdline.o cproxy.o int64.o logging.o misc.o pinger.o \ 
     5573-               portfwd.o pproxy.o proxy.o pscp.res.o psftp.o settings.o \ 
     5574-               sftp.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o \ 
     5575-               sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o \ 
     5576-               sshrsa.o sshsh512.o sshsha.o sshzlib.o timing.o tree234.o \ 
     5577-               version.o wildcard.o wincons.o windefs.o winmisc.o winnet.o \ 
     5578-               winnoise.o winpgntc.o winsftp.o winstore.o wintime.o \ 
     5579-               x11fwd.o 
    53215580+               winpgntc.o winsftp.o winstore.o wintime.o x11fwd.o 
    5322 +       $(CC) $(LDFLAGS) -o $@ -Wl,-Map,psftp.map be_none.o cmdline.o \ 
     5581        $(CC) $(LDFLAGS) -o $@ -Wl,-Map,psftp.map be_none.o cmdline.o \ 
     5582-               cproxy.o int64.o logging.o misc.o pinger.o portfwd.o \ 
     5583-               pproxy.o proxy.o pscp.res.o psftp.o settings.o sftp.o ssh.o \ 
     5584-               sshaes.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o \ 
     5585-               sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o \ 
     5586-               sshsh512.o sshsha.o sshzlib.o timing.o tree234.o version.o \ 
     5587-               wildcard.o wincons.o windefs.o winmisc.o winnet.o winnoise.o \ 
     5588-               winpgntc.o winsftp.o winstore.o wintime.o x11fwd.o \ 
     5589-               -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 -lshell32 \ 
     5590-               -luser32 -lwinmm -lwinspool 
    53235591+               cproxy.o int64.o libpkcs11.o local_cmd.o logging.o misc.o \ 
    53245592+               pinger.o portfwd.o pproxy.o proxy.o pscp.res.o psftp.o \ 
     
    53785646 puttygen.exe: import.o misc.o notiming.o puttygen.res.o sshaes.o sshbn.o \ 
    53795647                sshdes.o sshdss.o sshdssg.o sshmd5.o sshprime.o sshpubk.o \ 
    5380 @@ -322,6 +325,13 @@ 
     5648@@ -322,6 +326,13 @@ 
    53815649                ../puttymem.h ../windows/winhelp.h ../charset/charset.h 
    53825650        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../ldiscucs.c 
     
    53925660        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../charset/localenc.c 
    53935661  
    5394 @@ -592,9 +602,11 @@ 
     5662@@ -592,9 +603,11 @@ 
    53955663                ../charset/enum.c ../charset/sbcsdat.c ../charset/utf8.c 
    53965664        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../charset/slookup.c 
     
    54065674        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../ssh.c 
    54075675  
    5408 @@ -660,6 +672,15 @@ 
     5676@@ -660,6 +673,15 @@ 
    54095677                ../misc.h 
    54105678        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../sshrsag.c 
     
    54225690                ../misc.h 
    54235691        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../sshsh512.c 
     5692@@ -920,9 +942,10 @@ 
     5693        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../windows/winpgen.c 
     5694  
     5695 winpgnt.o: ../windows/winpgnt.c ../putty.h ../ssh.h ../misc.h ../tree234.h \ 
     5696-               ../puttyps.h ../network.h ../puttymem.h ../int64.h \ 
     5697-               ../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \ 
     5698-               ../unix/unix.h ../windows/winhelp.h ../charset/charset.h 
     5699+               ../sshscard.h ../puttyps.h ../network.h ../puttymem.h \ 
     5700+               ../int64.h ../windows/winstuff.h ../mac/macstuff.h \ 
     5701+               ../macosx/osx.h ../unix/unix.h ../windows/winhelp.h \ 
     5702+               ../charset/charset.h 
     5703        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../windows/winpgnt.c 
     5704  
     5705 winpgntc.o: ../windows/winpgntc.c ../putty.h ../puttyps.h ../network.h \ 
    54245706diff -udrNP putty-0.58.orig/windows/Makefile.lcc putty-0.58/windows/Makefile.lcc 
    5425 --- putty-0.58.orig/windows/Makefile.lcc        2005-05-11 19:10:29.448746944 +0200 
    5426 +++ putty-0.58/windows/Makefile.lcc     2005-05-11 19:10:24.029570784 +0200 
    5427 @@ -102,93 +102,99 @@ 
    5428                 shell32.lib wsock32.lib ws2_32.lib winspool.lib winmm.lib \ 
    5429                 imm32.lib 
     5707--- putty-0.58.orig/windows/Makefile.lcc        2005-06-06 11:51:12.757564800 +0200 
     5708+++ putty-0.58/windows/Makefile.lcc     2005-06-06 12:14:39.520704296 +0200 
     5709@@ -91,104 +91,110 @@ 
     5710 all: pageant.exe plink.exe pscp.exe psftp.exe putty.exe puttygen.exe \ 
     5711                puttytel.exe 
     5712  
     5713-pageant.exe: misc.obj pageant.res sshaes.obj sshbn.obj sshdes.obj sshdss.obj \ 
     5714-               sshmd5.obj sshpubk.obj sshrsa.obj sshsh512.obj sshsha.obj \ 
     5715-               tree234.obj version.obj winmisc.obj winpgnt.obj winpgntc.obj \ 
     5716-               winutils.obj 
     5717-       lcclnk -subsystem  windows -o pageant.exe misc.obj pageant.res sshaes.obj \ 
     5718-               sshbn.obj sshdes.obj sshdss.obj sshmd5.obj sshpubk.obj \ 
     5719-               sshrsa.obj sshsh512.obj sshsha.obj tree234.obj version.obj \ 
     5720-               winmisc.obj winpgnt.obj winpgntc.obj winutils.obj \ 
     5721-               shell32.lib wsock32.lib ws2_32.lib winspool.lib winmm.lib \ 
     5722-               imm32.lib 
     5723+pageant.exe: libpkcs11.obj misc.obj pageant.res sshaes.obj sshbn.obj \ 
     5724+               sshdes.obj sshdss.obj sshmd5.obj sshpubk.obj sshrsa.obj \ 
     5725+               sshscard.obj sshsh512.obj sshsha.obj tree234.obj version.obj \ 
     5726+               winmisc.obj winpgnt.obj winpgntc.obj winutils.obj 
     5727+       lcclnk -subsystem  windows -o pageant.exe libpkcs11.obj misc.obj \ 
     5728+               pageant.res sshaes.obj sshbn.obj sshdes.obj sshdss.obj \ 
     5729+               sshmd5.obj sshpubk.obj sshrsa.obj sshscard.obj sshsh512.obj \ 
     5730+               sshsha.obj tree234.obj version.obj winmisc.obj winpgnt.obj \ 
     5731+               winpgntc.obj winutils.obj shell32.lib wsock32.lib ws2_32.lib \ 
     5732+               winspool.lib winmm.lib imm32.lib 
    54305733  
    54315734-plink.exe: be_all.obj cmdline.obj cproxy.obj ldisc.obj logging.obj misc.obj \ 
     
    56385941                ..\misc.h 
    56395942        lcc -O -p6 $(COMPAT) $(XFLAGS) $(CFLAGS) ..\sshsh512.c 
     5943@@ -799,9 +821,10 @@ 
     5944                ..\charset\charset.h 
     5945        lcc -O -p6 $(COMPAT) $(XFLAGS) $(CFLAGS) ..\windows\winpgen.c 
     5946 winpgnt.obj: ..\windows\winpgnt.c ..\putty.h ..\ssh.h ..\misc.h ..\tree234.h \ 
     5947-               ..\puttyps.h ..\network.h ..\puttymem.h ..\int64.h \ 
     5948-               ..\windows\winstuff.h ..\mac\macstuff.h ..\macosx\osx.h \ 
     5949-               ..\unix\unix.h ..\windows\winhelp.h ..\charset\charset.h 
     5950+               ..\sshscard.h ..\puttyps.h ..\network.h ..\puttymem.h \ 
     5951+               ..\int64.h ..\windows\winstuff.h ..\mac\macstuff.h \ 
     5952+               ..\macosx\osx.h ..\unix\unix.h ..\windows\winhelp.h \ 
     5953+               ..\charset\charset.h 
     5954        lcc -O -p6 $(COMPAT) $(XFLAGS) $(CFLAGS) ..\windows\winpgnt.c 
     5955 winpgntc.obj: ..\windows\winpgntc.c ..\putty.h ..\puttyps.h ..\network.h \ 
     5956                ..\misc.h ..\windows\winstuff.h ..\mac\macstuff.h \ 
    56405957diff -udrNP putty-0.58.orig/windows/Makefile.vc putty-0.58/windows/Makefile.vc 
    5641 --- putty-0.58.orig/windows/Makefile.vc 2005-05-11 19:10:29.292770656 +0200 
    5642 +++ putty-0.58/windows/Makefile.vc      2005-05-11 19:10:23.867595408 +0200 
    5643 @@ -97,49 +97,53 @@ 
    5644                 winutils.obj pageant.rsp 
     5958--- putty-0.58.orig/windows/Makefile.vc 2005-06-06 11:51:12.606587752 +0200 
     5959+++ putty-0.58/windows/Makefile.vc      2005-06-06 12:14:39.363728160 +0200 
     5960@@ -91,55 +91,60 @@ 
     5961 all: pageant.exe plink.exe pscp.exe psftp.exe putty.exe puttygen.exe \ 
     5962                puttytel.exe 
     5963  
     5964-pageant.exe: misc.obj pageant.res sshaes.obj sshbn.obj sshdes.obj sshdss.obj \ 
     5965-               sshmd5.obj sshpubk.obj sshrsa.obj sshsh512.obj sshsha.obj \ 
     5966-               tree234.obj version.obj winmisc.obj winpgnt.obj winpgntc.obj \ 
     5967-               winutils.obj pageant.rsp 
     5968+pageant.exe: libpkcs11.obj misc.obj pageant.res sshaes.obj sshbn.obj \ 
     5969+               sshdes.obj sshdss.obj sshmd5.obj sshpubk.obj sshrsa.obj \ 
     5970+               sshscard.obj sshsh512.obj sshsha.obj tree234.obj version.obj \ 
     5971+               winmisc.obj winpgnt.obj winpgntc.obj winutils.obj \ 
     5972+               pageant.rsp 
    56455973        link $(LFLAGS) -out:pageant.exe -map:pageant.map @pageant.rsp 
    56465974  
     
    57296057                winutils.obj x11fwd.obj putty.rsp 
    57306058        link $(LFLAGS) -out:putty.exe -map:putty.map @putty.rsp 
    5731 @@ -176,65 +180,67 @@ 
     6059@@ -165,76 +170,79 @@ 
     6060 pageant.rsp: $(MAKEFILE) 
     6061        echo /nologo /subsystem:windows > pageant.rsp 
     6062        echo advapi32.lib comctl32.lib comdlg32.lib gdi32.lib >> pageant.rsp 
     6063-       echo imm32.lib misc.obj pageant.res shell32.lib >> pageant.rsp 
     6064-       echo sshaes.obj sshbn.obj sshdes.obj sshdss.obj >> pageant.rsp 
     6065-       echo sshmd5.obj sshpubk.obj sshrsa.obj sshsh512.obj >> pageant.rsp 
     6066-       echo sshsha.obj tree234.obj user32.lib version.obj >> pageant.rsp 
     6067-       echo winmisc.obj winmm.lib winpgnt.obj winpgntc.obj >> pageant.rsp 
     6068-       echo winspool.lib winutils.obj >> pageant.rsp 
     6069+       echo imm32.lib libpkcs11.obj misc.obj pageant.res >> pageant.rsp 
     6070+       echo shell32.lib sshaes.obj sshbn.obj sshdes.obj >> pageant.rsp 
     6071+       echo sshdss.obj sshmd5.obj sshpubk.obj sshrsa.obj >> pageant.rsp 
     6072+       echo sshscard.obj sshsh512.obj sshsha.obj tree234.obj >> pageant.rsp 
     6073+       echo user32.lib version.obj winmisc.obj winmm.lib >> pageant.rsp 
     6074+       echo winpgnt.obj winpgntc.obj winspool.lib >> pageant.rsp 
     6075+       echo winutils.obj >> pageant.rsp 
     6076  
     6077 plink.rsp: $(MAKEFILE) 
    57326078        echo /nologo /subsystem:console > plink.rsp 
    57336079        echo advapi32.lib be_all.obj cmdline.obj comctl32.lib >> plink.rsp 
     
    58406186        echo user32.lib version.obj wcwidth.obj wildcard.obj >> putty.rsp 
    58416187        echo win_res.res wincfg.obj winctrls.obj windefs.obj >> putty.rsp 
    5842 @@ -370,6 +376,14 @@ 
     6188@@ -370,6 +378,14 @@ 
    58436189                ..\puttymem.h ..\windows\winhelp.h ..\charset\charset.h 
    58446190        cl $(COMPAT) $(XFLAGS) $(CFLAGS) /c ..\ldiscucs.c 
     
    58556201                ..\charset\internal.h 
    58566202        cl $(COMPAT) $(XFLAGS) $(CFLAGS) /c ..\charset\localenc.c 
    5857 @@ -643,9 +657,11 @@ 
     6203@@ -643,9 +659,11 @@ 
    58586204                ..\charset\enum.c ..\charset\sbcsdat.c ..\charset\utf8.c 
    58596205        cl $(COMPAT) $(XFLAGS) $(CFLAGS) /c ..\charset\slookup.c 
     
    58696215        cl $(COMPAT) $(XFLAGS) $(CFLAGS) /c ..\ssh.c 
    58706216  
    5871 @@ -713,6 +729,15 @@ 
     6217@@ -713,6 +731,15 @@ 
    58726218                ..\misc.h 
    58736219        cl $(COMPAT) $(XFLAGS) $(CFLAGS) /c ..\sshrsag.c 
     
    58856231                ..\misc.h 
    58866232        cl $(COMPAT) $(XFLAGS) $(CFLAGS) /c ..\sshsh512.c 
     6233@@ -973,9 +1000,10 @@ 
     6234        cl $(COMPAT) $(XFLAGS) $(CFLAGS) /c ..\windows\winpgen.c 
     6235  
     6236 winpgnt.obj: ..\windows\winpgnt.c ..\putty.h ..\ssh.h ..\misc.h ..\tree234.h \ 
     6237-               ..\puttyps.h ..\network.h ..\puttymem.h ..\int64.h \ 
     6238-               ..\windows\winstuff.h ..\mac\macstuff.h ..\macosx\osx.h \ 
     6239-               ..\unix\unix.h ..\windows\winhelp.h ..\charset\charset.h 
     6240+               ..\sshscard.h ..\puttyps.h ..\network.h ..\puttymem.h \ 
     6241+               ..\int64.h ..\windows\winstuff.h ..\mac\macstuff.h \ 
     6242+               ..\macosx\osx.h ..\unix\unix.h ..\windows\winhelp.h \ 
     6243+               ..\charset\charset.h 
     6244        cl $(COMPAT) $(XFLAGS) $(CFLAGS) /c ..\windows\winpgnt.c 
     6245  
     6246 winpgntc.obj: ..\windows\winpgntc.c ..\putty.h ..\puttyps.h ..\network.h \ 
    58876247diff -udrNP putty-0.58.orig/windows/winhelp.h putty-0.58/windows/winhelp.h 
    58886248--- putty-0.58.orig/windows/winhelp.h   2005-04-05 21:37:38.000000000 +0200 
    5889 +++ putty-0.58/windows/winhelp.h        2005-05-11 17:56:58.000000000 +0200 
     6249+++ putty-0.58/windows/winhelp.h        2005-06-06 11:50:58.579720160 +0200 
    58906250@@ -99,6 +99,9 @@ 
    58916251 #define WINHELP_CTX_ssh_auth_changeuser "ssh.auth.changeuser" 
     
    59066266 #define WINHELP_CTX_ssh_tunnels_x11auth "ssh.tunnels.x11auth" 
    59076267 #define WINHELP_CTX_ssh_tunnels_portfwd "ssh.tunnels.portfwd" 
     6268diff -udrNP putty-0.58.orig/windows/winpgnt.c putty-0.58/windows/winpgnt.c 
     6269--- putty-0.58.orig/windows/winpgnt.c   2005-04-05 21:37:38.000000000 +0200 
     6270+++ putty-0.58/windows/winpgnt.c        2005-06-06 11:51:02.168174632 +0200 
     6271@@ -15,6 +15,8 @@ 
     6272 #include "misc.h" 
     6273 #include "tree234.h" 
     6274  
     6275+#include "sshscard.h" 
     6276+ 
     6277 #include <shellapi.h> 
     6278  
     6279 #ifndef NO_SECURITY 
     6280@@ -67,9 +69,16 @@ 
     6281 #define PUTTY_DEFAULT     "Default%20Settings" 
     6282 static int initial_menuitems_count; 
     6283  
     6284+char* smartcard_comment="Smartcard"; 
     6285 /* 
     6286  * Print a modal (Really Bad) message box and perform a fatal exit. 
     6287  */ 
     6288+ 
     6289+void logevent( void * frontend, const char * string) { 
     6290+       fprintf(stderr, string); 
     6291+} 
     6292+ 
     6293+ 
     6294 void modalfatalbox(char *fmt, ...) 
     6295 { 
     6296     va_list ap; 
     6297@@ -409,7 +418,7 @@ 
     6298     int original_pass; 
     6299         
     6300     type = key_type(&filename); 
     6301-    if (type != SSH_KEYTYPE_SSH1 && type != SSH_KEYTYPE_SSH2) { 
     6302+    if (type != SSH_KEYTYPE_SSH1 && type != SSH_KEYTYPE_SSH2  && type != SSH_KEYTYPE_SMARTCARD) { 
     6303        char *msg = dupprintf("Couldn't load this key (%s)", 
     6304                              key_type_to_str(type)); 
     6305        message_box(msg, APPNAME, MB_OK | MB_ICONERROR, 
     6306@@ -438,7 +447,12 @@ 
     6307            keylist = get_keylist1(&keylistlen); 
     6308        } else { 
     6309            unsigned char *blob2; 
     6310-           blob = ssh2_userkey_loadpub(&filename, NULL, &bloblen, &error); 
     6311+           if (type == SSH_KEYTYPE_SMARTCARD) { 
     6312+               char* algorithm; 
     6313+               blob = ssh2_userkey_loadpkcs11pub_fromfile(&filename, &algorithm, &bloblen, &error, &modalfatalbox); 
     6314+           } else { 
     6315+               blob = ssh2_userkey_loadpub(&filename, NULL, &bloblen, &error); 
     6316+           } 
     6317            if (!blob) { 
     6318                char *msg = dupprintf("Couldn't load private key (%s)", error); 
     6319                message_box(msg, APPNAME, MB_OK | MB_ICONERROR, 
     6320@@ -526,7 +540,11 @@ 
     6321     error = NULL; 
     6322     if (type == SSH_KEYTYPE_SSH1) 
     6323        needs_pass = rsakey_encrypted(&filename, &comment); 
     6324-    else 
     6325+    if (type == SSH_KEYTYPE_SMARTCARD)  { 
     6326+       needs_pass = 1; 
     6327+       comment=malloc(10); 
     6328+       strncpy(comment,"smartcard",10); 
     6329+    } else 
     6330        needs_pass = ssh2_userkey_encrypted(&filename, &comment); 
     6331     attempts = 0; 
     6332     if (type == SSH_KEYTYPE_SSH1) 
     6333@@ -535,10 +553,10 @@ 
     6334     pps.comment = comment; 
     6335     original_pass = 0; 
     6336     do { 
     6337-       if (needs_pass) { 
     6338+       if (needs_pass ) { 
     6339            /* try all the remembered passphrases first */ 
     6340            char *pp = index234(passphrases, attempts); 
     6341-           if(pp) { 
     6342+           if(pp && type != SSH_KEYTYPE_SMARTCARD) { 
     6343                strcpy(passphrase, pp); 
     6344            } else { 
     6345                int dlgret; 
     6346@@ -559,7 +577,10 @@ 
     6347        if (type == SSH_KEYTYPE_SSH1) 
     6348            ret = loadrsakey(&filename, rkey, passphrase, &error); 
     6349        else { 
     6350-           skey = ssh2_load_userkey(&filename, passphrase, &error); 
     6351+           if (type == SSH_KEYTYPE_SMARTCARD)  
     6352+               skey = ssh2_load_pkcs11key_fromfile(&filename, passphrase, NULL); 
     6353+           else 
     6354+               skey = ssh2_load_userkey(&filename, passphrase, &error); 
     6355            if (skey == SSH2_WRONG_PASSPHRASE) 
     6356                ret = -1; 
     6357            else if (!skey) 
     6358@@ -638,12 +659,19 @@ 
     6359        } else { 
     6360            if (add234(rsakeys, rkey) != rkey) 
     6361                sfree(rkey);           /* already present, don't waste RAM */ 
     6362-       } 
     6363+       }  
     6364     } else { 
     6365        if (already_running) { 
     6366            unsigned char *request, *response; 
     6367            void *vresponse; 
     6368            int reqlen, alglen, clen, keybloblen, resplen, ret; 
     6369+ 
     6370+           if (type == SSH_KEYTYPE_SMARTCARD) { 
     6371+               /* big problem here.  Can't hand key data upstream */ 
     6372+               modalfatalbox("Can't send smartcard key to running pageant"); 
     6373+           } 
     6374+ 
     6375+ 
     6376            alglen = strlen(skey->alg->name); 
     6377            clen = strlen(skey->comment); 
     6378  
     6379@@ -686,6 +714,7 @@ 
     6380            if (add234(ssh2keys, skey) != skey) { 
     6381                skey->alg->freekey(skey->data); 
     6382                sfree(skey);           /* already present, don't waste RAM */ 
     6383+               /* need to check library status for releasing smartcard key - KLS */ 
     6384            } 
     6385        } 
     6386     } 
     6387@@ -1009,9 +1038,14 @@ 
     6388            if (msgend < p+datalen) 
     6389                goto failure; 
     6390            data = p; 
     6391+           //modalfatalbox("about to look for key"); 
     6392+//MessageBox(NULL, "Asked to sign", APPNAME, 
     6393+//                MB_OK | MB_ICONERROR); 
     6394+ 
     6395            key = find234(ssh2keys, &b, cmpkeys_ssh2_asymm); 
     6396-           if (!key) 
     6397+           if ((!key) || (!key->alg) || (!key->alg->sign) || (!key->data) ) 
     6398                goto failure; 
     6399+        
     6400            signature = key->alg->sign(key->data, data, datalen, &siglen); 
     6401            len = 5 + 4 + siglen; 
     6402            PUT_32BIT(ret, len - 4); 
     6403@@ -1285,6 +1319,7 @@ 
     6404        /* 
     6405         * Unrecognised message. Return SSH_AGENT_FAILURE. 
     6406         */ 
     6407+       modalfatalbox("failed to respond"); 
     6408        PUT_32BIT(ret, 1); 
     6409        ret[4] = SSH_AGENT_FAILURE; 
     6410        break; 
     6411@@ -2095,6 +2130,7 @@ 
     6412                command = ""; 
     6413            break; 
     6414        } else { 
     6415+           fprintf(stderr, "processing key files\n"); 
     6416            add_keyfile(filename_from_str(argv[i])); 
     6417            added_keys = TRUE; 
     6418        } 
  • trunk/scb.iss

    r17 r20  
    33 
    44#define MyAppName "Smart card bundle" 
    5 #define MyAppVerName "Smart card bundle 0.4rc1" 
     5#define MyAppVerName "Smart card bundle 0.4rc2" 
    66#define MyAppPublisher "Andreas Jellinghaus" 
    77#define MyAppURL "http://www.opensc.org/scb/" 
     
    1818DefaultGroupName={#MyAppName} 
    1919LicenseFile=TARGET\LICENSE 
    20 OutputBaseFilename=scb-0.4rc1 
     20OutputBaseFilename=scb-0.4rc2 
    2121Compression=lzma 
    2222SolidCompression=yes 
Note: See TracChangeset for help on using the changeset viewer.