~ubuntu-branches/ubuntu/precise/dropbear/precise

« back to all changes in this revision

Viewing changes to libtomcrypt/src/encauth/ocb/s_ocb_done.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2007-03-02 20:48:18 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070302204818-ozmbou2sbyj7dus5
Tags: 0.49-1
* new upstream release, fixes
  * CVE-2007-1099: dropbear dbclient insufficient warning on hostkey
    mismatch (closes: #412899).
  * dbclient uses static "Password:" prompt instead of using the server's
    prompt (closes: #394996).
* debian/control: Suggests: openssh-client, not ssh (closes: #405686);
  Standards-Version: 3.7.2.2.
* debian/README.Debian: ssh -> openssh-server, openssh-client; remove
  'Replacing OpenSSH "sshd" with Dropbear' part, this is simply done by not
  installing the openssh-server package.
* debian/README.runit: runsvstat -> sv status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * The library is free for all purposes without any express
7
7
 * guarantee it works.
8
8
 *
9
 
 * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org
 
9
 * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
10
10
 */
11
11
 
12
12
/** 
84
84
   }
85
85
 
86
86
   /* Y[m] = E(X[m])) */
87
 
   cipher_descriptor[ocb->cipher].ecb_encrypt(X, Y, &ocb->key);
 
87
   if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(X, Y, &ocb->key)) != CRYPT_OK) {
 
88
      goto error;
 
89
   }
88
90
 
89
91
   if (mode == 1) {
90
92
      /* decrypt mode, so let's xor it first */
113
115
   }
114
116
   
115
117
   /* encrypt checksum, er... tag!! */
116
 
   cipher_descriptor[ocb->cipher].ecb_encrypt(ocb->checksum, X, &ocb->key);
 
118
   if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(ocb->checksum, X, &ocb->key)) != CRYPT_OK) {
 
119
      goto error;
 
120
   }
117
121
   cipher_descriptor[ocb->cipher].done(&ocb->key);
118
122
 
119
123
   /* now store it */
128
132
   zeromem(Z, MAXBLOCKSIZE);
129
133
   zeromem(ocb, sizeof(*ocb));
130
134
#endif
131
 
   
 
135
error:   
132
136
   XFREE(X);
133
137
   XFREE(Y);
134
138
   XFREE(Z);
135
139
 
136
 
   return CRYPT_OK;
 
140
   return err;
137
141
}
138
142
 
139
143
#endif
140
144
 
141
145
 
142
146
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/s_ocb_done.c,v $ */
143
 
/* $Revision: 1.4 $ */
144
 
/* $Date: 2005/05/05 14:35:58 $ */
 
147
/* $Revision: 1.6 $ */
 
148
/* $Date: 2006/03/31 14:15:35 $ */