~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/asn1/asn1t.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * The contents of this file are subject to the Mozilla Public
 
3
 * License Version 1.1 (the "License"); you may not use this file
 
4
 * except in compliance with the License. You may obtain a copy of
 
5
 * the License at http://www.mozilla.org/MPL/
 
6
 * 
 
7
 * Software distributed under the License is distributed on an "AS
 
8
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
9
 * implied. See the License for the specific language governing
 
10
 * rights and limitations under the License.
 
11
 * 
 
12
 * The Original Code is the Netscape security libraries.
 
13
 * 
 
14
 * The Initial Developer of the Original Code is Netscape
 
15
 * Communications Corporation.  Portions created by Netscape are 
 
16
 * Copyright (C) 1994-2000 Netscape Communications Corporation.  All
 
17
 * Rights Reserved.
 
18
 * 
 
19
 * Contributor(s):
 
20
 * 
 
21
 * Alternatively, the contents of this file may be used under the
 
22
 * terms of the GNU General Public License Version 2 or later (the
 
23
 * "GPL"), in which case the provisions of the GPL are applicable 
 
24
 * instead of those above.  If you wish to allow use of your 
 
25
 * version of this file only under the terms of the GPL and not to
 
26
 * allow others to use your version of this file under the MPL,
 
27
 * indicate your decision by deleting the provisions above and
 
28
 * replace them with the notice and other provisions required by
 
29
 * the GPL.  If you do not delete the provisions above, a recipient
 
30
 * may use your version of this file under either the MPL or the
 
31
 * GPL.
 
32
 */
 
33
 
 
34
#ifndef ASN1T_H
 
35
#define ASN1T_H
 
36
 
 
37
#ifdef DEBUG
 
38
static const char ASN1T_CVS_ID[] = "@(#) $RCSfile: asn1t.h,v $ $Revision: 1.2 $ $Date: 2001/01/07 08:12:46 $ $Name: FIREFOX_1_0_RELEASE $";
 
39
#endif /* DEBUG */
 
40
 
 
41
/*
 
42
 * asn1t.h
 
43
 *
 
44
 * This file contains the ASN.1 encoder/decoder types available 
 
45
 * internally within NSS.  It's not clear right now if this file
 
46
 * will be folded into baset.h or something, I just needed to
 
47
 * get this going.  At the moment, these types are wrappers for
 
48
 * the old types.
 
49
 */
 
50
 
 
51
#ifndef BASET_H
 
52
#include "baset.h"
 
53
#endif /* BASET_H */
 
54
 
 
55
#ifndef NSSASN1T_H
 
56
#include "nssasn1t.h"
 
57
#endif /* NSSASN1T_H */
 
58
 
 
59
#include "seccomon.h"
 
60
#include "secasn1t.h"
 
61
 
 
62
PR_BEGIN_EXTERN_C
 
63
 
 
64
/*
 
65
 * XXX fgmr
 
66
 *
 
67
 * This sort of bites.  Let's keep an eye on this, to make sure
 
68
 * we aren't stuck with it forever.
 
69
 */
 
70
 
 
71
struct nssASN1ItemStr {
 
72
  PRUint32 reserved;
 
73
  PRUint8 *data;
 
74
  PRUint32 size;
 
75
};
 
76
 
 
77
typedef struct nssASN1ItemStr nssASN1Item;
 
78
 
 
79
/*
 
80
 * I'm not documenting these here, since this'll require another
 
81
 * pass anyway.
 
82
 */
 
83
 
 
84
typedef SEC_ASN1Template nssASN1Template;
 
85
 
 
86
#define nssASN1_TAG_MASK               SEC_ASN1_TAG_MASK
 
87
 
 
88
#define nssASN1_TAGNUM_MASK            SEC_ASN1_TAGNUM_MASK
 
89
#define nssASN1_BOOLEAN                SEC_ASN1_BOOLEAN
 
90
#define nssASN1_INTEGER                SEC_ASN1_INTEGER
 
91
#define nssASN1_BIT_STRING             SEC_ASN1_BIT_STRING
 
92
#define nssASN1_OCTET_STRING           SEC_ASN1_OCTET_STRING
 
93
#define nssASN1_NULL                   SEC_ASN1_NULL
 
94
#define nssASN1_OBJECT_ID              SEC_ASN1_OBJECT_ID
 
95
#define nssASN1_OBJECT_DESCRIPTOR      SEC_ASN1_OBJECT_DESCRIPTOR
 
96
/* External type and instance-of type   0x08 */
 
97
#define nssASN1_REAL                   SEC_ASN1_REAL
 
98
#define nssASN1_ENUMERATED             SEC_ASN1_ENUMERATED
 
99
#define nssASN1_EMBEDDED_PDV           SEC_ASN1_EMBEDDED_PDV
 
100
#define nssASN1_UTF8_STRING            SEC_ASN1_UTF8_STRING
 
101
#define nssASN1_SEQUENCE               SEC_ASN1_SEQUENCE
 
102
#define nssASN1_SET                    SEC_ASN1_SET
 
