~ubuntu-branches/ubuntu/feisty/firefox/feisty-updates

« back to all changes in this revision

Viewing changes to security/nss-fips/tests/cmdtests/cmdtests.sh

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack, Alexander Sack
  • Date: 2008-06-23 15:08:12 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20080623150812-sxdwhn3dz9pmapvf
Tags: 2.0.0.15+0nobinonly-0ubuntu0.7.4
[ Alexander Sack ]
* New security/stability upstream release (v2.0.0.15)
  - see USN-619-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 Netscape security libraries.
 
17
#
 
18
# The Initial Developer of the Original Code is
 
19
# Netscape Communications Corporation.
 
20
# Portions created by the Initial Developer are Copyright (C) 1994-2000
 
21
# the Initial Developer. All Rights Reserved.
 
22
#
 
23
# Contributor(s):
 
24
#
 
25
# Alternatively, the contents of this file may be used under the terms of
 
26
# either the GNU General Public License Version 2 or later (the "GPL"), or
 
27
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
28
# in which case the provisions of the GPL or the LGPL are applicable instead
 
29
# of those above. If you wish to allow use of your version of this file only
 
30
# under the terms of either the GPL or the LGPL, and not to allow others to
 
31
# use your version of this file under the terms of the MPL, indicate your
 
32
# decision by deleting the provisions above and replace them with the notice
 
33
# and other provisions required by the GPL or the LGPL. If you do not delete
 
34
# the provisions above, a recipient may use your version of this file under
 
35
# the terms of any one of the MPL, the GPL or the LGPL.
 
36
#
 
37
# ***** END LICENSE BLOCK *****
 
38
 
 
39
########################################################################
 
40
# Script to run small tests to test specific crashes of NSS
 
41
#
 
42
# needs to work on all Unix and Windows platforms
 
43
#
 
44
# included from 
 
45
# --------------
 
46
#   all.sh
 
47
#
 
48
# tests implemented:
 
49
# vercrt (verify encryption cert - bugzilla bug 119059)
 
50
# vercrtfps (verify encryption cert in fips mode - bugzilla bug 119214)
 
51
# test3 (CERT_FindUserCertByUsage called 2nd time - bug 118864)
 
52
#
 
53
# special strings
 
54
# ---------------
 
55
#
 
56
########################################################################
 
57
 
 
58
############################## cmdtests_init ###########################
 
59
# local shell function to initialize this script 
 
60
########################################################################
 
61
cmdtests_init()
 
62
{
 
63
  SCRIPTNAME=cmdtests.sh      # sourced - $0 would point to all.sh
 
64
 
 
65
  if [ -z "${CLEANUP}" ] ; then     # if nobody else is responsible for
 
66
      CLEANUP="${SCRIPTNAME}"       # cleaning this script will do it
 
67
  fi
 
68
 
 
69
  if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
 
70
      cd ../common
 
71
      . ./init.sh
 
72
  fi
 
73
  if [ ! -r $CERT_LOG_FILE ]; then  # we need certificates here
 
74
      cd ../cert
 
75
      . ./cert.sh
 
76
  fi
 
77
  SCRIPTNAME=cmdtests.sh
 
78
  html_head "Tests in cmd/tests"
 
79
 
 
80
# grep "SUCCESS: cmd/tests passed" $CERT_LOG_FILE >/dev/null || {
 
81
#     Exit 15 "Fatal - cert.sh needs to pass first"
 
82
# }
 
83
 
 
84
  CMDTESTSDIR=${HOSTDIR}/cmd/tests
 
85
  COPYDIR=${CMDTESTSDIR}/copydir
 
86
 
 
87
  R_CMDTESTSDIR=../cmd/tests
 
88
  R_COPYDIR=../cmd/tests/copydir
 
89
  P_R_COPYDIR=${R_COPYDIR}
 
90
 
 
91
  if [ -n "${MULTIACCESS_DBM}" ]; then
 
92
     P_R_COPYDIR="multiaccess:Cmdtests.$version"
 
93
  fi
 
94
 
 
95
  mkdir -p ${CMDTESTSDIR}
 
96
  mkdir -p ${COPYDIR}
 
97
  mkdir -p ${CMDTESTSDIR}/html
 
98
 
 
99
  cd ${CMDTESTSDIR}
 
100
}
 
101
 
 
102
############################## ct_vercrt ##################################
 
103
# CERT_VerifyCert should not fail when verifying encryption cert 
 
104
# Bugzilla Bug 119059
 
105
########################################################################
 
106
#ct_vercrt()
 
107
#{
 
108
 # echo "$SCRIPTNAME: Verify encryption certificate ----------------------"
 
109
 # echo "vercrt"
 
110
 # vercrt
 
111
 # ret=$?
 
112
 # html_msg $ret 0 "Verify encryption certificate (vercrt)"
 
113
#
 
114
#}
 
115
 
 
116
 
 
117
############################## cmdtests_cleanup ########################
 
118
# local shell function to finish this script (no exit since it might be 
 
119
# sourced)
 
120
########################################################################
 
121
cmdtests_cleanup()
 
122
{
 
123
  html "</TABLE><BR>"
 
124
  cd ${QADIR}
 
125
  . common/cleanup.sh
 
126
}
 
127
 
 
128
################## main #################################################
 
129
 
 
130
cmdtests_init
 
131
 
 
132
#ct_vercrt
 
133
cmdtests_cleanup