~ubuntu-branches/ubuntu/utopic/dropbear/utopic-proposed

« back to all changes in this revision

Viewing changes to libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_multi.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape, Matt Johnston, Gerrit Pape
  • Date: 2008-03-27 20:08:06 UTC
  • mfrom: (1.4.1 upstream) (9 hardy)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20080327200806-c1hhdgt3ht2gk496
Tags: 0.51-1
[ Matt Johnston ]
* New upstream release.
  - Wait until a process exits before the server closes a connection,
    so that an exit code can be sent. This fixes problems with exit
    codes not being returned, which could cause scp to fail (closes:
    #448397, #472483).

[ Gerrit Pape ]
* debian/dropbear.postinst: don't print an error message if the
  update-service program is not installed (thx Matt).

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
#include "tomcrypt.h"
12
12
#include <stdarg.h>
19
19
 
20
20
#ifdef LTC_DER
21
21
 
 
22
/**
 
23
  Decode a SEQUENCE type using a VA list
 
24
  @param in    Input buffer
 
25
  @param inlen Length of input in octets
 
26
  @remark <...> is of the form <type, size, data> (int, unsigned long, void*)
 
27
  @return CRYPT_OK on success
 
28
*/  
22
29
int der_decode_sequence_multi(const unsigned char *in, unsigned long inlen, ...)
23
30
{
24
31
   int           err, type;
42
49
       }
43
50
 
44
51
       switch (type) {
 
52
           case LTC_ASN1_BOOLEAN:
45
53
           case LTC_ASN1_INTEGER:
46
54
           case LTC_ASN1_SHORT_INTEGER:
47
55
           case LTC_ASN1_BIT_STRING:
50
58
           case LTC_ASN1_OBJECT_IDENTIFIER:
51
59
           case LTC_ASN1_IA5_STRING:
52
60
           case LTC_ASN1_PRINTABLE_STRING:
 
61
           case LTC_ASN1_UTF8_STRING:
53
62
           case LTC_ASN1_UTCTIME:
 
63
           case LTC_ASN1_SET:
 
64
           case LTC_ASN1_SETOF:
54
65
           case LTC_ASN1_SEQUENCE:
55
66
           case LTC_ASN1_CHOICE:
56
67
                ++x; 
86
97
       }
87
98
 
88
99
       switch (type) {
 
100
           case LTC_ASN1_BOOLEAN:
89
101
           case LTC_ASN1_INTEGER:
90
102
           case LTC_ASN1_SHORT_INTEGER:
91
103
           case LTC_ASN1_BIT_STRING:
94
106
           case LTC_ASN1_OBJECT_IDENTIFIER:
95
107
           case LTC_ASN1_IA5_STRING:
96
108
           case LTC_ASN1_PRINTABLE_STRING:
 
109
           case LTC_ASN1_UTF8_STRING:
97
110
           case LTC_ASN1_UTCTIME:
98
111
           case LTC_ASN1_SEQUENCE:
 
112
           case LTC_ASN1_SET:
 
113
           case LTC_ASN1_SETOF:          
99
114
           case LTC_ASN1_CHOICE:
100
115
                list[x].type   = type;
101
116
                list[x].size   = size;
120
135
 
121
136
 
122
137
/* $Source: /cvs/libtom/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_multi.c,v $ */
123
 
/* $Revision: 1.7 $ */
124
 
/* $Date: 2005/06/18 19:20:23 $ */
 
138
/* $Revision: 1.12 $ */
 
139
/* $Date: 2006/11/26 02:25:18 $ */