2 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
9 #pragma ident "%Z%%M% %I% %E% SMI"
16 * The contents of this file are subject to the Mozilla Public
17 * License Version 1.1 (the "License"); you may not use this file
18 * except in compliance with the License. You may obtain a copy of
19 * the License at http://www.mozilla.org/MPL/
21 * Software distributed under the License is distributed on an "AS
22 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
23 * implied. See the License for the specific language governing
24 * rights and limitations under the License.
26 * The Original Code is the Netscape security libraries.
28 * The Initial Developer of the Original Code is Netscape
29 * Communications Corporation. Portions created by Netscape are
30 * Copyright (C) 1994-2000 Netscape Communications Corporation. All
35 * Alternatively, the contents of this file may be used under the
36 * terms of the GNU General Public License Version 2 or later (the
37 * "GPL"), in which case the provisions of the GPL are applicable
38 * instead of those above. If you wish to allow use of your
39 * version of this file only under the terms of the GPL and not to
40 * allow others to use your version of this file under the MPL,
41 * indicate your decision by deleting the provisions above and
42 * replace them with the notice and other provisions required by
43 * the GPL. If you do not delete the provisions above, a recipient
44 * may use your version of this file under either the MPL or the
49 OID_AVA_COMMON_NAME
= 0,
53 OID_AVA_STATE_OR_PROVINCE
,
54 OID_AVA_ORGANIZATION_NAME
,
55 OID_AVA_ORGANIZATIONAL_UNIT_NAME
,
57 OID_AVA_STREET_ADDRESS
,
60 OID_PKCS9_EMAIL_ADDRESS
,
71 #define C_DOUBLE_QUOTE '\042'
73 #define C_BACKSLASH '\134'
77 #define OPTIONAL_SPACE(c) \
78 (((c) == ' ') || ((c) == '\r') || ((c) == '\n'))
80 #define SPECIAL_CHAR(c) \
81 (((c) == ',') || ((c) == '=') || ((c) == C_DOUBLE_QUOTE) || \
82 ((c) == '\r') || ((c) == '\n') || ((c) == '+') || \
83 ((c) == '<') || ((c) == '>') || ((c) == '#') || \
84 ((c) == ';') || ((c) == C_BACKSLASH))
87 #define IS_PRINTABLE(c) \
88 ((((c) >= 'a') && ((c) <= 'z')) || \
89 (((c) >= 'A') && ((c) <= 'Z')) || \
90 (((c) >= '0') && ((c) <= '9')) || \
93 ((c) == '\050') || /* ( */ \
94 ((c) == '\051') || /* ) */ \
95 (((c) >= '+') && ((c) <= '/')) || /* + , - . / */ \
104 #endif /* _RDN_PARSER_H */