103
#define nssASN1_NUMERIC_STRING         SEC_ASN1_NUMERIC_STRING
 
104
#define nssASN1_PRINTABLE_STRING       SEC_ASN1_PRINTABLE_STRING
 
105
#define nssASN1_T61_STRING             SEC_ASN1_T61_STRING
 
106
#define nssASN1_TELETEX_STRING         nssASN1_T61_STRING
 
107
#define nssASN1_VIDEOTEX_STRING        SEC_ASN1_VIDEOTEX_STRING
 
108
#define nssASN1_IA5_STRING             SEC_ASN1_IA5_STRING
 
109
#define nssASN1_UTC_TIME               SEC_ASN1_UTC_TIME
 
110
#define nssASN1_GENERALIZED_TIME       SEC_ASN1_GENERALIZED_TIME
 
111
#define nssASN1_GRAPHIC_STRING         SEC_ASN1_GRAPHIC_STRING
 
112
#define nssASN1_VISIBLE_STRING         SEC_ASN1_VISIBLE_STRING
 
113
#define nssASN1_GENERAL_STRING         SEC_ASN1_GENERAL_STRING
 
114
#define nssASN1_UNIVERSAL_STRING       SEC_ASN1_UNIVERSAL_STRING
 
115
/*                                      0x1d */
 
116
#define nssASN1_BMP_STRING             SEC_ASN1_BMP_STRING
 
117
#define nssASN1_HIGH_TAG_NUMBER        SEC_ASN1_HIGH_TAG_NUMBER
 
118
 
 
119
#define nssASN1_METHOD_MASK            SEC_ASN1_METHOD_MASK
 
120
#define nssASN1_PRIMITIVE              SEC_ASN1_PRIMITIVE
 
121
#define nssASN1_CONSTRUCTED            SEC_ASN1_CONSTRUCTED
 
122
                                                                
 
123
#define nssASN1_CLASS_MASK             SEC_ASN1_CLASS_MASK
 
124
#define nssASN1_UNIVERSAL              SEC_ASN1_UNIVERSAL
 
125
#define nssASN1_APPLICATION            SEC_ASN1_APPLICATION
 
126
#define nssASN1_CONTEXT_SPECIFIC       SEC_ASN1_CONTEXT_SPECIFIC
 
127
#define nssASN1_PRIVATE                SEC_ASN1_PRIVATE
 
128
 
 
129
#define nssASN1_OPTIONAL               SEC_ASN1_OPTIONAL 
 
130
#define nssASN1_EXPLICIT               SEC_ASN1_EXPLICIT 
 
131
#define nssASN1_ANY                    SEC_ASN1_ANY      
 
132
#define nssASN1_INLINE                 SEC_ASN1_INLINE   
 
133
#define nssASN1_POINTER                SEC_ASN1_POINTER  
 
134
#define nssASN1_GROUP                  SEC_ASN1_GROUP    
 
135
#define nssASN1_DYNAMIC                SEC_ASN1_DYNAMIC  
 
136
#define nssASN1_SKIP                   SEC_ASN1_SKIP     
 
137
#define nssASN1_INNER                  SEC_ASN1_INNER    
 
138
#define nssASN1_SAVE                   SEC_ASN1_SAVE     
 
139
#define nssASN1_MAY_STREAM             SEC_ASN1_MAY_STREAM
 
140
#define nssASN1_SKIP_REST              SEC_ASN1_SKIP_REST
 
141
#define nssASN1_CHOICE                 SEC_ASN1_CHOICE
 
142
 
 
143
#define nssASN1_SEQUENCE_OF            SEC_ASN1_SEQUENCE_OF 
 
144
#define nssASN1_SET_OF                 SEC_ASN1_SET_OF      
 
145
#define nssASN1_ANY_CONTENTS           SEC_ASN1_ANY_CONTENTS
 
146
 
 
147
typedef SEC_ASN1TemplateChooserPtr nssASN1ChooseTemplateFunction;
 
148
 
 
149
typedef SEC_ASN1DecoderContext nssASN1Decoder;
 
150
typedef SEC_ASN1EncoderContext nssASN1Encoder;
 
151
 
 
152
typedef enum {
 
153
  nssASN1EncodingPartIdentifier    = SEC_ASN1_Identifier,
 
154
  nssASN1EncodingPartLength        = SEC_ASN1_Length,
 
155
  nssASN1EncodingPartContents      = SEC_ASN1_Contents,
 
156
  nssASN1EncodingPartEndOfContents = SEC_ASN1_EndOfContents
 
157
} nssASN1EncodingPart;
 
158
 
 
159
typedef SEC_ASN1NotifyProc nssASN1NotifyFunction;
 
160
 
 
161
typedef SEC_ASN1WriteProc nssASN1EncoderWriteFunction;
 
162
typedef SEC_ASN1WriteProc nssASN1DecoderFilterFunction;
 
163
 
 
164
PR_END_EXTERN_C
 
165
 
 
166
#endif /* ASN1T_H */