Imported Upstream version 3.13.6
[platform/upstream/nss.git] / mozilla / security / nss / tests / libpkix / common / libpkix_init_nist.sh
1 #!/bin/sh
2
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 #
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
10 #
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
15 #
16 # The Original Code is the PKIX-C library.
17 #
18 # The Initial Developer of the Original Code is
19 # Sun Microsystems, Inc.
20 # Portions created by the Initial Developer are
21 # Copyright 2004-2007 Sun Microsystems, Inc.  All Rights Reserved.
22 #
23 # Contributor(s):
24 #   Sun Microsystems, Inc.
25 #
26 # Alternatively, the contents of this file may be used under the terms of
27 # either the GNU General Public License Version 2 or later (the "GPL"), or
28 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
37 #
38 # ***** END LICENSE BLOCK *****
39 #
40 # libpkix_init_nist.sh
41 #
42
43 #
44 # Any test that uses NIST files should have a tag of either NIST-Test or
45 # NIST-Test-Files-Used at the command option so if there are no NIST files
46 # installed in the system, the test can be skipped
47 #
48
49 if [ -z "${NIST_FILES_DIR}" ] ; then
50     Display ""
51     Display "*******************************************************************************"
52     Display "The environment variable NIST_FILES_DIR is not defined. Therefore"
53     Display "tests depending on it will be skipped. To enable these tests set"
54     Display "NIST_FILES_DIR to the directory where NIST Certificates and CRLs"
55     Display "are located." 
56     Display "*******************************************************************************"
57     Display ""
58     doNIST=0
59 else
60
61     NIST=${NIST_FILES_DIR}
62     doNIST=1
63 fi
64
65 #
66 # Any tests that use NIST Path Discovery files should have a tag of NIST-PDTest
67 # at the command option so if there are no NIST Path Discovery files
68 # installed in the system, the test can be skipped
69 #
70 if [ ${doPD} -eq 1 -a -z "${PDVAL}" ] ; then
71
72     Display ""
73     Display "*******************************************************************************"
74     Display "The environment variable PDVAL is not defined. Therefore tests"
75     Display "depending on it will be skipped. To enable these tests set PDVAL to"
76     Display "the directory where NIST Path Discovery Certificates are located." 
77     Display "*******************************************************************************"
78     Display ""
79     doNIST_PDTest=0
80 else
81
82     NIST_PDTEST=${PDVAL}
83     doNIST_PDTest=1
84 fi
85
86 #
87 # Any tests that use an OCSP Server should have a tag of OCSP-Test at the
88 # command option so if there is no OCSP Server installed in the system, the
89 # test can be skipped
90 #
91 if [  ${doOCSP} -eq 1 -a -z "${OCSP}" ] ; then
92
93     Display ""
94     Display "*******************************************************************************"
95     Display "The environment variable OCSP is not defined. Therefore tests"
96     Display "depending on it will be skipped. To enable these tests set OCSP"
97     Display "non-NULL (the actual URI used is taken from the AIA extension)." 
98     Display "*******************************************************************************"
99     Display ""
100     doOCSPTest=0
101 else
102     doOCSPTest=1
103 fi