[BACK]Return to scard.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/Attic/scard.c between version 1.14.2.3 and 1.15

version 1.14.2.3, 2002/03/08 17:04:42 version 1.15, 2001/09/28 09:49:31
Line 48 
Line 48 
   
 /* interface to libsectok */  /* interface to libsectok */
   
 static int  static int
 sc_open(void)  sc_open(void)
 {  {
         int sw;          int sw;
Line 79 
Line 79 
         return sc_fd;          return sc_fd;
 }  }
   
 static int  static int
 sc_enable_applet(void)  sc_enable_applet(void)
 {  {
         static u_char aid[] = {0xfc, 0x53, 0x73, 0x68, 0x2e, 0x62, 0x69, 0x6e};          static u_char aid[] = {0xfc, 0x53, 0x73, 0x68, 0x2e, 0x62, 0x69, 0x6e};
Line 95 
Line 95 
         return 0;          return 0;
 }  }
   
 static int  static int
 sc_init(void)  sc_init(void)
 {  {
         int status;          int status;
Line 115 
Line 115 
         return 0;          return 0;
 }  }
   
 static int  static int
 sc_read_pubkey(Key * k)  sc_read_pubkey(Key * k)
 {  {
         u_char buf[2], *n;          u_char buf[2], *n;
Line 133 
Line 133 
   
         /* get key size */          /* get key size */
         sectok_apdu(sc_fd, CLA_SSH, INS_GET_KEYLENGTH, 0, 0, 0, NULL,          sectok_apdu(sc_fd, CLA_SSH, INS_GET_KEYLENGTH, 0, 0, 0, NULL,
             sizeof(buf), buf, &sw);               sizeof(buf), buf, &sw);
         if (!sectok_swOK(sw)) {          if (!sectok_swOK(sw)) {
                 error("could not obtain key length: %s", sectok_get_sw(sw));                  error("could not obtain key length: %s", sectok_get_sw(sw));
                 goto err;                  goto err;
Line 204 
Line 204 
                 goto err;                  goto err;
         }          }
         sectok_apdu(sc_fd, CLA_SSH, INS_GET_RESPONSE, 0, 0, 0, NULL,          sectok_apdu(sc_fd, CLA_SSH, INS_GET_RESPONSE, 0, 0, 0, NULL,
             len, padded, &sw);               len, padded, &sw);
         if (!sectok_swOK(sw)) {          if (!sectok_swOK(sw)) {
                 error("sc_private_decrypt: INS_GET_RESPONSE failed: %s",                  error("sc_private_decrypt: INS_GET_RESPONSE failed: %s",
                     sectok_get_sw(sw));                      sectok_get_sw(sw));
Line 249 
Line 249 
                 goto err;                  goto err;
         }          }
         sectok_apdu(sc_fd, CLA_SSH, INS_GET_RESPONSE, 0, 0, 0, NULL,          sectok_apdu(sc_fd, CLA_SSH, INS_GET_RESPONSE, 0, 0, 0, NULL,
             len, to, &sw);               len, to, &sw);
         if (!sectok_swOK(sw)) {          if (!sectok_swOK(sw)) {
                 error("sc_private_decrypt: INS_GET_RESPONSE failed: %s",                  error("sc_private_decrypt: INS_GET_RESPONSE failed: %s",
                     sectok_get_sw(sw));                      sectok_get_sw(sw));
Line 320 
Line 320 
         smart_rsa.rsa_sign      = def->rsa_sign;          smart_rsa.rsa_sign      = def->rsa_sign;
         smart_rsa.rsa_verify    = def->rsa_verify;          smart_rsa.rsa_verify    = def->rsa_verify;
   
         if ((smart_engine = ENGINE_new()) == NULL)          smart_engine = ENGINE_new();
                 fatal("ENGINE_new failed");  
   
         ENGINE_set_id(smart_engine, "sectok");          ENGINE_set_id(smart_engine, "sectok");
         ENGINE_set_name(smart_engine, "libsectok");          ENGINE_set_name(smart_engine, "libsectok");

Legend:
Removed from v.1.14.2.3  
changed lines
  Added in v.1.15