Back to index

lightning-sunbird  0.9+nobinonly
nsspki1t.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Netscape security libraries.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corporation.
00018  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 #ifndef NSSPKI1T_H
00038 #define NSSPKI1T_H
00039 
00040 #ifdef DEBUG
00041 static const char NSSPKI1T_CVS_ID[] = "@(#) $RCSfile: nsspki1t.h,v $ $Revision: 1.3 $ $Date: 2005/01/20 02:25:49 $";
00042 #endif /* DEBUG */
00043 
00044 /*
00045  * nsspki1t.h
00046  *
00047  * This file contains the public type definitions for the PKIX part-1
00048  * objects.
00049  */
00050 
00051 #ifndef NSSBASET_H
00052 #include "nssbaset.h"
00053 #endif /* NSSBASET_H */
00054 
00055 PR_BEGIN_EXTERN_C
00056 
00057 /*
00058  * OBJECT IDENTIFIER
00059  *
00060  * This is the basic OID that crops up everywhere.
00061  */
00062 
00063 struct NSSOIDStr;
00064 typedef struct NSSOIDStr NSSOID;
00065 
00066 /*
00067  * AttributeTypeAndValue
00068  *
00069  * This structure contains an attribute type (indicated by an OID), 
00070  * and the type-specific value.  RelativeDistinguishedNamess consist
00071  * of a set of these.  These are distinct from Attributes (which have
00072  * SET of values), from AttributeDescriptions (which have qualifiers
00073  * on the types), and from AttributeValueAssertions (which assert a
00074  * a value comparison under some matching rule).
00075  */
00076 
00077 struct NSSATAVStr;
00078 typedef struct NSSATAVStr NSSATAV;
00079 
00080 /*
00081  * RelativeDistinguishedName
00082  *
00083  * This structure contains an unordered set of AttributeTypeAndValue 
00084  * objects.  RDNs are used to distinguish a set of objects underneath 
00085  * a common object.
00086  *
00087  * Often, a single ATAV is sufficient to make a unique distinction.
00088  * For example, if a company assigns its people unique uid values,
00089  * then in the Name "uid=smith,ou=People,o=Acme,c=US" the "uid=smith"
00090  * ATAV by itself forms an RDN.  However, sometimes a set of ATAVs is
00091  * needed.  For example, if a company needed to distinguish between
00092  * two Smiths by specifying their corporate divisions, then in the
00093  * Name "(cn=Smith,ou=Sales),ou=People,o=Acme,c=US" the parenthesised
00094  * set of ATAVs forms the RDN.
00095  */
00096 
00097 struct NSSRDNStr;
00098 typedef struct NSSRDNStr NSSRDN;
00099 
00100 /*
00101  * RDNSequence
00102  *
00103  * This structure contains a sequence of RelativeDistinguishedName
00104  * objects.
00105  */
00106 
00107 struct NSSRDNSeqStr;
00108 typedef struct NSSRDNSeqStr NSSRDNSeq;
00109 
00110 /*
00111  * Name
00112  *
00113  * This structure contains a union of the possible name formats,
00114  * which at the moment is limited to an RDNSequence.
00115  */
00116 
00117 struct NSSNameStr;
00118 typedef struct NSSNameStr NSSName;
00119 
00120 /*
00121  * NameChoice
00122  *
00123  * This enumeration is used to specify choice within a name.
00124  */
00125 
00126 enum NSSNameChoiceEnum {
00127   NSSNameChoiceInvalid = -1,
00128   NSSNameChoiceRdnSequence
00129 };
00130 typedef enum NSSNameChoiceEnum NSSNameChoice;
00131 
00132 /*
00133  * GeneralName
00134  *
00135  * This structure contains a union of the possible general names,
00136  * of which there are several.
00137  */
00138 
00139 struct NSSGeneralNameStr;
00140 typedef struct NSSGeneralNameStr NSSGeneralName;
00141 
00142 /*
00143  * GeneralNameChoice
00144  *
00145  * This enumerates the possible general name types.
00146  */
00147 
00148 enum NSSGeneralNameChoiceEnum {
00149   NSSGeneralNameChoiceInvalid = -1,
00150   NSSGeneralNameChoiceOtherName = 0,
00151   NSSGeneralNameChoiceRfc822Name = 1,
00152   NSSGeneralNameChoiceDNSName = 2,
00153   NSSGeneralNameChoiceX400Address = 3,
00154   NSSGeneralNameChoiceDirectoryName = 4,
00155   NSSGeneralNameChoiceEdiPartyName = 5,
00156   NSSGeneralNameChoiceUniformResourceIdentifier = 6,
00157   NSSGeneralNameChoiceIPAddress = 7,
00158   NSSGeneralNameChoiceRegisteredID = 8
00159 };
00160 typedef enum NSSGeneralNameChoiceEnum NSSGeneralNameChoice;
00161 
00162 /*
00163  * The "other" types of general names.
00164  */
00165 
00166 struct NSSOtherNameStr;
00167 typedef struct NSSOtherNameStr NSSOtherName;
00168 
00169 struct NSSRFC822NameStr;
00170 typedef struct NSSRFC822NameStr NSSRFC822Name;
00171 
00172 struct NSSDNSNameStr;
00173 typedef struct NSSDNSNameStr NSSDNSName;
00174 
00175 struct NSSX400AddressStr;
00176 typedef struct NSSX400AddressStr NSSX400Address;
00177 
00178 struct NSSEdiPartyNameStr;
00179 typedef struct NSSEdiPartyNameStr NSSEdiPartyName;
00180 
00181 struct NSSURIStr;
00182 typedef struct NSSURIStr NSSURI;
00183 
00184 struct NSSIPAddressStr;
00185 typedef struct NSSIPAddressStr NSSIPAddress;
00186 
00187 struct NSSRegisteredIDStr;
00188 typedef struct NSSRegisteredIDStr NSSRegisteredID;
00189 
00190 /*
00191  * GeneralNameSeq
00192  *
00193  * This structure contains a sequence of GeneralName objects.
00194  * Note that the PKIX documents refer to this as "GeneralNames,"
00195  * which differs from "GeneralName" by only one letter.  To
00196  * try to reduce confusion, we expand the name slightly to
00197  * "GeneralNameSeq."
00198  */
00199 
00200 struct NSSGeneralNameSeqStr;
00201 typedef struct NSSGeneralNameSeqStr NSSGeneralNameSeq;
00202 
00203 PR_END_EXTERN_C
00204 
00205 #endif /* NSSPKI1T_H */