[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.29 and 1.29.8.1

version 1.29, 2004/05/08 00:21:31 version 1.29.8.1, 2006/09/30 04:06:51
Line 1 
Line 1 
   /* $OpenBSD$ */
 /*  /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.   * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *   *
Line 23 
Line 24 
  */   */
   
 #ifdef SMARTCARD  #ifdef SMARTCARD
 #include "includes.h"  
 RCSID("$OpenBSD$");  
   
   #include <sys/types.h>
   
 #include <openssl/evp.h>  #include <openssl/evp.h>
   
 #include <sectok.h>  #include <sectok.h>
   #include <string.h>
   
   #include "xmalloc.h"
 #include "key.h"  #include "key.h"
 #include "log.h"  #include "log.h"
 #include "xmalloc.h"  
 #include "misc.h"  #include "misc.h"
 #include "scard.h"  #include "scard.h"
   
Line 125 
Line 128 
         if (status == SCARD_ERROR_NOCARD) {          if (status == SCARD_ERROR_NOCARD) {
                 return SCARD_ERROR_NOCARD;                  return SCARD_ERROR_NOCARD;
         }          }
         if (status < 0 ) {          if (status < 0) {
                 error("sc_open failed");                  error("sc_open failed");
                 return status;                  return status;
         }          }
Line 215 
Line 218 
         olen = len = sw = 0;          olen = len = sw = 0;
         if (sc_fd < 0) {          if (sc_fd < 0) {
                 status = sc_init();                  status = sc_init();
                 if (status < 0 )                  if (status < 0)
                         goto err;                          goto err;
         }          }
         if (padding != RSA_PKCS1_PADDING)          if (padding != RSA_PKCS1_PADDING)
Line 255 
Line 258 
         len = sw = 0;          len = sw = 0;
         if (sc_fd < 0) {          if (sc_fd < 0) {
                 status = sc_init();                  status = sc_init();
                 if (status < 0 )                  if (status < 0)
                         goto err;                          goto err;
         }          }
         if (padding != RSA_PKCS1_PADDING)          if (padding != RSA_PKCS1_PADDING)
Line 378 
Line 381 
                 key_free(k);                  key_free(k);
                 return NULL;                  return NULL;
         }          }
         if (status < 0 ) {          if (status < 0) {
                 error("sc_read_pubkey failed");                  error("sc_read_pubkey failed");
                 key_free(k);                  key_free(k);
                 return NULL;                  return NULL;
         }          }
         keys = xmalloc((nkeys+1) * sizeof(Key *));          keys = xcalloc((nkeys+1), sizeof(Key *));
   
         n = key_new(KEY_RSA1);          n = key_new(KEY_RSA1);
         BN_copy(n->rsa->n, k->rsa->n);          BN_copy(n->rsa->n, k->rsa->n);

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.29.8.1