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

« back to all changes in this revision

Viewing changes to libtomcrypt/src/math/multi.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:
 
1
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
 
2
 *
 
3
 * LibTomCrypt is a library that provides various cryptographic
 
4
 * algorithms in a highly modular and flexible manner.
 
5
 *
 
6
 * The library is free for all purposes without any express
 
7
 * guarantee it works.
 
8
 *
 
9
 * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
 
10
 */
 
11
#include "tomcrypt.h"
 
12
 
 
13
#ifdef MPI
 
14
#include <stdarg.h>
 
15
 
 
16
int ltc_init_multi(void **a, ...)
 
17
{
 
18
   void    **cur = a;
 
19
   int       np  = 0;
 
20
   va_list   args;
 
21
 
 
22
   va_start(args, a);
 
23
   while (cur != NULL) {
 
24
       if (mp_init(cur) != CRYPT_OK) {
 
25
          /* failed */
 
26
          va_list clean_list;
 
27
 
 
28
          va_start(clean_list, a);
 
29
          cur = a;
 
30
          while (np--) {
 
31
              mp_clear(*cur);
 
32
              cur = va_arg(clean_list, void**);
 
33
          }
 
34
          va_end(clean_list);
 
35
          return CRYPT_MEM;
 
36
       }
 
37
       ++np;
 
38
       cur = va_arg(args, void**);
 
39
   }
 
40
   va_end(args);
 
41
   return CRYPT_OK;   
 
42
}
 
43
 
 
44
void ltc_deinit_multi(void *a, ...)
 
45
{
 
46
   void     *cur = a;
 
47
   va_list   args;
 
48
 
 
49
   va_start(args, a);
 
50
   while (cur != NULL) {
 
51
       mp_clear(cur);
 
52
       cur = va_arg(args, void *);
 
53
   }
 
54
   va_end(args);
 
55
}
 
56
 
 
57
#endif
 
58
 
 
59
/* $Source: /cvs/libtom/libtomcrypt/src/math/multi.c,v $ */
 
60
/* $Revision: 1.5 $ */
 
61
/* $Date: 2006/03/31 14:15:35 $ */