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

Diff for /src/usr.bin/ssh/ssh-rsa.c between version 1.32 and 1.32.4.1

version 1.32, 2005/06/17 02:44:33 version 1.32.4.1, 2006/09/30 04:06:51
Line 1 
Line 1 
   /* $OpenBSD$ */
 /*  /*
  * Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org>   * Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org>
  *   *
Line 13 
Line 14 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
 #include "includes.h"  
 RCSID("$OpenBSD$");  
   
   #include <sys/types.h>
   
 #include <openssl/evp.h>  #include <openssl/evp.h>
 #include <openssl/err.h>  #include <openssl/err.h>
   
   #include <string.h>
   
 #include "xmalloc.h"  #include "xmalloc.h"
 #include "log.h"  #include "log.h"
 #include "buffer.h"  #include "buffer.h"
 #include "bufaux.h"  
 #include "key.h"  #include "key.h"
 #include "compat.h"  #include "compat.h"
 #include "ssh.h"  #include "ssh.h"
Line 62 
Line 64 
   
         if (ok != 1) {          if (ok != 1) {
                 int ecode = ERR_get_error();                  int ecode = ERR_get_error();
   
                 error("ssh_rsa_sign: RSA_sign failed: %s",                  error("ssh_rsa_sign: RSA_sign failed: %s",
                     ERR_error_string(ecode, NULL));                      ERR_error_string(ecode, NULL));
                 xfree(sig);                  xfree(sig);
Line 144 
Line 147 
                 u_int diff = modlen - len;                  u_int diff = modlen - len;
                 debug("ssh_rsa_verify: add padding: modlen %u > len %u",                  debug("ssh_rsa_verify: add padding: modlen %u > len %u",
                     modlen, len);                      modlen, len);
                 sigblob = xrealloc(sigblob, modlen);                  sigblob = xrealloc(sigblob, 1, modlen);
                 memmove(sigblob + diff, sigblob, len);                  memmove(sigblob + diff, sigblob, len);
                 memset(sigblob, 0, diff);                  memset(sigblob, 0, diff);
                 len = modlen;                  len = modlen;
Line 220 
Line 223 
                 break;                  break;
         default:          default:
                 goto done;                  goto done;
                 break;  
         }          }
         if (hashlen != hlen) {          if (hashlen != hlen) {
                 error("bad hashlen");                  error("bad hashlen");

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.32.4.1