Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | #!/bin/bash |
michael@0 | 2 | # |
michael@0 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 6 | |
michael@0 | 7 | ######################################################################## |
michael@0 | 8 | # |
michael@0 | 9 | # mozilla/security/nss/tests/pkits/pkits.sh |
michael@0 | 10 | # |
michael@0 | 11 | # Script to test the NIST PKITS tests |
michael@0 | 12 | # |
michael@0 | 13 | # needs to work on all Unix and Windows platforms |
michael@0 | 14 | # |
michael@0 | 15 | # tests implemented: |
michael@0 | 16 | # vfychain |
michael@0 | 17 | # |
michael@0 | 18 | # special NOTES |
michael@0 | 19 | # --------------- |
michael@0 | 20 | # NIST PKITS data needs to be downloaded from |
michael@0 | 21 | # http://csrc.nist.gov/pki/testing/x509paths.html |
michael@0 | 22 | # Environment variable PKITS_DATA needs to be set to the directory |
michael@0 | 23 | # where this data is downloaded, or test data needs to be copied under |
michael@0 | 24 | # the mozilla source tree in mozilla/PKITS_DATA |
michael@0 | 25 | ######################################################################## |
michael@0 | 26 | |
michael@0 | 27 | ############################## pkits_init ############################## |
michael@0 | 28 | # local shell function to initialize this script |
michael@0 | 29 | ######################################################################## |
michael@0 | 30 | pkits_init() |
michael@0 | 31 | { |
michael@0 | 32 | SCRIPTNAME=pkits.sh |
michael@0 | 33 | |
michael@0 | 34 | if [ -z "${CLEANUP}" ] ; then |
michael@0 | 35 | CLEANUP="${SCRIPTNAME}" |
michael@0 | 36 | fi |
michael@0 | 37 | |
michael@0 | 38 | if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then |
michael@0 | 39 | cd ../common |
michael@0 | 40 | . ./init.sh |
michael@0 | 41 | fi |
michael@0 | 42 | |
michael@0 | 43 | if [ -z "${PKITS_DATA}" ]; then |
michael@0 | 44 | echo "${SCRIPTNAME}: PKITS data directory not defined, skipping." |
michael@0 | 45 | exit 0 |
michael@0 | 46 | fi |
michael@0 | 47 | |
michael@0 | 48 | if [ ! -d "${PKITS_DATA}" ]; then |
michael@0 | 49 | echo "${SCRIPTNAME}: PKITS data directory ${PKITS_DATA} doesn't exist, skipping." |
michael@0 | 50 | exit 0 |
michael@0 | 51 | fi |
michael@0 | 52 | |
michael@0 | 53 | PKITSDIR=${HOSTDIR}/pkits |
michael@0 | 54 | |
michael@0 | 55 | COPYDIR=${PKITSDIR}/copydir |
michael@0 | 56 | |
michael@0 | 57 | mkdir -p ${PKITSDIR} |
michael@0 | 58 | mkdir -p ${COPYDIR} |
michael@0 | 59 | mkdir -p ${PKITSDIR}/html |
michael@0 | 60 | |
michael@0 | 61 | certs=${PKITS_DATA}/certs |
michael@0 | 62 | crls=${PKITS_DATA}/crls |
michael@0 | 63 | |
michael@0 | 64 | cd ${PKITSDIR} |
michael@0 | 65 | |
michael@0 | 66 | PKITSdb=${PKITSDIR}/PKITSdb |
michael@0 | 67 | PKITSbkp=${PKITSDIR}/PKITSbkp |
michael@0 | 68 | |
michael@0 | 69 | PKITS_LOG=${PKITSDIR}/pkits.log #getting its own logfile |
michael@0 | 70 | pkits_log "Start of logfile $PKITS_LOG" |
michael@0 | 71 | |
michael@0 | 72 | if [ ! -d "${PKITSdb}" ]; then |
michael@0 | 73 | mkdir -p ${PKITSdb} |
michael@0 | 74 | else |
michael@0 | 75 | pkits_log "$SCRIPTNAME: WARNING - ${PKITSdb} exists" |
michael@0 | 76 | fi |
michael@0 | 77 | |
michael@0 | 78 | if [ ! -d "${PKITSbkp}" ]; then |
michael@0 | 79 | mkdir -p ${PKITSbkp} |
michael@0 | 80 | else |
michael@0 | 81 | pkits_log "$SCRIPTNAME: WARNING - ${PKITSbkp} exists" |
michael@0 | 82 | fi |
michael@0 | 83 | |
michael@0 | 84 | echo "HOSTDIR" $HOSTDIR |
michael@0 | 85 | echo "PKITSDIR" $PKITSDIR |
michael@0 | 86 | echo "PKITSdb" $PKITSdb |
michael@0 | 87 | echo "PKITSbkp" $PKITSbkp |
michael@0 | 88 | echo "PKITS_DATA" $PKITS_DATA |
michael@0 | 89 | echo "certs" $certs |
michael@0 | 90 | echo "crls" $crls |
michael@0 | 91 | |
michael@0 | 92 | echo nss > ${PKITSdb}/pw |
michael@0 | 93 | ${BINDIR}/certutil -N -d ${PKITSdb} -f ${PKITSdb}/pw |
michael@0 | 94 | |
michael@0 | 95 | ${BINDIR}/certutil -A -n TrustAnchorRootCertificate -t "C,C,C" -i \ |
michael@0 | 96 | $certs/TrustAnchorRootCertificate.crt -d $PKITSdb |
michael@0 | 97 | if [ -z "$NSS_NO_PKITS_CRLS" ]; then |
michael@0 | 98 | ${BINDIR}/crlutil -I -i $crls/TrustAnchorRootCRL.crl -d ${PKITSdb} -f ${PKITSdb}/pw |
michael@0 | 99 | else |
michael@0 | 100 | html "<H3>NO CRLs are being used.</H3>" |
michael@0 | 101 | pkits_log "NO CRLs are being used." |
michael@0 | 102 | fi |
michael@0 | 103 | |
michael@0 | 104 | cp ${PKITSdb}/* ${PKITSbkp} |
michael@0 | 105 | |
michael@0 | 106 | KNOWN_BUG= |
michael@0 | 107 | } |
michael@0 | 108 | |
michael@0 | 109 | ############################### pkits_log ############################## |
michael@0 | 110 | # write to pkits.log file |
michael@0 | 111 | ######################################################################## |
michael@0 | 112 | pkits_log() |
michael@0 | 113 | { |
michael@0 | 114 | echo "$SCRIPTNAME $*" |
michael@0 | 115 | echo $* >> ${PKITS_LOG} |
michael@0 | 116 | } |
michael@0 | 117 | |
michael@0 | 118 | restore_db() |
michael@0 | 119 | { |
michael@0 | 120 | echo "Restore DB" |
michael@0 | 121 | rm ${PKITSdb}/* |
michael@0 | 122 | cp ${PKITSbkp}/* ${PKITSdb} |
michael@0 | 123 | } |
michael@0 | 124 | |
michael@0 | 125 | log_banner() |
michael@0 | 126 | { |
michael@0 | 127 | echo "" |
michael@0 | 128 | echo "--------------------------------------------------------------------" |
michael@0 | 129 | echo "Test case ${VFY_ACTION}" |
michael@0 | 130 | echo "" |
michael@0 | 131 | } |
michael@0 | 132 | |
michael@0 | 133 | start_table() |
michael@0 | 134 | { |
michael@0 | 135 | html "<TABLE BORDER=1><TR><TH COLSPAN=3>$*</TH></TR>" |
michael@0 | 136 | html "<TR><TH width=500>Test Case</TH><TH width=50>Result</TH></TR>" |
michael@0 | 137 | echo "" |
michael@0 | 138 | echo "***************************************************************" |
michael@0 | 139 | echo "$*" |
michael@0 | 140 | echo "***************************************************************" |
michael@0 | 141 | } |
michael@0 | 142 | |
michael@0 | 143 | break_table() |
michael@0 | 144 | { |
michael@0 | 145 | html "</TABLE><P>" |
michael@0 | 146 | start_table "$@" |
michael@0 | 147 | } |
michael@0 | 148 | |
michael@0 | 149 | ################################ pkits ################################# |
michael@0 | 150 | # local shell function for positive testcases, calls vfychain, writes |
michael@0 | 151 | # action and options to stdout, sets variable RET and writes results to |
michael@0 | 152 | # the html file results |
michael@0 | 153 | ######################################################################## |
michael@0 | 154 | pkits() |
michael@0 | 155 | { |
michael@0 | 156 | echo "vfychain -d $PKITSdb -u 4 $*" |
michael@0 | 157 | ${BINDIR}/vfychain -d $PKITSdb -u 4 $* > ${PKITSDIR}/cmdout.txt 2>&1 |
michael@0 | 158 | RET=$? |
michael@0 | 159 | CNT=`grep -c ERROR ${PKITSDIR}/cmdout.txt` |
michael@0 | 160 | RET=`expr ${RET} + ${CNT}` |
michael@0 | 161 | cat ${PKITSDIR}/cmdout.txt |
michael@0 | 162 | |
michael@0 | 163 | if [ "$RET" -ne 0 ]; then |
michael@0 | 164 | html_failed "${VFY_ACTION} ($RET) " |
michael@0 | 165 | pkits_log "ERROR: ${VFY_ACTION} failed $RET" |
michael@0 | 166 | else |
michael@0 | 167 | html_passed "${VFY_ACTION}" |
michael@0 | 168 | pkits_log "SUCCESS: ${VFY_ACTION} returned as expected $RET" |
michael@0 | 169 | fi |
michael@0 | 170 | |
michael@0 | 171 | return $RET |
michael@0 | 172 | } |
michael@0 | 173 | |
michael@0 | 174 | ################################ pkitsn ################################# |
michael@0 | 175 | # local shell function for negative testcases, calls vfychain, writes |
michael@0 | 176 | # action and options to stdout, sets variable RET and writes results to |
michael@0 | 177 | # the html file results |
michael@0 | 178 | ######################################################################## |
michael@0 | 179 | pkitsn() |
michael@0 | 180 | { |
michael@0 | 181 | echo "vfychain -d $PKITSdb -u 4 $*" |
michael@0 | 182 | ${BINDIR}/vfychain -d $PKITSdb -u 4 $* > ${PKITSDIR}/cmdout.txt 2>&1 |
michael@0 | 183 | RET=$? |
michael@0 | 184 | CNT=`grep -c ERROR ${PKITSDIR}/cmdout.txt` |
michael@0 | 185 | RET=`expr ${RET} + ${CNT}` |
michael@0 | 186 | cat ${PKITSDIR}/cmdout.txt |
michael@0 | 187 | |
michael@0 | 188 | if [ "$RET" -eq 0 ]; then |
michael@0 | 189 | html_failed "${VFY_ACTION} ($RET) " |
michael@0 | 190 | pkits_log "ERROR: ${VFY_ACTION} failed $RET" |
michael@0 | 191 | else |
michael@0 | 192 | html_passed "${VFY_ACTION} ($RET) " |
michael@0 | 193 | pkits_log "SUCCESS: ${VFY_ACTION} returned as expected $RET" |
michael@0 | 194 | fi |
michael@0 | 195 | return $RET |
michael@0 | 196 | } |
michael@0 | 197 | |
michael@0 | 198 | ################################ crlImport ############################# |
michael@0 | 199 | # local shell function to import a CRL, calls crlutil -I -i, writes |
michael@0 | 200 | # action and options to stdout |
michael@0 | 201 | ######################################################################## |
michael@0 | 202 | crlImport() |
michael@0 | 203 | { |
michael@0 | 204 | if [ -z "$NSS_NO_PKITS_CRLS" ]; then |
michael@0 | 205 | echo "crlutil -d $PKITSdb -I -f ${PKITSdb}/pw -i $crls/$*" |
michael@0 | 206 | ${BINDIR}/crlutil -d ${PKITSdb} -I -f ${PKITSdb}/pw -i $crls/$* > ${PKITSDIR}/cmdout.txt 2>&1 |
michael@0 | 207 | RET=$? |
michael@0 | 208 | cat ${PKITSDIR}/cmdout.txt |
michael@0 | 209 | |
michael@0 | 210 | if [ "$RET" -ne 0 ]; then |
michael@0 | 211 | html_failed "${VFY_ACTION} ($RET) " |
michael@0 | 212 | pkits_log "ERROR: ${VFY_ACTION} failed $RET" |
michael@0 | 213 | fi |
michael@0 | 214 | fi |
michael@0 | 215 | } |
michael@0 | 216 | |
michael@0 | 217 | ################################ crlImportn ############################# |
michael@0 | 218 | # local shell function to import an incorrect CRL, calls crlutil -I -i, |
michael@0 | 219 | # writes action and options to stdout |
michael@0 | 220 | ######################################################################## |
michael@0 | 221 | crlImportn() |
michael@0 | 222 | { |
michael@0 | 223 | RET=0 |
michael@0 | 224 | if [ -z "$NSS_NO_PKITS_CRLS" ]; then |
michael@0 | 225 | echo "crlutil -d $PKITSdb -I -f ${PKITSdb}/pw -i $crls/$*" |
michael@0 | 226 | ${BINDIR}/crlutil -d ${PKITSdb} -I -f ${PKITSdb}/pw -i $crls/$* > ${PKITSDIR}/cmdout.txt 2>&1 |
michael@0 | 227 | RET=$? |
michael@0 | 228 | cat ${PKITSDIR}/cmdout.txt |
michael@0 | 229 | |
michael@0 | 230 | if [ "$RET" -eq 0 ]; then |
michael@0 | 231 | html_failed "${VFY_ACTION} ($RET) " |
michael@0 | 232 | pkits_log "ERROR: ${VFY_ACTION} failed $RET" |
michael@0 | 233 | else |
michael@0 | 234 | html_passed "${VFY_ACTION} ($RET) " |
michael@0 | 235 | pkits_log "SUCCESS: ${VFY_ACTION} returned as expected $RET" |
michael@0 | 236 | fi |
michael@0 | 237 | fi |
michael@0 | 238 | return $RET |
michael@0 | 239 | } |
michael@0 | 240 | |
michael@0 | 241 | ################################ certImport ############################# |
michael@0 | 242 | # local shell function to import a Cert, calls certutil -A, writes |
michael@0 | 243 | # action and options to stdout |
michael@0 | 244 | ######################################################################## |
michael@0 | 245 | certImport() |
michael@0 | 246 | { |
michael@0 | 247 | echo "certutil -d $PKITSdb -A -t \",,\" -n $* -i $certs/$*.crt" |
michael@0 | 248 | ${BINDIR}/certutil -d $PKITSdb -A -t ",," -n $* -i $certs/$*.crt > ${PKITSDIR}/cmdout.txt 2>&1 |
michael@0 | 249 | RET=$? |
michael@0 | 250 | cat ${PKITSDIR}/cmdout.txt |
michael@0 | 251 | |
michael@0 | 252 | if [ "$RET" -ne 0 ]; then |
michael@0 | 253 | html_failed "${VFY_ACTION} ($RET) " |
michael@0 | 254 | pkits_log "ERROR: ${VFY_ACTION} failed $RET" |
michael@0 | 255 | fi |
michael@0 | 256 | } |
michael@0 | 257 | |
michael@0 | 258 | ################################ certImportn ############################# |
michael@0 | 259 | # local shell function to import an incorrect Cert, calls certutil -A, |
michael@0 | 260 | # writes action and options to stdout |
michael@0 | 261 | ######################################################################## |
michael@0 | 262 | certImportn() |
michael@0 | 263 | { |
michael@0 | 264 | RET=0 |
michael@0 | 265 | if [ -z "$NSS_NO_PKITS_CRLS" ]; then |
michael@0 | 266 | echo "certutil -d $PKITSdb -A -t \",,\" -n $* -i $certs/$*.crt" |
michael@0 | 267 | ${BINDIR}/certutil -d $PKITSdb -A -t ",," -n $* -i $certs/$*.crt > ${PKITSDIR}/cmdout.txt 2>&1 |
michael@0 | 268 | RET=$? |
michael@0 | 269 | cat ${PKITSDIR}/cmdout.txt |
michael@0 | 270 | |
michael@0 | 271 | if [ "$RET" -eq 0 ]; then |
michael@0 | 272 | html_failed "${VFY_ACTION} ($RET) " |
michael@0 | 273 | pkits_log "ERROR: ${VFY_ACTION} failed $RET" |
michael@0 | 274 | else |
michael@0 | 275 | html_passed "${VFY_ACTION} ($RET) " |
michael@0 | 276 | pkits_log "SUCCESS: ${VFY_ACTION} returned as expected $RET" |
michael@0 | 277 | fi |
michael@0 | 278 | fi |
michael@0 | 279 | } |
michael@0 | 280 | |
michael@0 | 281 | ############################## pkits_tests_bySection ################### |
michael@0 | 282 | # running the various PKITS tests |
michael@0 | 283 | ######################################################################## |
michael@0 | 284 | pkits_SignatureVerification() |
michael@0 | 285 | { |
michael@0 | 286 | start_table "NIST PKITS Section 4.1: Signature Verification" |
michael@0 | 287 | |
michael@0 | 288 | VFY_ACTION="Valid Signatures Test1"; log_banner |
michael@0 | 289 | certImport GoodCACert |
michael@0 | 290 | crlImport GoodCACRL.crl |
michael@0 | 291 | pkits $certs/ValidCertificatePathTest1EE.crt $certs/GoodCACert.crt |
michael@0 | 292 | restore_db |
michael@0 | 293 | |
michael@0 | 294 | VFY_ACTION="Invalid CA Signature Test2"; log_banner |
michael@0 | 295 | certImport BadSignedCACert |
michael@0 | 296 | crlImport BadSignedCACRL.crl |
michael@0 | 297 | pkitsn $certs/InvalidCASignatureTest2EE.crt \ |
michael@0 | 298 | $certs/BadSignedCACert.crt |
michael@0 | 299 | restore_db |
michael@0 | 300 | |
michael@0 | 301 | VFY_ACTION="Invalid EE Signature Test3"; log_banner |
michael@0 | 302 | certImport GoodCACert |
michael@0 | 303 | crlImport GoodCACRL.crl |
michael@0 | 304 | pkitsn $certs/InvalidEESignatureTest3EE.crt $certs/GoodCACert.crt |
michael@0 | 305 | restore_db |
michael@0 | 306 | |
michael@0 | 307 | VFY_ACTION="Valid DSA Signatures Test4"; log_banner |
michael@0 | 308 | certImport DSACACert |
michael@0 | 309 | crlImport DSACACRL.crl |
michael@0 | 310 | pkits $certs/ValidDSASignaturesTest4EE.crt $certs/DSACACert.crt |
michael@0 | 311 | restore_db |
michael@0 | 312 | |
michael@0 | 313 | VFY_ACTION="Valid DSA Parameter Inheritance Test5"; log_banner |
michael@0 | 314 | certImport DSACACert |
michael@0 | 315 | crlImport DSACACRL.crl |
michael@0 | 316 | certImport DSAParametersInheritedCACert |
michael@0 | 317 | crlImport DSAParametersInheritedCACRL.crl |
michael@0 | 318 | pkits $certs/ValidDSAParameterInheritanceTest5EE.crt \ |
michael@0 | 319 | $certs/DSAParametersInheritedCACert.crt \ |
michael@0 | 320 | $certs/DSACACert.crt |
michael@0 | 321 | restore_db |
michael@0 | 322 | |
michael@0 | 323 | VFY_ACTION="Invalid DSA Signature Test6"; log_banner |
michael@0 | 324 | certImport DSACACert |
michael@0 | 325 | crlImport DSACACRL.crl |
michael@0 | 326 | pkitsn $certs/InvalidDSASignatureTest6EE.crt $certs/DSACACert.crt |
michael@0 | 327 | restore_db |
michael@0 | 328 | } |
michael@0 | 329 | |
michael@0 | 330 | pkits_ValidityPeriods() |
michael@0 | 331 | { |
michael@0 | 332 | break_table "NIST PKITS Section 4.2: Validity Periods" |
michael@0 | 333 | |
michael@0 | 334 | VFY_ACTION="Invalid CA notBefore Date Test1"; log_banner |
michael@0 | 335 | certImport BadnotBeforeDateCACert |
michael@0 | 336 | crlImportn BadnotBeforeDateCACRL.crl |
michael@0 | 337 | if [ $RET -eq 0 ] ; then |
michael@0 | 338 | pkitsn $certs/InvalidCAnotBeforeDateTest1EE.crt \ |
michael@0 | 339 | $certs/BadnotBeforeDateCACert.crt |
michael@0 | 340 | fi |
michael@0 | 341 | restore_db |
michael@0 | 342 | |
michael@0 | 343 | VFY_ACTION="Invalid EE notBefore Date Test2"; log_banner |
michael@0 | 344 | certImport GoodCACert |
michael@0 | 345 | crlImport GoodCACRL.crl |
michael@0 | 346 | pkitsn $certs/InvalidEEnotBeforeDateTest2EE.crt \ |
michael@0 | 347 | $certs/GoodCACert.crt |
michael@0 | 348 | restore_db |
michael@0 | 349 | |
michael@0 | 350 | VFY_ACTION="Valid pre2000 UTC notBefore Date Test3"; log_banner |
michael@0 | 351 | certImport GoodCACert |
michael@0 | 352 | crlImport GoodCACRL.crl |
michael@0 | 353 | pkits $certs/Validpre2000UTCnotBeforeDateTest3EE.crt \ |
michael@0 | 354 | $certs/GoodCACert.crt |
michael@0 | 355 | restore_db |
michael@0 | 356 | |
michael@0 | 357 | VFY_ACTION="Valid GeneralizedTime notBefore Date Test4"; log_banner |
michael@0 | 358 | certImport GoodCACert |
michael@0 | 359 | crlImport GoodCACRL.crl |
michael@0 | 360 | pkits $certs/ValidGeneralizedTimenotBeforeDateTest4EE.crt \ |
michael@0 | 361 | $certs/GoodCACert.crt |
michael@0 | 362 | restore_db |
michael@0 | 363 | |
michael@0 | 364 | VFY_ACTION="Invalid CA notAfter Date Test5"; log_banner |
michael@0 | 365 | certImport BadnotAfterDateCACert |
michael@0 | 366 | crlImportn BadnotAfterDateCACRL.crl |
michael@0 | 367 | if [ $RET -eq 0 ] ; then |
michael@0 | 368 | pkitsn $certs/InvalidCAnotAfterDateTest5EE.crt \ |
michael@0 | 369 | $certs/BadnotAfterDateCACert.crt |
michael@0 | 370 | fi |
michael@0 | 371 | restore_db |
michael@0 | 372 | |
michael@0 | 373 | VFY_ACTION="Invalid EE notAfter Date Test6"; log_banner |
michael@0 | 374 | certImport GoodCACert |
michael@0 | 375 | crlImport GoodCACRL.crl |
michael@0 | 376 | pkitsn $certs/InvalidEEnotAfterDateTest6EE.crt \ |
michael@0 | 377 | $certs/GoodCACert.crt |
michael@0 | 378 | restore_db |
michael@0 | 379 | |
michael@0 | 380 | VFY_ACTION="Invalid pre2000 UTC EE notAfter Date Test7"; log_banner |
michael@0 | 381 | certImport GoodCACert |
michael@0 | 382 | crlImport GoodCACRL.crl |
michael@0 | 383 | pkitsn $certs/Invalidpre2000UTCEEnotAfterDateTest7EE.crt \ |
michael@0 | 384 | $certs/GoodCACert.crt |
michael@0 | 385 | restore_db |
michael@0 | 386 | |
michael@0 | 387 | VFY_ACTION="ValidGeneralizedTime notAfter Date Test8"; log_banner |
michael@0 | 388 | certImport GoodCACert |
michael@0 | 389 | crlImport GoodCACRL.crl |
michael@0 | 390 | pkits $certs/ValidGeneralizedTimenotAfterDateTest8EE.crt \ |
michael@0 | 391 | $certs/GoodCACert.crt |
michael@0 | 392 | restore_db |
michael@0 | 393 | } |
michael@0 | 394 | |
michael@0 | 395 | pkits_NameChaining() |
michael@0 | 396 | { |
michael@0 | 397 | break_table "NIST PKITS Section 4.3: Verifying NameChaining" |
michael@0 | 398 | |
michael@0 | 399 | VFY_ACTION="Invalid Name Chaining EE Test1"; log_banner |
michael@0 | 400 | certImport GoodCACert |
michael@0 | 401 | crlImport GoodCACRL.crl |
michael@0 | 402 | pkitsn $certs/InvalidNameChainingTest1EE.crt \ |
michael@0 | 403 | $certs/GoodCACert.crt |
michael@0 | 404 | restore_db |
michael@0 | 405 | |
michael@0 | 406 | VFY_ACTION="Invalid Name Chaining Order Test2"; log_banner |
michael@0 | 407 | certImport NameOrderingCACert |
michael@0 | 408 | crlImport NameOrderCACRL.crl |
michael@0 | 409 | pkitsn $certs/InvalidNameChainingOrderTest2EE.crt \ |
michael@0 | 410 | $certs/NameOrderingCACert.crt |
michael@0 | 411 | restore_db |
michael@0 | 412 | |
michael@0 | 413 | ### bug 216123 ### |
michael@0 | 414 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 415 | VFY_ACTION="Valid Name Chaining Whitespace Test3"; log_banner |
michael@0 | 416 | certImport GoodCACert |
michael@0 | 417 | crlImport GoodCACRL.crl |
michael@0 | 418 | pkits $certs/ValidNameChainingWhitespaceTest3EE.crt \ |
michael@0 | 419 | $certs/GoodCACert.crt |
michael@0 | 420 | restore_db |
michael@0 | 421 | |
michael@0 | 422 | VFY_ACTION="Valid Name Chaining Whitespace Test4"; log_banner |
michael@0 | 423 | certImport GoodCACert |
michael@0 | 424 | crlImport GoodCACRL.crl |
michael@0 | 425 | pkits $certs/ValidNameChainingWhitespaceTest4EE.crt \ |
michael@0 | 426 | $certs/GoodCACert.crt |
michael@0 | 427 | restore_db |
michael@0 | 428 | |
michael@0 | 429 | VFY_ACTION="Valid Name Chaining Capitalization Test5"; log_banner |
michael@0 | 430 | certImport GoodCACert |
michael@0 | 431 | crlImport GoodCACRL.crl |
michael@0 | 432 | pkits $certs/ValidNameChainingCapitalizationTest5EE.crt \ |
michael@0 | 433 | $certs/GoodCACert.crt |
michael@0 | 434 | restore_db |
michael@0 | 435 | fi |
michael@0 | 436 | |
michael@0 | 437 | VFY_ACTION="Valid Name Chaining UIDs Test6"; log_banner |
michael@0 | 438 | certImport UIDCACert |
michael@0 | 439 | crlImport UIDCACRL.crl |
michael@0 | 440 | pkits $certs/ValidNameUIDsTest6EE.crt $certs/UIDCACert.crt |
michael@0 | 441 | restore_db |
michael@0 | 442 | |
michael@0 | 443 | VFY_ACTION="Valid RFC3280 Mandatory Attribute Types Test7"; log_banner |
michael@0 | 444 | certImport RFC3280MandatoryAttributeTypesCACert |
michael@0 | 445 | crlImport RFC3280MandatoryAttributeTypesCACRL.crl |
michael@0 | 446 | pkits $certs/ValidRFC3280MandatoryAttributeTypesTest7EE.crt \ |
michael@0 | 447 | $certs/RFC3280MandatoryAttributeTypesCACert.crt |
michael@0 | 448 | restore_db |
michael@0 | 449 | |
michael@0 | 450 | VFY_ACTION="Valid RFC3280 Optional Attribute Types Test8"; log_banner |
michael@0 | 451 | certImport RFC3280OptionalAttributeTypesCACert |
michael@0 | 452 | crlImport RFC3280OptionalAttributeTypesCACRL.crl |
michael@0 | 453 | pkits $certs/ValidRFC3280OptionalAttributeTypesTest8EE.crt \ |
michael@0 | 454 | $certs/RFC3280OptionalAttributeTypesCACert.crt |
michael@0 | 455 | restore_db |
michael@0 | 456 | |
michael@0 | 457 | VFY_ACTION="Valid UTF8String Encoded Names Test9"; log_banner |
michael@0 | 458 | certImport UTF8StringEncodedNamesCACert |
michael@0 | 459 | crlImport UTF8StringEncodedNamesCACRL.crl |
michael@0 | 460 | pkits $certs/ValidUTF8StringEncodedNamesTest9EE.crt \ |
michael@0 | 461 | $certs/UTF8StringEncodedNamesCACert.crt |
michael@0 | 462 | restore_db |
michael@0 | 463 | |
michael@0 | 464 | ### bug 216123 ### |
michael@0 | 465 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 466 | VFY_ACTION="Valid Rollover from PrintableString to UTF8String Test10"; log_banner |
michael@0 | 467 | certImport RolloverfromPrintableStringtoUTF8StringCACert |
michael@0 | 468 | crlImport RolloverfromPrintableStringtoUTF8StringCACRL.crl |
michael@0 | 469 | pkits $certs/ValidRolloverfromPrintableStringtoUTF8StringTest10EE.crt \ |
michael@0 | 470 | $certs/RolloverfromPrintableStringtoUTF8StringCACert.crt |
michael@0 | 471 | restore_db |
michael@0 | 472 | |
michael@0 | 473 | VFY_ACTION="Valid UTF8String case Insensitive Match Test11"; log_banner |
michael@0 | 474 | certImport UTF8StringCaseInsensitiveMatchCACert |
michael@0 | 475 | crlImport UTF8StringCaseInsensitiveMatchCACRL.crl |
michael@0 | 476 | pkits $certs/ValidUTF8StringCaseInsensitiveMatchTest11EE.crt \ |
michael@0 | 477 | $certs/UTF8StringCaseInsensitiveMatchCACert.crt |
michael@0 | 478 | restore_db |
michael@0 | 479 | fi |
michael@0 | 480 | } |
michael@0 | 481 | |
michael@0 | 482 | pkits_BasicCertRevocation() |
michael@0 | 483 | { |
michael@0 | 484 | break_table "NIST PKITS Section 4.4: Basic Certificate Revocation Tests" |
michael@0 | 485 | |
michael@0 | 486 | ### bug 414556 ### |
michael@0 | 487 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 488 | VFY_ACTION="Missing CRL Test1"; log_banner |
michael@0 | 489 | pkitsn $certs/InvalidMissingCRLTest1EE.crt \ |
michael@0 | 490 | $certs/NoCRLCACert.crt |
michael@0 | 491 | fi |
michael@0 | 492 | |
michael@0 | 493 | VFY_ACTION="Invalid Revoked CA Test2"; log_banner |
michael@0 | 494 | certImport RevokedsubCACert |
michael@0 | 495 | crlImport RevokedsubCACRL.crl |
michael@0 | 496 | certImport GoodCACert |
michael@0 | 497 | crlImport GoodCACRL.crl |
michael@0 | 498 | pkitsn $certs/InvalidRevokedCATest2EE.crt \ |
michael@0 | 499 | $certs/RevokedsubCACert.crt $certs/GoodCACert.crt |
michael@0 | 500 | restore_db |
michael@0 | 501 | |
michael@0 | 502 | VFY_ACTION="Invalid Revoked EE Test3"; log_banner |
michael@0 | 503 | certImport GoodCACert |
michael@0 | 504 | crlImport GoodCACRL.crl |
michael@0 | 505 | pkitsn $certs/InvalidRevokedEETest3EE.crt \ |
michael@0 | 506 | $certs/GoodCACert.crt |
michael@0 | 507 | restore_db |
michael@0 | 508 | |
michael@0 | 509 | VFY_ACTION="Invalid Bad CRL Signature Test4"; log_banner |
michael@0 | 510 | certImport BadCRLSignatureCACert |
michael@0 | 511 | crlImportn BadCRLSignatureCACRL.crl |
michael@0 | 512 | if [ $RET -eq 0 ] ; then |
michael@0 | 513 | pkitsn $certs/InvalidBadCRLSignatureTest4EE.crt \ |
michael@0 | 514 | $certs/BadCRLSignatureCACert.crt |
michael@0 | 515 | fi |
michael@0 | 516 | restore_db |
michael@0 | 517 | |
michael@0 | 518 | VFY_ACTION="Invalid Bad CRL Issuer Name Test5"; log_banner |
michael@0 | 519 | certImport BadCRLIssuerNameCACert |
michael@0 | 520 | crlImportn BadCRLIssuerNameCACRL.crl |
michael@0 | 521 | if [ $RET -eq 0 ] ; then |
michael@0 | 522 | pkitsn $certs/InvalidBadCRLIssuerNameTest5EE.crt \ |
michael@0 | 523 | $certs/BadCRLIssuerNameCACert.crt |
michael@0 | 524 | fi |
michael@0 | 525 | restore_db |
michael@0 | 526 | |
michael@0 | 527 | ### bug 414556 ### |
michael@0 | 528 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 529 | VFY_ACTION="Invalid Wrong CRL Test6"; log_banner |
michael@0 | 530 | certImport WrongCRLCACert |
michael@0 | 531 | crlImport WrongCRLCACRL.crl |
michael@0 | 532 | pkitsn $certs/InvalidWrongCRLTest6EE.crt \ |
michael@0 | 533 | $certs/WrongCRLCACert.crt |
michael@0 | 534 | restore_db |
michael@0 | 535 | fi |
michael@0 | 536 | |
michael@0 | 537 | VFY_ACTION="Valid Two CRLs Test7"; log_banner |
michael@0 | 538 | certImport TwoCRLsCACert |
michael@0 | 539 | crlImport TwoCRLsCAGoodCRL.crl |
michael@0 | 540 | crlImportn TwoCRLsCABadCRL.crl |
michael@0 | 541 | pkits $certs/ValidTwoCRLsTest7EE.crt \ |
michael@0 | 542 | $certs/TwoCRLsCACert.crt |
michael@0 | 543 | restore_db |
michael@0 | 544 | |
michael@0 | 545 | VFY_ACTION="Invalid Unknown CRL Entry Extension Test8"; log_banner |
michael@0 | 546 | certImport UnknownCRLEntryExtensionCACert |
michael@0 | 547 | crlImportn UnknownCRLEntryExtensionCACRL.crl |
michael@0 | 548 | if [ $RET -eq 0 ] ; then |
michael@0 | 549 | pkitsn $certs/InvalidUnknownCRLEntryExtensionTest8EE.crt \ |
michael@0 | 550 | $certs/UnknownCRLEntryExtensionCACert.crt |
michael@0 | 551 | fi |
michael@0 | 552 | restore_db |
michael@0 | 553 | |
michael@0 | 554 | VFY_ACTION="Invalid Unknown CRL Extension Test9"; log_banner |
michael@0 | 555 | certImport UnknownCRLExtensionCACert |
michael@0 | 556 | crlImportn UnknownCRLExtensionCACRL.crl |
michael@0 | 557 | if [ $RET -eq 0 ] ; then |
michael@0 | 558 | pkitsn $certs/InvalidUnknownCRLExtensionTest9EE.crt \ |
michael@0 | 559 | $certs/UnknownCRLExtensionCACert.crt |
michael@0 | 560 | fi |
michael@0 | 561 | restore_db |
michael@0 | 562 | |
michael@0 | 563 | VFY_ACTION="Invalid Unknown CRL Extension Test10"; log_banner |
michael@0 | 564 | certImport UnknownCRLExtensionCACert |
michael@0 | 565 | crlImportn UnknownCRLExtensionCACRL.crl |
michael@0 | 566 | if [ $RET -eq 0 ] ; then |
michael@0 | 567 | pkitsn $certs/InvalidUnknownCRLExtensionTest10EE.crt \ |
michael@0 | 568 | $certs/UnknownCRLExtensionCACert.crt |
michael@0 | 569 | fi |
michael@0 | 570 | restore_db |
michael@0 | 571 | |
michael@0 | 572 | ### bug 414563 ### |
michael@0 | 573 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 574 | VFY_ACTION="Invalid Old CRL nextUpdate Test11"; log_banner |
michael@0 | 575 | certImport OldCRLnextUpdateCACert |
michael@0 | 576 | crlImport OldCRLnextUpdateCACRL.crl |
michael@0 | 577 | pkitsn $certs/InvalidOldCRLnextUpdateTest11EE.crt \ |
michael@0 | 578 | $certs/OldCRLnextUpdateCACert.crt |
michael@0 | 579 | restore_db |
michael@0 | 580 | |
michael@0 | 581 | VFY_ACTION="Invalid pre2000 CRL nextUpdate Test12"; log_banner |
michael@0 | 582 | certImport pre2000CRLnextUpdateCACert |
michael@0 | 583 | crlImport pre2000CRLnextUpdateCACRL.crl |
michael@0 | 584 | pkitsn $certs/Invalidpre2000CRLnextUpdateTest12EE.crt \ |
michael@0 | 585 | $certs/pre2000CRLnextUpdateCACert.crt |
michael@0 | 586 | restore_db |
michael@0 | 587 | fi |
michael@0 | 588 | |
michael@0 | 589 | VFY_ACTION="Valid GeneralizedTime CRL nextUpdate Test13"; log_banner |
michael@0 | 590 | certImport GeneralizedTimeCRLnextUpdateCACert |
michael@0 | 591 | crlImport GeneralizedTimeCRLnextUpdateCACRL.crl |
michael@0 | 592 | pkits $certs/ValidGeneralizedTimeCRLnextUpdateTest13EE.crt \ |
michael@0 | 593 | $certs/GeneralizedTimeCRLnextUpdateCACert.crt |
michael@0 | 594 | restore_db |
michael@0 | 595 | |
michael@0 | 596 | VFY_ACTION="Valid Negative Serial Number Test14"; log_banner |
michael@0 | 597 | certImport NegativeSerialNumberCACert |
michael@0 | 598 | crlImport NegativeSerialNumberCACRL.crl |
michael@0 | 599 | pkits $certs/ValidNegativeSerialNumberTest14EE.crt \ |
michael@0 | 600 | $certs/NegativeSerialNumberCACert.crt |
michael@0 | 601 | restore_db |
michael@0 | 602 | |
michael@0 | 603 | VFY_ACTION="Invalid Negative Serial Number Test15"; log_banner |
michael@0 | 604 | certImport NegativeSerialNumberCACert |
michael@0 | 605 | crlImport NegativeSerialNumberCACRL.crl |
michael@0 | 606 | pkitsn $certs/InvalidNegativeSerialNumberTest15EE.crt \ |
michael@0 | 607 | $certs/NegativeSerialNumberCACert.crt |
michael@0 | 608 | restore_db |
michael@0 | 609 | |
michael@0 | 610 | VFY_ACTION="Valid Long Serial Number Test16"; log_banner |
michael@0 | 611 | certImport LongSerialNumberCACert |
michael@0 | 612 | crlImport LongSerialNumberCACRL.crl |
michael@0 | 613 | pkits $certs/ValidLongSerialNumberTest16EE.crt \ |
michael@0 | 614 | $certs/LongSerialNumberCACert.crt |
michael@0 | 615 | restore_db |
michael@0 | 616 | |
michael@0 | 617 | VFY_ACTION="Valid Long Serial Number Test17"; log_banner |
michael@0 | 618 | certImport LongSerialNumberCACert |
michael@0 | 619 | crlImport LongSerialNumberCACRL.crl |
michael@0 | 620 | pkits $certs/ValidLongSerialNumberTest17EE.crt \ |
michael@0 | 621 | $certs/LongSerialNumberCACert.crt |
michael@0 | 622 | restore_db |
michael@0 | 623 | |
michael@0 | 624 | VFY_ACTION="Invalid Long Serial Number Test18"; log_banner |
michael@0 | 625 | certImport LongSerialNumberCACert |
michael@0 | 626 | crlImport LongSerialNumberCACRL.crl |
michael@0 | 627 | pkitsn $certs/InvalidLongSerialNumberTest18EE.crt \ |
michael@0 | 628 | $certs/LongSerialNumberCACert.crt |
michael@0 | 629 | restore_db |
michael@0 | 630 | |
michael@0 | 631 | ### bug 232737 ### |
michael@0 | 632 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 633 | VFY_ACTION="Valid Separate Certificate and CRL Keys Test19"; log_banner |
michael@0 | 634 | certImport SeparateCertificateandCRLKeysCertificateSigningCACert |
michael@0 | 635 | certImport SeparateCertificateandCRLKeysCRLSigningCert |
michael@0 | 636 | crlImport SeparateCertificateandCRLKeysCRL.crl |
michael@0 | 637 | pkits $certs/ValidSeparateCertificateandCRLKeysTest19EE.crt \ |
michael@0 | 638 | $certs/SeparateCertificateandCRLKeysCRLSigningCert.crt |
michael@0 | 639 | restore_db |
michael@0 | 640 | |
michael@0 | 641 | VFY_ACTION="Invalid Separate Certificate and CRL Keys Test20"; log_banner |
michael@0 | 642 | certImport SeparateCertificateandCRLKeysCertificateSigningCACert |
michael@0 | 643 | certImport SeparateCertificateandCRLKeysCRLSigningCert |
michael@0 | 644 | crlImport SeparateCertificateandCRLKeysCRL.crl |
michael@0 | 645 | pkits $certs/InvalidSeparateCertificateandCRLKeysTest20EE.crt \ |
michael@0 | 646 | $certs/SeparateCertificateandCRLKeysCRLSigningCert.crt |
michael@0 | 647 | restore_db |
michael@0 | 648 | |
michael@0 | 649 | VFY_ACTION="Invalid Separate Certificate and CRL Keys Test21"; log_banner |
michael@0 | 650 | certImport SeparateCertificateandCRLKeysCA2CertificateSigningCACert |
michael@0 | 651 | certImport SeparateCertificateandCRLKeysCA2CRLSigningCert |
michael@0 | 652 | crlImport SeparateCertificateandCRLKeysCA2CRL.crl |
michael@0 | 653 | pkits $certs/InvalidSeparateCertificateandCRLKeysTest21EE.crt \ |
michael@0 | 654 | $certs/SeparateCertificateandCRLKeysCA2CRLSigningCert.crt |
michael@0 | 655 | restore_db |
michael@0 | 656 | fi |
michael@0 | 657 | } |
michael@0 | 658 | |
michael@0 | 659 | pkits_PathVerificWithSelfIssuedCerts() |
michael@0 | 660 | { |
michael@0 | 661 | break_table "NIST PKITS Section 4.5: Self-Issued Certificates" |
michael@0 | 662 | |
michael@0 | 663 | ### bug 232737 ### |
michael@0 | 664 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 665 | VFY_ACTION="Valid Basic Self-Issued Old With New Test1"; log_banner |
michael@0 | 666 | certImport BasicSelfIssuedNewKeyCACert |
michael@0 | 667 | crlImport BasicSelfIssuedNewKeyCACRL.crl |
michael@0 | 668 | pkits $certs/ValidBasicSelfIssuedOldWithNewTest1EE.crt \ |
michael@0 | 669 | $certs/BasicSelfIssuedNewKeyOldWithNewCACert.crt \ |
michael@0 | 670 | $certs/BasicSelfIssuedNewKeyCACert.crt |
michael@0 | 671 | restore_db |
michael@0 | 672 | |
michael@0 | 673 | VFY_ACTION="Invalid Basic Self-Issued Old With New Test2"; log_banner |
michael@0 | 674 | certImport BasicSelfIssuedNewKeyCACert |
michael@0 | 675 | crlImport BasicSelfIssuedNewKeyCACRL.crl |
michael@0 | 676 | pkitsn $certs/InvalidBasicSelfIssuedOldWithNewTest2EE.crt \ |
michael@0 | 677 | $certs/BasicSelfIssuedNewKeyOldWithNewCACert.crt \ |
michael@0 | 678 | $certs/BasicSelfIssuedNewKeyCACert.crt |
michael@0 | 679 | restore_db |
michael@0 | 680 | fi |
michael@0 | 681 | |
michael@0 | 682 | ### bugs 321755 & 418769 ### |
michael@0 | 683 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 684 | VFY_ACTION="Valid Basic Self-Issued New With Old Test3"; log_banner |
michael@0 | 685 | certImport BasicSelfIssuedOldKeyCACert |
michael@0 | 686 | crlImport BasicSelfIssuedOldKeyCACRL.crl |
michael@0 | 687 | pkits $certs/ValidBasicSelfIssuedNewWithOldTest3EE.crt \ |
michael@0 | 688 | $certs/BasicSelfIssuedOldKeyNewWithOldCACert.crt \ |
michael@0 | 689 | $certs/BasicSelfIssuedOldKeyCACert.crt |
michael@0 | 690 | restore_db |
michael@0 | 691 | |
michael@0 | 692 | VFY_ACTION="Valid Basic Self-Issued New With Old Test4"; log_banner |
michael@0 | 693 | certImport BasicSelfIssuedOldKeyCACert |
michael@0 | 694 | crlImport BasicSelfIssuedOldKeyCACRL.crl |
michael@0 | 695 | pkits $certs/ValidBasicSelfIssuedNewWithOldTest4EE.crt \ |
michael@0 | 696 | $certs/BasicSelfIssuedOldKeyNewWithOldCACert.crt \ |
michael@0 | 697 | $certs/BasicSelfIssuedOldKeyCACert.crt |
michael@0 | 698 | restore_db |
michael@0 | 699 | |
michael@0 | 700 | VFY_ACTION="Invalid Basic Self-Issued New With Old Test5"; log_banner |
michael@0 | 701 | certImport BasicSelfIssuedOldKeyCACert |
michael@0 | 702 | crlImport BasicSelfIssuedOldKeyCACRL.crl |
michael@0 | 703 | pkitsn $certs/InvalidBasicSelfIssuedNewWithOldTest5EE.crt \ |
michael@0 | 704 | $certs/BasicSelfIssuedOldKeyNewWithOldCACert.crt \ |
michael@0 | 705 | $certs/BasicSelfIssuedOldKeyCACert.crt |
michael@0 | 706 | restore_db |
michael@0 | 707 | |
michael@0 | 708 | VFY_ACTION="Valid Basic Self-Issued CRL Signing Key Test6"; log_banner |
michael@0 | 709 | certImport BasicSelfIssuedCRLSigningKeyCACert |
michael@0 | 710 | crlImport BasicSelfIssuedOldKeyCACRL.crl |
michael@0 | 711 | pkits $certs/ValidBasicSelfIssuedCRLSigningKeyTest6EE.crt \ |
michael@0 | 712 | $certs/BasicSelfIssuedCRLSigningKeyCRLCert.crt \ |
michael@0 | 713 | $certs/BasicSelfIssuedCRLSigningKeyCACert.crt |
michael@0 | 714 | restore_db |
michael@0 | 715 | |
michael@0 | 716 | VFY_ACTION="Invalid Basic Self-Issued CRL Signing Key Test7"; log_banner |
michael@0 | 717 | certImport BasicSelfIssuedCRLSigningKeyCACert |
michael@0 | 718 | crlImport BasicSelfIssuedOldKeyCACRL.crl |
michael@0 | 719 | pkitsn $certs/InvalidBasicSelfIssuedCRLSigningKeyTest7EE.crt \ |
michael@0 | 720 | $certs/BasicSelfIssuedCRLSigningKeyCRLCert.crt \ |
michael@0 | 721 | $certs/BasicSelfIssuedCRLSigningKeyCACert.crt |
michael@0 | 722 | restore_db |
michael@0 | 723 | |
michael@0 | 724 | VFY_ACTION="Invalid Basic Self-Issued CRL Signing Key Test8"; log_banner |
michael@0 | 725 | certImport BasicSelfIssuedCRLSigningKeyCACert |
michael@0 | 726 | crlImport BasicSelfIssuedOldKeyCACRL.crl |
michael@0 | 727 | pkitsn $certs/InvalidBasicSelfIssuedCRLSigningKeyTest8EE.crt \ |
michael@0 | 728 | $certs/BasicSelfIssuedCRLSigningKeyCRLCert.crt \ |
michael@0 | 729 | $certs/BasicSelfIssuedCRLSigningKeyCACert.crt |
michael@0 | 730 | restore_db |
michael@0 | 731 | fi |
michael@0 | 732 | } |
michael@0 | 733 | |
michael@0 | 734 | pkits_BasicConstraints() |
michael@0 | 735 | { |
michael@0 | 736 | break_table "NIST PKITS Section 4.6: Verifying Basic Constraints" |
michael@0 | 737 | |
michael@0 | 738 | VFY_ACTION="Invalid Missing basicConstraints Test1"; log_banner |
michael@0 | 739 | certImport MissingbasicConstraintsCACert |
michael@0 | 740 | crlImport MissingbasicConstraintsCACRL.crl |
michael@0 | 741 | pkitsn $certs/InvalidMissingbasicConstraintsTest1EE.crt \ |
michael@0 | 742 | $certs/MissingbasicConstraintsCACert.crt |
michael@0 | 743 | restore_db |
michael@0 | 744 | |
michael@0 | 745 | VFY_ACTION="Invalid cA False Test2"; log_banner |
michael@0 | 746 | certImport basicConstraintsCriticalcAFalseCACert |
michael@0 | 747 | crlImport basicConstraintsCriticalcAFalseCACRL.crl |
michael@0 | 748 | pkitsn $certs/InvalidcAFalseTest2EE.crt \ |
michael@0 | 749 | $certs/basicConstraintsCriticalcAFalseCACert.crt |
michael@0 | 750 | restore_db |
michael@0 | 751 | |
michael@0 | 752 | VFY_ACTION="Invalid cA False Test3"; log_banner |
michael@0 | 753 | certImport basicConstraintsNotCriticalcAFalseCACert |
michael@0 | 754 | crlImport basicConstraintsNotCriticalcAFalseCACRL.crl |
michael@0 | 755 | pkitsn $certs/InvalidcAFalseTest3EE.crt \ |
michael@0 | 756 | $certs/basicConstraintsNotCriticalcAFalseCACert.crt |
michael@0 | 757 | restore_db |
michael@0 | 758 | |
michael@0 | 759 | VFY_ACTION="Valid basicConstraints Not Critical Test4"; log_banner |
michael@0 | 760 | certImport basicConstraintsNotCriticalCACert |
michael@0 | 761 | crlImport basicConstraintsNotCriticalCACRL.crl |
michael@0 | 762 | pkits $certs/ValidbasicConstraintsNotCriticalTest4EE.crt \ |
michael@0 | 763 | $certs/basicConstraintsNotCriticalCACert.crt |
michael@0 | 764 | restore_db |
michael@0 | 765 | |
michael@0 | 766 | VFY_ACTION="Invalid pathLenConstraint Test5"; log_banner |
michael@0 | 767 | certImport pathLenConstraint0CACert |
michael@0 | 768 | crlImport pathLenConstraint0CACRL.crl |
michael@0 | 769 | certImport pathLenConstraint0subCACert |
michael@0 | 770 | crlImport pathLenConstraint0subCACRL.crl |
michael@0 | 771 | pkitsn $certs/InvalidpathLenConstraintTest5EE.crt \ |
michael@0 | 772 | $certs/pathLenConstraint0subCACert.crt \ |
michael@0 | 773 | $certs/pathLenConstraint0CACert.crt |
michael@0 | 774 | restore_db |
michael@0 | 775 | |
michael@0 | 776 | VFY_ACTION="Invalid pathLenConstraint Test6"; log_banner |
michael@0 | 777 | certImport pathLenConstraint0CACert |
michael@0 | 778 | crlImport pathLenConstraint0CACRL.crl |
michael@0 | 779 | certImport pathLenConstraint0subCACert |
michael@0 | 780 | crlImport pathLenConstraint0subCACRL.crl |
michael@0 | 781 | pkitsn $certs/InvalidpathLenConstraintTest6EE.crt \ |
michael@0 | 782 | $certs/pathLenConstraint0subCACert.crt \ |
michael@0 | 783 | $certs/pathLenConstraint0CACert.crt |
michael@0 | 784 | restore_db |
michael@0 | 785 | |
michael@0 | 786 | VFY_ACTION="Valid pathLenConstraint Test7"; log_banner |
michael@0 | 787 | certImport pathLenConstraint0CACert |
michael@0 | 788 | crlImport pathLenConstraint0CACRL.crl |
michael@0 | 789 | pkits $certs/ValidpathLenConstraintTest7EE.crt \ |
michael@0 | 790 | $certs/pathLenConstraint0CACert.crt |
michael@0 | 791 | restore_db |
michael@0 | 792 | |
michael@0 | 793 | VFY_ACTION="Valid pathLenConstraint test8"; log_banner |
michael@0 | 794 | certImport pathLenConstraint0CACert |
michael@0 | 795 | crlImport pathLenConstraint0CACRL.crl |
michael@0 | 796 | pkits $certs/ValidpathLenConstraintTest8EE.crt \ |
michael@0 | 797 | $certs/pathLenConstraint0CACert.crt |
michael@0 | 798 | restore_db |
michael@0 | 799 | |
michael@0 | 800 | VFY_ACTION="Invalid pathLenConstraint Test9"; log_banner |
michael@0 | 801 | certImport pathLenConstraint6CACert |
michael@0 | 802 | crlImport pathLenConstraint6CACRL.crl |
michael@0 | 803 | certImport pathLenConstraint6subCA0Cert |
michael@0 | 804 | crlImport pathLenConstraint6subCA0CRL.crl |
michael@0 | 805 | certImport pathLenConstraint6subsubCA00Cert |
michael@0 | 806 | crlImport pathLenConstraint6subsubCA00CRL.crl |
michael@0 | 807 | pkitsn $certs/InvalidpathLenConstraintTest9EE.crt \ |
michael@0 | 808 | $certs/pathLenConstraint6subsubCA00Cert.crt \ |
michael@0 | 809 | $certs/pathLenConstraint6subCA0Cert.crt \ |
michael@0 | 810 | $certs/pathLenConstraint6CACert.crt |
michael@0 | 811 | restore_db |
michael@0 | 812 | |
michael@0 | 813 | VFY_ACTION="Invalid pathLenConstraint Test10"; log_banner |
michael@0 | 814 | certImport pathLenConstraint6CACert |
michael@0 | 815 | crlImport pathLenConstraint6CACRL.crl |
michael@0 | 816 | certImport pathLenConstraint6subCA0Cert |
michael@0 | 817 | crlImport pathLenConstraint6subCA0CRL.crl |
michael@0 | 818 | certImport pathLenConstraint6subsubCA00Cert |
michael@0 | 819 | crlImport pathLenConstraint6subsubCA00CRL.crl |
michael@0 | 820 | pkitsn $certs/InvalidpathLenConstraintTest10EE.crt \ |
michael@0 | 821 | $certs/pathLenConstraint6subsubCA00Cert.crt \ |
michael@0 | 822 | $certs/pathLenConstraint6subCA0Cert.crt \ |
michael@0 | 823 | $certs/pathLenConstraint6CACert.crt |
michael@0 | 824 | restore_db |
michael@0 | 825 | |
michael@0 | 826 | VFY_ACTION="Invalid pathLenConstraint Test11"; log_banner |
michael@0 | 827 | certImport pathLenConstraint6CACert |
michael@0 | 828 | crlImport pathLenConstraint6CACRL.crl |
michael@0 | 829 | certImport pathLenConstraint6subCA1Cert |
michael@0 | 830 | crlImport pathLenConstraint6subCA1CRL.crl |
michael@0 | 831 | certImport pathLenConstraint6subsubCA11Cert |
michael@0 | 832 | crlImport pathLenConstraint6subsubCA11CRL.crl |
michael@0 | 833 | certImport pathLenConstraint6subsubsubCA11XCert |
michael@0 | 834 | crlImport pathLenConstraint6subsubsubCA11XCRL.crl |
michael@0 | 835 | pkitsn $certs/InvalidpathLenConstraintTest11EE.crt \ |
michael@0 | 836 | $certs/pathLenConstraint6subsubsubCA11XCert.crt \ |
michael@0 | 837 | $certs/pathLenConstraint6subsubCA11Cert.crt \ |
michael@0 | 838 | $certs/pathLenConstraint6subCA1Cert.crt \ |
michael@0 | 839 | $certs/pathLenConstraint6CACert.crt |
michael@0 | 840 | restore_db |
michael@0 | 841 | |
michael@0 | 842 | VFY_ACTION="Invalid pathLenConstraint test12"; log_banner |
michael@0 | 843 | certImport pathLenConstraint6CACert |
michael@0 | 844 | crlImport pathLenConstraint6CACRL.crl |
michael@0 | 845 | certImport pathLenConstraint6subCA1Cert |
michael@0 | 846 | crlImport pathLenConstraint6subCA1CRL.crl |
michael@0 | 847 | certImport pathLenConstraint6subsubCA11Cert |
michael@0 | 848 | crlImport pathLenConstraint6subsubCA11CRL.crl |
michael@0 | 849 | certImport pathLenConstraint6subsubsubCA11XCert |
michael@0 | 850 | crlImport pathLenConstraint6subsubsubCA11XCRL.crl |
michael@0 | 851 | pkitsn $certs/InvalidpathLenConstraintTest12EE.crt \ |
michael@0 | 852 | $certs/pathLenConstraint6subsubsubCA11XCert.crt \ |
michael@0 | 853 | $certs/pathLenConstraint6subsubCA11Cert.crt \ |
michael@0 | 854 | $certs/pathLenConstraint6subCA1Cert.crt \ |
michael@0 | 855 | $certs/pathLenConstraint6CACert.crt |
michael@0 | 856 | restore_db |
michael@0 | 857 | |
michael@0 | 858 | VFY_ACTION="Valid pathLenConstraint Test13"; log_banner |
michael@0 | 859 | certImport pathLenConstraint6CACert |
michael@0 | 860 | crlImport pathLenConstraint6CACRL.crl |
michael@0 | 861 | certImport pathLenConstraint6subCA4Cert |
michael@0 | 862 | crlImport pathLenConstraint6subCA4CRL.crl |
michael@0 | 863 | certImport pathLenConstraint6subsubCA41Cert |
michael@0 | 864 | crlImport pathLenConstraint6subsubCA41CRL.crl |
michael@0 | 865 | certImport pathLenConstraint6subsubsubCA41XCert |
michael@0 | 866 | crlImport pathLenConstraint6subsubsubCA41XCRL.crl |
michael@0 | 867 | pkits $certs/ValidpathLenConstraintTest13EE.crt \ |
michael@0 | 868 | $certs/pathLenConstraint6subsubsubCA41XCert.crt \ |
michael@0 | 869 | $certs/pathLenConstraint6subsubCA41Cert.crt \ |
michael@0 | 870 | $certs/pathLenConstraint6subCA4Cert.crt \ |
michael@0 | 871 | $certs/pathLenConstraint6CACert.crt |
michael@0 | 872 | restore_db |
michael@0 | 873 | |
michael@0 | 874 | VFY_ACTION="Valid pathLenConstraint Test14"; log_banner |
michael@0 | 875 | certImport pathLenConstraint6CACert |
michael@0 | 876 | crlImport pathLenConstraint6CACRL.crl |
michael@0 | 877 | certImport pathLenConstraint6subCA4Cert |
michael@0 | 878 | crlImport pathLenConstraint6subCA4CRL.crl |
michael@0 | 879 | certImport pathLenConstraint6subsubCA41Cert |
michael@0 | 880 | crlImport pathLenConstraint6subsubCA41CRL.crl |
michael@0 | 881 | certImport pathLenConstraint6subsubsubCA41XCert |
michael@0 | 882 | crlImport pathLenConstraint6subsubsubCA41XCRL.crl |
michael@0 | 883 | pkits $certs/ValidpathLenConstraintTest14EE.crt \ |
michael@0 | 884 | $certs/pathLenConstraint6subsubsubCA41XCert.crt \ |
michael@0 | 885 | $certs/pathLenConstraint6subsubCA41Cert.crt \ |
michael@0 | 886 | $certs/pathLenConstraint6subCA4Cert.crt \ |
michael@0 | 887 | $certs/pathLenConstraint6CACert.crt |
michael@0 | 888 | restore_db |
michael@0 | 889 | |
michael@0 | 890 | ### bug 232737 ### |
michael@0 | 891 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 892 | VFY_ACTION="Valid Self-Issued pathLenConstraint Test15"; log_banner |
michael@0 | 893 | certImport pathLenConstraint0CACert |
michael@0 | 894 | crlImport pathLenConstraint0CACRL.crl |
michael@0 | 895 | pkits $certs/ValidSelfIssuedpathLenConstraintTest15EE.crt \ |
michael@0 | 896 | $certs/pathLenConstraint0SelfIssuedCACert.crt \ |
michael@0 | 897 | $certs/pathLenConstraint0CACert.crt |
michael@0 | 898 | restore_db |
michael@0 | 899 | fi |
michael@0 | 900 | |
michael@0 | 901 | VFY_ACTION="Invalid Self-Issued pathLenConstraint Test16"; log_banner |
michael@0 | 902 | certImport pathLenConstraint0CACert |
michael@0 | 903 | crlImport pathLenConstraint0CACRL.crl |
michael@0 | 904 | certImport pathLenConstraint0subCA2Cert |
michael@0 | 905 | crlImport pathLenConstraint0subCA2CRL.crl |
michael@0 | 906 | pkitsn $certs/InvalidSelfIssuedpathLenConstraintTest16EE.crt \ |
michael@0 | 907 | $certs/pathLenConstraint0subCA2Cert.crt \ |
michael@0 | 908 | $certs/pathLenConstraint0SelfIssuedCACert.crt \ |
michael@0 | 909 | $certs/pathLenConstraint0CACert.crt |
michael@0 | 910 | restore_db |
michael@0 | 911 | |
michael@0 | 912 | ### bug 232737 ### |
michael@0 | 913 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 914 | VFY_ACTION="Valid Self-Issued pathLenConstraint Test17"; log_banner |
michael@0 | 915 | certImport pathLenConstraint1CACert |
michael@0 | 916 | crlImport pathLenConstraint1CACRL.crl |
michael@0 | 917 | certImport pathLenConstraint1subCACert |
michael@0 | 918 | crlImport pathLenConstraint1subCACRL.crl |
michael@0 | 919 | pkits $certs/ValidSelfIssuedpathLenConstraintTest17EE.crt \ |
michael@0 | 920 | $certs/pathLenConstraint1SelfIssuedsubCACert.crt \ |
michael@0 | 921 | $certs/pathLenConstraint1subCACert.crt \ |
michael@0 | 922 | $certs/pathLenConstraint1SelfIssuedCACert.crt \ |
michael@0 | 923 | $certs/pathLenConstraint1CACert.crt |
michael@0 | 924 | restore_db |
michael@0 | 925 | fi |
michael@0 | 926 | } |
michael@0 | 927 | |
michael@0 | 928 | pkits_KeyUsage() |
michael@0 | 929 | { |
michael@0 | 930 | break_table "NIST PKITS Section 4.7: Key Usage" |
michael@0 | 931 | |
michael@0 | 932 | VFY_ACTION="Invalid keyUsage Critical keyCertSign False Test1"; log_banner |
michael@0 | 933 | certImport keyUsageCriticalkeyCertSignFalseCACert |
michael@0 | 934 | crlImport keyUsageCriticalkeyCertSignFalseCACRL.crl |
michael@0 | 935 | pkitsn $certs/InvalidkeyUsageCriticalkeyCertSignFalseTest1EE.crt \ |
michael@0 | 936 | $certs/keyUsageCriticalkeyCertSignFalseCACert.crt |
michael@0 | 937 | restore_db |
michael@0 | 938 | |
michael@0 | 939 | VFY_ACTION="Invalid keyUsage Not Critical keyCertSign False Test2"; log_banner |
michael@0 | 940 | certImport keyUsageNotCriticalkeyCertSignFalseCACert |
michael@0 | 941 | crlImport keyUsageNotCriticalkeyCertSignFalseCACRL.crl |
michael@0 | 942 | pkitsn $certs/InvalidkeyUsageNotCriticalkeyCertSignFalseTest2EE.crt \ |
michael@0 | 943 | $certs/keyUsageNotCriticalkeyCertSignFalseCACert.crt |
michael@0 | 944 | restore_db |
michael@0 | 945 | |
michael@0 | 946 | VFY_ACTION="Valid keyUsage Not Critical Test3"; log_banner |
michael@0 | 947 | certImport keyUsageNotCriticalCACert |
michael@0 | 948 | crlImport keyUsageNotCriticalCACRL.crl |
michael@0 | 949 | pkits $certs/ValidkeyUsageNotCriticalTest3EE.crt \ |
michael@0 | 950 | $certs/keyUsageNotCriticalCACert.crt |
michael@0 | 951 | restore_db |
michael@0 | 952 | |
michael@0 | 953 | VFY_ACTION="Invalid keyUsage Critical cRLSign False Test4"; log_banner |
michael@0 | 954 | certImport keyUsageCriticalcRLSignFalseCACert |
michael@0 | 955 | crlImportn keyUsageCriticalcRLSignFalseCACRL.crl |
michael@0 | 956 | if [ $RET -eq 0 ] ; then |
michael@0 | 957 | pkitsn $certs/InvalidkeyUsageCriticalcRLSignFalseTest4EE.crt \ |
michael@0 | 958 | $certs/keyUsageCriticalcRLSignFalseCACert.crt |
michael@0 | 959 | fi |
michael@0 | 960 | restore_db |
michael@0 | 961 | |
michael@0 | 962 | VFY_ACTION="Invalid keyUsage Not Critical cRLSign False Test5"; log_banner |
michael@0 | 963 | certImport keyUsageNotCriticalcRLSignFalseCACert |
michael@0 | 964 | crlImportn keyUsageNotCriticalcRLSignFalseCACRL.crl |
michael@0 | 965 | if [ $RET -eq 0 ] ; then |
michael@0 | 966 | pkitsn $certs/InvalidkeyUsageNotCriticalcRLSignFalseTest5EE.crt \ |
michael@0 | 967 | $certs/keyUsageNotCriticalcRLSignFalseCACert.crt |
michael@0 | 968 | fi |
michael@0 | 969 | restore_db |
michael@0 | 970 | } |
michael@0 | 971 | |
michael@0 | 972 | pkits_CertificatePolicies() |
michael@0 | 973 | { |
michael@0 | 974 | break_table "NIST PKITS Section 4.8: Certificate Policies" |
michael@0 | 975 | |
michael@0 | 976 | VFY_ACTION="All Certificates Same Policy Test1"; log_banner |
michael@0 | 977 | certImport GoodCACert |
michael@0 | 978 | crlImport GoodCACRL.crl |
michael@0 | 979 | pkits $certs/ValidCertificatePathTest1EE.crt \ |
michael@0 | 980 | $certs/GoodCACert.crt |
michael@0 | 981 | restore_db |
michael@0 | 982 | |
michael@0 | 983 | VFY_ACTION="All Certificates No Policies Test2"; log_banner |
michael@0 | 984 | certImport NoPoliciesCACert |
michael@0 | 985 | crlImport NoPoliciesCACRL.crl |
michael@0 | 986 | pkits $certs/AllCertificatesNoPoliciesTest2EE.crt \ |
michael@0 | 987 | $certs/NoPoliciesCACert.crt |
michael@0 | 988 | restore_db |
michael@0 | 989 | |
michael@0 | 990 | VFY_ACTION="Different Policies Test3"; log_banner |
michael@0 | 991 | certImport GoodCACert |
michael@0 | 992 | crlImport GoodCACRL.crl |
michael@0 | 993 | certImport PoliciesP2subCACert |
michael@0 | 994 | crlImport PoliciesP2subCACRL.crl |
michael@0 | 995 | pkits $certs/DifferentPoliciesTest3EE.crt \ |
michael@0 | 996 | $certs/PoliciesP2subCACert.crt \ |
michael@0 | 997 | $certs/GoodCACert.crt |
michael@0 | 998 | restore_db |
michael@0 | 999 | |
michael@0 | 1000 | VFY_ACTION="Different Policies Test4"; log_banner |
michael@0 | 1001 | certImport GoodCACert |
michael@0 | 1002 | crlImport GoodCACRL.crl |
michael@0 | 1003 | certImport GoodsubCACert |
michael@0 | 1004 | crlImport GoodsubCACRL.crl |
michael@0 | 1005 | pkits $certs/DifferentPoliciesTest4EE.crt \ |
michael@0 | 1006 | $certs/GoodsubCACert.crt \ |
michael@0 | 1007 | $certs/GoodCACert.crt |
michael@0 | 1008 | restore_db |
michael@0 | 1009 | |
michael@0 | 1010 | VFY_ACTION="Different Policies Test5"; log_banner |
michael@0 | 1011 | certImport GoodCACert |
michael@0 | 1012 | crlImport GoodCACRL.crl |
michael@0 | 1013 | certImport PoliciesP2subCA2Cert |
michael@0 | 1014 | crlImport PoliciesP2subCA2CRL.crl |
michael@0 | 1015 | pkits $certs/DifferentPoliciesTest5EE.crt \ |
michael@0 | 1016 | $certs/PoliciesP2subCA2Cert.crt \ |
michael@0 | 1017 | $certs/GoodCACert.crt |
michael@0 | 1018 | restore_db |
michael@0 | 1019 | |
michael@0 | 1020 | VFY_ACTION="Overlapping Policies Test6"; log_banner |
michael@0 | 1021 | certImport PoliciesP1234CACert |
michael@0 | 1022 | crlImport PoliciesP1234CACRL.crl |
michael@0 | 1023 | certImport PoliciesP1234subCAP123Cert |
michael@0 | 1024 | crlImport PoliciesP1234subCAP123CRL.crl |
michael@0 | 1025 | certImport PoliciesP1234subsubCAP123P12Cert |
michael@0 | 1026 | crlImport PoliciesP1234subsubCAP123P12CRL.crl |
michael@0 | 1027 | pkits $certs/OverlappingPoliciesTest6EE.crt \ |
michael@0 | 1028 | $certs/PoliciesP1234subsubCAP123P12Cert.crt \ |
michael@0 | 1029 | $certs/PoliciesP1234subCAP123Cert.crt \ |
michael@0 | 1030 | $certs/PoliciesP1234CACert.crt |
michael@0 | 1031 | restore_db |
michael@0 | 1032 | |
michael@0 | 1033 | VFY_ACTION="Different Policies Test7"; log_banner |
michael@0 | 1034 | certImport PoliciesP123CACert |
michael@0 | 1035 | crlImport PoliciesP123CACRL.crl |
michael@0 | 1036 | certImport PoliciesP123subCAP12Cert |
michael@0 | 1037 | crlImport PoliciesP123subCAP12CRL.crl |
michael@0 | 1038 | certImport PoliciesP123subsubCAP12P1Cert |
michael@0 | 1039 | crlImport PoliciesP123subsubCAP12P1CRL.crl |
michael@0 | 1040 | pkits $certs/DifferentPoliciesTest7EE.crt \ |
michael@0 | 1041 | $certs/PoliciesP123subsubCAP12P1Cert.crt \ |
michael@0 | 1042 | $certs/PoliciesP123subCAP12Cert.crt \ |
michael@0 | 1043 | $certs/PoliciesP123CACert.crt |
michael@0 | 1044 | restore_db |
michael@0 | 1045 | |
michael@0 | 1046 | VFY_ACTION="Different Policies Test8"; log_banner |
michael@0 | 1047 | certImport PoliciesP12CACert |
michael@0 | 1048 | crlImport PoliciesP12CACRL.crl |
michael@0 | 1049 | certImport PoliciesP12subCAP1Cert |
michael@0 | 1050 | crlImport PoliciesP12subCAP1CRL.crl |
michael@0 | 1051 | certImport PoliciesP12subsubCAP1P2Cert |
michael@0 | 1052 | crlImport PoliciesP12subsubCAP1P2CRL.crl |
michael@0 | 1053 | pkits $certs/DifferentPoliciesTest8EE.crt \ |
michael@0 | 1054 | $certs/PoliciesP123subsubCAP12P1Cert.crt \ |
michael@0 | 1055 | $certs/PoliciesP12subCAP1Cert.crt \ |
michael@0 | 1056 | $certs/PoliciesP12CACert.crt |
michael@0 | 1057 | restore_db |
michael@0 | 1058 | |
michael@0 | 1059 | VFY_ACTION="Different Policies Test9"; log_banner |
michael@0 | 1060 | certImport PoliciesP123CACert |
michael@0 | 1061 | crlImport PoliciesP123CACRL.crl |
michael@0 | 1062 | certImport PoliciesP123subCAP12Cert |
michael@0 | 1063 | crlImport PoliciesP123subCAP12CRL.crl |
michael@0 | 1064 | certImport PoliciesP123subsubCAP12P2Cert |
michael@0 | 1065 | crlImport PoliciesP123subsubCAP2P2CRL.crl |
michael@0 | 1066 | certImport PoliciesP123subsubsubCAP12P2P1Cert |
michael@0 | 1067 | crlImport PoliciesP123subsubsubCAP12P2P1CRL.crl |
michael@0 | 1068 | pkits $certs/DifferentPoliciesTest9EE.crt \ |
michael@0 | 1069 | $certs/PoliciesP123subsubsubCAP12P2P1Cert.crt \ |
michael@0 | 1070 | $certs/PoliciesP123subsubCAP12P1Cert.crt \ |
michael@0 | 1071 | $certs/PoliciesP12subCAP1Cert.crt \ |
michael@0 | 1072 | $certs/PoliciesP12CACert.crt |
michael@0 | 1073 | restore_db |
michael@0 | 1074 | |
michael@0 | 1075 | VFY_ACTION="All Certificates Same Policies Test10"; log_banner |
michael@0 | 1076 | certImport PoliciesP12CACert |
michael@0 | 1077 | crlImport PoliciesP12CACRL.crl |
michael@0 | 1078 | pkits $certs/AllCertificatesSamePoliciesTest10EE.crt \ |
michael@0 | 1079 | $certs/NoPoliciesCACert.crt |
michael@0 | 1080 | restore_db |
michael@0 | 1081 | |
michael@0 | 1082 | VFY_ACTION="All Certificates AnyPolicy Test11"; log_banner |
michael@0 | 1083 | certImport anyPolicyCACert |
michael@0 | 1084 | crlImport anyPolicyCACRL.crl |
michael@0 | 1085 | pkits $certs/AllCertificatesanyPolicyTest11EE.crt \ |
michael@0 | 1086 | $certs/anyPolicyCACert.crt |
michael@0 | 1087 | restore_db |
michael@0 | 1088 | |
michael@0 | 1089 | VFY_ACTION="Different Policies Test12"; log_banner |
michael@0 | 1090 | certImport PoliciesP3CACert |
michael@0 | 1091 | crlImport PoliciesP3CACRL.crl |
michael@0 | 1092 | pkits $certs/DifferentPoliciesTest12EE.crt \ |
michael@0 | 1093 | $certs/PoliciesP3CACert.crt |
michael@0 | 1094 | restore_db |
michael@0 | 1095 | |
michael@0 | 1096 | VFY_ACTION="All Certificates Same Policies Test13"; log_banner |
michael@0 | 1097 | certImport PoliciesP123CACert |
michael@0 | 1098 | crlImport PoliciesP123CACRL.crl |
michael@0 | 1099 | pkits $certs/AllCertificatesSamePoliciesTest13EE.crt \ |
michael@0 | 1100 | $certs/PoliciesP123CACert.crt |
michael@0 | 1101 | restore_db |
michael@0 | 1102 | |
michael@0 | 1103 | VFY_ACTION="AnyPolicy Test14"; log_banner |
michael@0 | 1104 | certImport anyPolicyCACert |
michael@0 | 1105 | crlImport anyPolicyCACRL.crl |
michael@0 | 1106 | pkits $certs/AnyPolicyTest14EE.crt \ |
michael@0 | 1107 | $certs/anyPolicyCACert.crt |
michael@0 | 1108 | restore_db |
michael@0 | 1109 | |
michael@0 | 1110 | VFY_ACTION="User Notice Qualifier Test15"; log_banner |
michael@0 | 1111 | pkits $certs/UserNoticeQualifierTest15EE.crt |
michael@0 | 1112 | |
michael@0 | 1113 | VFY_ACTION="User Notice Qualifier Test16"; log_banner |
michael@0 | 1114 | certImport GoodCACert |
michael@0 | 1115 | crlImport GoodCACRL.crl |
michael@0 | 1116 | pkits $certs/UserNoticeQualifierTest16EE.crt \ |
michael@0 | 1117 | $certs/GoodCACert.crt |
michael@0 | 1118 | |
michael@0 | 1119 | VFY_ACTION="User Notice Qualifier Test17"; log_banner |
michael@0 | 1120 | certImport GoodCACert |
michael@0 | 1121 | crlImport GoodCACRL.crl |
michael@0 | 1122 | pkits $certs/UserNoticeQualifierTest17EE.crt \ |
michael@0 | 1123 | $certs/GoodCACert.crt |
michael@0 | 1124 | restore_db |
michael@0 | 1125 | |
michael@0 | 1126 | VFY_ACTION="User Notice Qualifier Test18"; log_banner |
michael@0 | 1127 | certImport PoliciesP12CACert |
michael@0 | 1128 | crlImport PoliciesP12CACRL.crl |
michael@0 | 1129 | pkits $certs/UserNoticeQualifierTest18EE.crt \ |
michael@0 | 1130 | $certs/PoliciesP12CACert.crt |
michael@0 | 1131 | restore_db |
michael@0 | 1132 | |
michael@0 | 1133 | VFY_ACTION="User Notice Qualifier Test19"; log_banner |
michael@0 | 1134 | pkits $certs/UserNoticeQualifierTest19EE.crt |
michael@0 | 1135 | |
michael@0 | 1136 | VFY_ACTION="CPS Pointer Qualifier Test20"; log_banner |
michael@0 | 1137 | certImport GoodCACert |
michael@0 | 1138 | crlImport GoodCACRL.crl |
michael@0 | 1139 | pkits $certs/CPSPointerQualifierTest20EE.crt \ |
michael@0 | 1140 | $certs/GoodCACert.crt |
michael@0 | 1141 | restore_db |
michael@0 | 1142 | } |
michael@0 | 1143 | |
michael@0 | 1144 | pkits_RequireExplicitPolicy() |
michael@0 | 1145 | { |
michael@0 | 1146 | break_table "NIST PKITS Section 4.9: Require Explicit Policy" |
michael@0 | 1147 | |
michael@0 | 1148 | VFY_ACTION="Valid RequireExplicitPolicy Test1"; log_banner |
michael@0 | 1149 | certImportn requireExplicitPolicy10CACert |
michael@0 | 1150 | crlImportn requireExplicitPolicy10CACRL.crl |
michael@0 | 1151 | certImport requireExplicitPolicy10subCACert |
michael@0 | 1152 | crlImport requireExplicitPolicy10subCACRL.crl |
michael@0 | 1153 | certImport requireExplicitPolicy10subsubCACert |
michael@0 | 1154 | crlImport requireExplicitPolicy10subsubCACRL.crl |
michael@0 | 1155 | certImport requireExplicitPolicy10subsubsubCACert |
michael@0 | 1156 | crlImport requireExplicitPolicy10subsubsubCACRL.crl |
michael@0 | 1157 | pkits $certs/ValidrequireExplicitPolicyTest1EE.crt \ |
michael@0 | 1158 | $certs/requireExplicitPolicy10subsubsubCACert.crt \ |
michael@0 | 1159 | $certs/requireExplicitPolicy10subsubCACert.crt \ |
michael@0 | 1160 | $certs/requireExplicitPolicy10subCACert.crt \ |
michael@0 | 1161 | $certs/requireExplicitPolicy10CACert.crt |
michael@0 | 1162 | restore_db |
michael@0 | 1163 | |
michael@0 | 1164 | VFY_ACTION="Valid RequireExplicitPolicy Test2"; log_banner |
michael@0 | 1165 | certImportn requireExplicitPolicy5CACert |
michael@0 | 1166 | crlImportn requireExplicitPolicy5CACRL.crl |
michael@0 | 1167 | certImport requireExplicitPolicy5subCACert |
michael@0 | 1168 | crlImport requireExplicitPolicy5subCACRL.crl |
michael@0 | 1169 | certImport requireExplicitPolicy5subsubCACert |
michael@0 | 1170 | crlImport requireExplicitPolicy5subsubCACRL.crl |
michael@0 | 1171 | certImport requireExplicitPolicy5subsubsubCACert |
michael@0 | 1172 | crlImport requireExplicitPolicy5subsubsubCACRL.crl |
michael@0 | 1173 | pkits $certs/ValidrequireExplicitPolicyTest2EE.crt \ |
michael@0 | 1174 | $certs/requireExplicitPolicy5subsubsubCACert.crt \ |
michael@0 | 1175 | $certs/requireExplicitPolicy5subsubCACert.crt \ |
michael@0 | 1176 | $certs/requireExplicitPolicy5subCACert.crt \ |
michael@0 | 1177 | $certs/requireExplicitPolicy5CACert.crt |
michael@0 | 1178 | restore_db |
michael@0 | 1179 | |
michael@0 | 1180 | VFY_ACTION="Invalid RequireExplicitPolicy Test3"; log_banner |
michael@0 | 1181 | certImportn requireExplicitPolicy4CACert |
michael@0 | 1182 | crlImportn requireExplicitPolicy4CACRL.crl |
michael@0 | 1183 | certImport requireExplicitPolicy4subCACert |
michael@0 | 1184 | crlImport requireExplicitPolicy4subCACRL.crl |
michael@0 | 1185 | certImport requireExplicitPolicy4subsubCACert |
michael@0 | 1186 | crlImport requireExplicitPolicy4subsubCACRL.crl |
michael@0 | 1187 | certImport requireExplicitPolicy4subsubsubCACert |
michael@0 | 1188 | crlImport requireExplicitPolicy4subsubsubCACRL.crl |
michael@0 | 1189 | pkitsn $certs/InvalidrequireExplicitPolicyTest3EE.crt \ |
michael@0 | 1190 | $certs/requireExplicitPolicy4subsubsubCACert.crt \ |
michael@0 | 1191 | $certs/requireExplicitPolicy4subsubCACert.crt \ |
michael@0 | 1192 | $certs/requireExplicitPolicy4subCACert.crt \ |
michael@0 | 1193 | $certs/requireExplicitPolicy4CACert.crt |
michael@0 | 1194 | restore_db |
michael@0 | 1195 | |
michael@0 | 1196 | VFY_ACTION="Valid RequireExplicitPolicy Test4"; log_banner |
michael@0 | 1197 | certImportn requireExplicitPolicy0CACert |
michael@0 | 1198 | crlImportn requireExplicitPolicy0CACRL.crl |
michael@0 | 1199 | certImport requireExplicitPolicy0subCACert |
michael@0 | 1200 | crlImport requireExplicitPolicy0subCACRL.crl |
michael@0 | 1201 | certImport requireExplicitPolicy0subsubCACert |
michael@0 | 1202 | crlImport requireExplicitPolicy0subsubCACRL.crl |
michael@0 | 1203 | certImport requireExplicitPolicy0subsubsubCACert |
michael@0 | 1204 | crlImport requireExplicitPolicy0subsubsubCACRL.crl |
michael@0 | 1205 | pkits $certs/ValidrequireExplicitPolicyTest4EE.crt \ |
michael@0 | 1206 | $certs/requireExplicitPolicy0subsubsubCACert.crt \ |
michael@0 | 1207 | $certs/requireExplicitPolicy0subsubCACert.crt \ |
michael@0 | 1208 | $certs/requireExplicitPolicy0subCACert.crt \ |
michael@0 | 1209 | $certs/requireExplicitPolicy0CACert.crt |
michael@0 | 1210 | restore_db |
michael@0 | 1211 | |
michael@0 | 1212 | VFY_ACTION="Invalid RequireExplicitPolicy Test5"; log_banner |
michael@0 | 1213 | certImportn requireExplicitPolicy7CACert |
michael@0 | 1214 | crlImportn requireExplicitPolicy7CACRL.crl |
michael@0 | 1215 | certImportn requireExplicitPolicy7subCARE2Cert |
michael@0 | 1216 | crlImportn requireExplicitPolicy7subCARE2CRL.crl |
michael@0 | 1217 | certImportn requireExplicitPolicy7subsubCARE2RE4Cert |
michael@0 | 1218 | crlImportn requireExplicitPolicy7subsubCARE2RE4CRL.crl |
michael@0 | 1219 | certImport requireExplicitPolicy7subsubsubCARE2RE4Cert |
michael@0 | 1220 | crlImport requireExplicitPolicy7subsubsubCARE2RE4CRL.crl |
michael@0 | 1221 | pkitsn $certs/InvalidrequireExplicitPolicyTest5EE.crt \ |
michael@0 | 1222 | $certs/requireExplicitPolicy7subsubsubCARE2RE4Cert.crt \ |
michael@0 | 1223 | $certs/requireExplicitPolicy7subsubCARE2RE4Cert.crt \ |
michael@0 | 1224 | $certs/requireExplicitPolicy7subCARE2Cert.crt \ |
michael@0 | 1225 | $certs/requireExplicitPolicy7CACert.crt |
michael@0 | 1226 | restore_db |
michael@0 | 1227 | |
michael@0 | 1228 | VFY_ACTION="Valid Self-Issued RequireExplicitPolicy Test6"; log_banner |
michael@0 | 1229 | certImportn requireExplicitPolicy2CACert |
michael@0 | 1230 | crlImportn requireExplicitPolicy2CACRL.crl |
michael@0 | 1231 | pkits $certs/ValidSelfIssuedrequireExplicitPolicyTest6EE.crt \ |
michael@0 | 1232 | $certs/requireExplicitPolicy2SelfIssuedCACert.crt \ |
michael@0 | 1233 | $certs/requireExplicitPolicy2CACert.crt |
michael@0 | 1234 | restore_db |
michael@0 | 1235 | |
michael@0 | 1236 | VFY_ACTION="Invalid Self-Issued RequireExplicitPolicy Test7"; log_banner |
michael@0 | 1237 | certImportn requireExplicitPolicy2CACert |
michael@0 | 1238 | crlImportn requireExplicitPolicy2CACRL.crl |
michael@0 | 1239 | certImport requireExplicitPolicy2subCACert |
michael@0 | 1240 | crlImport requireExplicitPolicy2subCACRL.crl |
michael@0 | 1241 | pkitsn $certs/InvalidSelfIssuedrequireExplicitPolicyTest7EE.crt \ |
michael@0 | 1242 | $certs/requireExplicitPolicy2subCACert.crt \ |
michael@0 | 1243 | $certs/requireExplicitPolicy2SelfIssuedCACert.crt \ |
michael@0 | 1244 | $certs/requireExplicitPolicy2CACert.crt |
michael@0 | 1245 | restore_db |
michael@0 | 1246 | |
michael@0 | 1247 | VFY_ACTION="Invalid Self-Issued RequireExplicitPolicy Test8"; log_banner |
michael@0 | 1248 | certImportn requireExplicitPolicy2CACert |
michael@0 | 1249 | crlImportn requireExplicitPolicy2CACRL.crl |
michael@0 | 1250 | certImport requireExplicitPolicy2subCACert |
michael@0 | 1251 | crlImport requireExplicitPolicy2subCACRL.crl |
michael@0 | 1252 | pkitsn $certs/InvalidSelfIssuedrequireExplicitPolicyTest8EE.crt \ |
michael@0 | 1253 | $certs/requireExplicitPolicy2SelfIssuedsubCACert.crt \ |
michael@0 | 1254 | $certs/requireExplicitPolicy2subCACert.crt \ |
michael@0 | 1255 | $certs/requireExplicitPolicy2SelfIssuedCACert.crt \ |
michael@0 | 1256 | $certs/requireExplicitPolicy2CACert.crt |
michael@0 | 1257 | restore_db |
michael@0 | 1258 | } |
michael@0 | 1259 | |
michael@0 | 1260 | pkits_PolicyMappings() |
michael@0 | 1261 | { |
michael@0 | 1262 | break_table "NIST PKITS Section 4.10: Policy Mappings" |
michael@0 | 1263 | |
michael@0 | 1264 | VFY_ACTION="Valid Policy Mapping Test1"; log_banner |
michael@0 | 1265 | certImportn Mapping1to2CACert |
michael@0 | 1266 | crlImportn Mapping1to2CACRL.crl |
michael@0 | 1267 | pkits $certs/ValidPolicyMappingTest1EE.crt \ |
michael@0 | 1268 | $certs/Mapping1to2CACert.crt |
michael@0 | 1269 | restore_db |
michael@0 | 1270 | |
michael@0 | 1271 | VFY_ACTION="Invalid Policy Mapping Test2"; log_banner |
michael@0 | 1272 | certImportn Mapping1to2CACert |
michael@0 | 1273 | crlImportn Mapping1to2CACRL.crl |
michael@0 | 1274 | pkitsn $certs/InvalidPolicyMappingTest2EE.crt \ |
michael@0 | 1275 | $certs/Mapping1to2CACert.crt |
michael@0 | 1276 | restore_db |
michael@0 | 1277 | |
michael@0 | 1278 | VFY_ACTION="Valid Policy Mapping Test3"; log_banner |
michael@0 | 1279 | certImportn P12Mapping1to3CACert |
michael@0 | 1280 | crlImportn P12Mapping1to3CACRL.crl |
michael@0 | 1281 | certImportn P12Mapping1to3subCACert |
michael@0 | 1282 | crlImportn P12Mapping1to3subCACRL.crl |
michael@0 | 1283 | certImportn P12Mapping1to3subsubCACert |
michael@0 | 1284 | crlImportn P12Mapping1to3subsubCACRL.crl |
michael@0 | 1285 | pkits $certs/ValidPolicyMappingTest3EE.crt \ |
michael@0 | 1286 | $certs/P12Mapping1to3subsubCACert.crt \ |
michael@0 | 1287 | $certs/P12Mapping1to3subCACert.crt \ |
michael@0 | 1288 | $certs/P12Mapping1to3CA.crt |
michael@0 | 1289 | restore_db |
michael@0 | 1290 | |
michael@0 | 1291 | VFY_ACTION="Invalid Policy Mapping Test4"; log_banner |
michael@0 | 1292 | certImportn P12Mapping1to3CACert |
michael@0 | 1293 | crlImportn P12Mapping1to3CACRL.crl |
michael@0 | 1294 | certImportn P12Mapping1to3subCACert |
michael@0 | 1295 | crlImportn P12Mapping1to3subCACRL.crl |
michael@0 | 1296 | certImportn P12Mapping1to3subsubCACert |
michael@0 | 1297 | crlImportn P12Mapping1to3subsubCACRL.crl |
michael@0 | 1298 | pkitsn $certs/InvalidPolicyMappingTest4EE.crt \ |
michael@0 | 1299 | $certs/P12Mapping1to3subsubCACert.crt \ |
michael@0 | 1300 | $certs/P12Mapping1to3subCACert.crt \ |
michael@0 | 1301 | $certs/P12Mapping1to3CA.crt |
michael@0 | 1302 | restore_db |
michael@0 | 1303 | |
michael@0 | 1304 | VFY_ACTION="Valid Policy Mapping Test5"; log_banner |
michael@0 | 1305 | certImportn P1Mapping1to234CACert |
michael@0 | 1306 | crlImportn P1Mapping1to234CACRL.crl |
michael@0 | 1307 | certImportn P1Mapping1to234subCACert |
michael@0 | 1308 | crlImportn P1Mapping1to234subCACRL.crl |
michael@0 | 1309 | pkits $certs/ValidPolicyMappingTest5EE.crt \ |
michael@0 | 1310 | $certs/P1Mapping1to234subCACert.crt \ |
michael@0 | 1311 | $certs/P1Mapping1to234CA.crt |
michael@0 | 1312 | restore_db |
michael@0 | 1313 | |
michael@0 | 1314 | VFY_ACTION="Valid Policy Mapping Test6"; log_banner |
michael@0 | 1315 | certImportn P1Mapping1to234CACert |
michael@0 | 1316 | crlImportn P1Mapping1to234CACRL.crl |
michael@0 | 1317 | certImportn P1Mapping1to234subCACert |
michael@0 | 1318 | crlImportn P1Mapping1to234subCACRL.crl |
michael@0 | 1319 | pkits $certs/ValidPolicyMappingTest6EE.crt \ |
michael@0 | 1320 | $certs/P1Mapping1to234subCACert.crt \ |
michael@0 | 1321 | $certs/P1Mapping1to234CA.crt |
michael@0 | 1322 | restore_db |
michael@0 | 1323 | |
michael@0 | 1324 | VFY_ACTION="Invalid Mapping from anyPolicy Test7"; log_banner |
michael@0 | 1325 | certImportn MappingFromanyPolicyCACert |
michael@0 | 1326 | crlImportn MappingFromanyPolicyCACRL.crl |
michael@0 | 1327 | pkitsn $certs/InvalidMappingFromanyPolicyTest7EE.crt \ |
michael@0 | 1328 | $certs/MappingFromanyPolicyCACert.crt |
michael@0 | 1329 | restore_db |
michael@0 | 1330 | |
michael@0 | 1331 | VFY_ACTION="Invalid Mapping to anyPolicy Test8"; log_banner |
michael@0 | 1332 | certImportn MappingToanyPolicyCACert |
michael@0 | 1333 | crlImportn MappingToanyPolicyCACRL.crl |
michael@0 | 1334 | pkitsn $certs/InvalidMappingToanyPolicyTest8EE.crt \ |
michael@0 | 1335 | $certs/MappingToanyPolicyCACert.crt |
michael@0 | 1336 | restore_db |
michael@0 | 1337 | |
michael@0 | 1338 | VFY_ACTION="Valid Policy Mapping Test9"; log_banner |
michael@0 | 1339 | certImport PanyPolicyMapping1to2CACert |
michael@0 | 1340 | crlImport PanyPolicyMapping1to2CACRL.crl |
michael@0 | 1341 | pkits $certs/ValidPolicyMappingTest9EE.crt \ |
michael@0 | 1342 | $certs/PanyPolicyMapping1to2CACert.crt |
michael@0 | 1343 | restore_db |
michael@0 | 1344 | |
michael@0 | 1345 | VFY_ACTION="Invalid Policy Mapping Test10"; log_banner |
michael@0 | 1346 | certImport GoodCACert |
michael@0 | 1347 | crlImport GoodCACRL.crl |
michael@0 | 1348 | certImportn GoodsubCAPanyPolicyMapping1to2CACert |
michael@0 | 1349 | crlImportn GoodsubCAPanyPolicyMapping1to2CACRL.crl |
michael@0 | 1350 | pkitsn $certs/InvalidPolicyMappingTest10EE.crt \ |
michael@0 | 1351 | $certs/GoodsubCAPanyPolicyMapping1to2CACert.crt \ |
michael@0 | 1352 | $certs/GoodCACert.crt |
michael@0 | 1353 | restore_db |
michael@0 | 1354 | |
michael@0 | 1355 | VFY_ACTION="Valid Policy Mapping Test11"; log_banner |
michael@0 | 1356 | certImport GoodCACert |
michael@0 | 1357 | crlImport GoodCACRL.crl |
michael@0 | 1358 | certImportn GoodsubCAPanyPolicyMapping1to2CACert |
michael@0 | 1359 | crlImportn GoodsubCAPanyPolicyMapping1to2CACRL.crl |
michael@0 | 1360 | pkits $certs/ValidPolicyMappingTest11EE.crt \ |
michael@0 | 1361 | $certs/GoodsubCAPanyPolicyMapping1to2CACert.crt \ |
michael@0 | 1362 | $certs/GoodCACert.crt |
michael@0 | 1363 | restore_db |
michael@0 | 1364 | |
michael@0 | 1365 | VFY_ACTION="Valid Policy Mapping Test12"; log_banner |
michael@0 | 1366 | certImportn P12Mapping1to3CACert |
michael@0 | 1367 | crlImportn P12Mapping1to3CACRL.crl |
michael@0 | 1368 | pkits $certs/ValidPolicyMappingTest12EE.crt \ |
michael@0 | 1369 | $certs/P12Mapping1to3CACert.crt |
michael@0 | 1370 | restore_db |
michael@0 | 1371 | |
michael@0 | 1372 | VFY_ACTION="Valid Policy Mapping Test13"; log_banner |
michael@0 | 1373 | certImportn P1anyPolicyMapping1to2CACert |
michael@0 | 1374 | crlImportn P1anyPolicyMapping1to2CACRL.crl |
michael@0 | 1375 | pkits $certs/ValidPolicyMappingTest13EE.crt \ |
michael@0 | 1376 | $certs/P1anyPolicyMapping1to2CACert.crt |
michael@0 | 1377 | restore_db |
michael@0 | 1378 | |
michael@0 | 1379 | VFY_ACTION="Valid Policy Mapping Test14"; log_banner |
michael@0 | 1380 | certImportn P1anyPolicyMapping1to2CACert |
michael@0 | 1381 | crlImportn P1anyPolicyMapping1to2CACRL.crl |
michael@0 | 1382 | pkits $certs/ValidPolicyMappingTest14EE.crt \ |
michael@0 | 1383 | $certs/P1anyPolicyMapping1to2CACert.crt |
michael@0 | 1384 | restore_db |
michael@0 | 1385 | } |
michael@0 | 1386 | |
michael@0 | 1387 | |
michael@0 | 1388 | pkits_InhibitPolicyMapping() |
michael@0 | 1389 | { |
michael@0 | 1390 | break_table "NIST PKITS Section 4.11: Inhibit Policy Mapping" |
michael@0 | 1391 | |
michael@0 | 1392 | VFY_ACTION="Invalid inhibitPolicyMapping Test1"; log_banner |
michael@0 | 1393 | certImportn inhibitPolicyMapping0CACert |
michael@0 | 1394 | crlImportn inhibitPolicyMapping0CACRL.crl |
michael@0 | 1395 | certImportn inhibitPolicyMapping0subCACert |
michael@0 | 1396 | crlImportn inhibitPolicyMapping0subCACRL.crl |
michael@0 | 1397 | pkitsn $certs/InvalidinhibitPolicyMappingTest1EE.crt \ |
michael@0 | 1398 | $certs/inhibitPolicyMapping0CACert.crt \ |
michael@0 | 1399 | $certs/inhibitPolicyMapping0subCACert.crt |
michael@0 | 1400 | restore_db |
michael@0 | 1401 | |
michael@0 | 1402 | VFY_ACTION="Valid inhibitPolicyMapping Test2"; log_banner |
michael@0 | 1403 | certImportn inhibitPolicyMapping1P12CACert |
michael@0 | 1404 | crlImportn inhibitPolicyMapping1P12CACRL.crl |
michael@0 | 1405 | certImportn inhibitPolicyMapping1P12subCACert |
michael@0 | 1406 | crlImportn inhibitPolicyMapping1P12subCACRL.crl |
michael@0 | 1407 | pkits $certs/ValidinhibitPolicyMappingTest2EE.crt \ |
michael@0 | 1408 | $certs/inhibitPolicyMapping1P12CACert.crt \ |
michael@0 | 1409 | $certs/inhibitPolicyMapping1P12subCACert.crt |
michael@0 | 1410 | restore_db |
michael@0 | 1411 | |
michael@0 | 1412 | VFY_ACTION="Invalid inhibitPolicyMapping Test3"; log_banner |
michael@0 | 1413 | certImportn inhibitPolicyMapping1P12CACert |
michael@0 | 1414 | crlImportn inhibitPolicyMapping1P12CACRL.crl |
michael@0 | 1415 | certImportn inhibitPolicyMapping1P12subCACert |
michael@0 | 1416 | crlImportn inhibitPolicyMapping1P12subCACRL.crl |
michael@0 | 1417 | certImportn inhibitPolicyMapping1P12subsubCACert |
michael@0 | 1418 | crlImportn inhibitPolicyMapping1P12subsubCACRL.crl |
michael@0 | 1419 | pkitsn $certs/InvalidinhibitPolicyMappingTest3EE.crt \ |
michael@0 | 1420 | $certs/inhibitPolicyMapping1P12subsubCACert.crt \ |
michael@0 | 1421 | $certs/inhibitPolicyMapping1P12subCACert.crt \ |
michael@0 | 1422 | $certs/inhibitPolicyMapping1P12CACert.crt |
michael@0 | 1423 | restore_db |
michael@0 | 1424 | |
michael@0 | 1425 | VFY_ACTION="Valid inhibitPolicyMapping Test4"; log_banner |
michael@0 | 1426 | certImportn inhibitPolicyMapping1P12CACert |
michael@0 | 1427 | crlImportn inhibitPolicyMapping1P12CACRL.crl |
michael@0 | 1428 | certImportn inhibitPolicyMapping1P12subCACert |
michael@0 | 1429 | crlImportn inhibitPolicyMapping1P12subCACRL.crl |
michael@0 | 1430 | certImportn inhibitPolicyMapping1P12subsubCACert |
michael@0 | 1431 | crlImportn inhibitPolicyMapping1P12subsubCACRL.crl |
michael@0 | 1432 | pkits $certs/ValidinhibitPolicyMappingTest4EE.crt \ |
michael@0 | 1433 | $certs/inhibitPolicyMapping1P12CACert.crt \ |
michael@0 | 1434 | $certs/inhibitPolicyMapping1P12subCACert.crt |
michael@0 | 1435 | restore_db |
michael@0 | 1436 | |
michael@0 | 1437 | VFY_ACTION="Invalid inhibitPolicyMapping Test5"; log_banner |
michael@0 | 1438 | certImportn inhibitPolicyMapping5CACert |
michael@0 | 1439 | crlImportn inhibitPolicyMapping5CACRL.crl |
michael@0 | 1440 | certImportn inhibitPolicyMapping5subCACert |
michael@0 | 1441 | crlImportn inhibitPolicyMapping5subCACRL.crl |
michael@0 | 1442 | certImport inhibitPolicyMapping5subsubCACert |
michael@0 | 1443 | crlImport inhibitPolicyMapping5subsubCACRL.crl |
michael@0 | 1444 | pkitsn $certs/InvalidinhibitPolicyMappingTest5EE.crt \ |
michael@0 | 1445 | $certs/inhibitPolicyMapping5subsubCACert.crt \ |
michael@0 | 1446 | $certs/inhibitPolicyMapping5subCACert.crt \ |
michael@0 | 1447 | $certs/inhibitPolicyMapping5CACert.crt |
michael@0 | 1448 | restore_db |
michael@0 | 1449 | |
michael@0 | 1450 | VFY_ACTION="Invalid inhibitPolicyMapping Test6"; log_banner |
michael@0 | 1451 | certImportn inhibitPolicyMapping1P12CACert |
michael@0 | 1452 | crlImportn inhibitPolicyMapping1P12CACRL.crl |
michael@0 | 1453 | certImportn inhibitPolicyMapping1P12subCAIPM5Cert |
michael@0 | 1454 | crlImportn inhibitPolicyMapping1P12subCAIPM5CRL.crl |
michael@0 | 1455 | certImport inhibitPolicyMapping1P12subsubCAIPM5Cert |
michael@0 | 1456 | crlImportn inhibitPolicyMapping1P12subsubCAIPM5CRL.crl |
michael@0 | 1457 | pkitsn $certs/InvalidinhibitPolicyMappingTest6EE.crt \ |
michael@0 | 1458 | $certs/inhibitPolicyMapping1P12subsubCAIPM5Cert.crt \ |
michael@0 | 1459 | $certs/inhibitPolicyMapping1P12subCAIPM5Cert.crt \ |
michael@0 | 1460 | $certs/inhibitPolicyMapping1P12CACert.crt |
michael@0 | 1461 | restore_db |
michael@0 | 1462 | |
michael@0 | 1463 | VFY_ACTION="Valid Self-Issued inhibitPolicyMapping Test7"; log_banner |
michael@0 | 1464 | certImportn inhibitPolicyMapping1P1CACert |
michael@0 | 1465 | crlImportn inhibitPolicyMapping1P1CACRL.crl |
michael@0 | 1466 | certImportn inhibitPolicyMapping1P1subCACert |
michael@0 | 1467 | crlImportn inhibitPolicyMapping1P1subCACRL.crl |
michael@0 | 1468 | pkits $certs/ValidSelfIssuedinhibitPolicyMappingTest7EE.crt \ |
michael@0 | 1469 | $certs/inhibitPolicyMapping1P1subCACert.crt \ |
michael@0 | 1470 | $certs/inhibitPolicyMapping1P1SelfIssuedCACert.crt \ |
michael@0 | 1471 | $certs/inhibitPolicyMapping1P1CACert.crt |
michael@0 | 1472 | restore_db |
michael@0 | 1473 | |
michael@0 | 1474 | VFY_ACTION="Invalid Self-Issued inhibitPolicyMapping Test8"; log_banner |
michael@0 | 1475 | certImportn inhibitPolicyMapping1P1CACert |
michael@0 | 1476 | crlImportn inhibitPolicyMapping1P1CACRL.crl |
michael@0 | 1477 | certImportn inhibitPolicyMapping1P1subCACert |
michael@0 | 1478 | crlImportn inhibitPolicyMapping1P1subCACRL.crl |
michael@0 | 1479 | certImport inhibitPolicyMapping1P1subsubCACert |
michael@0 | 1480 | crlImportn inhibitPolicyMapping1P1subsubCACRL.crl |
michael@0 | 1481 | pkitsn $certs/InvalidSelfIssuedinhibitPolicyMappingTest8EE.crt \ |
michael@0 | 1482 | $certs/inhibitPolicyMapping1P1subsubCACert.crt \ |
michael@0 | 1483 | $certs/inhibitPolicyMapping1P1subCACert.crt \ |
michael@0 | 1484 | $certs/inhibitPolicyMapping1P1SelfIssuedCACert.crt \ |
michael@0 | 1485 | $certs/inhibitPolicyMapping1P1CACert.crt |
michael@0 | 1486 | restore_db |
michael@0 | 1487 | |
michael@0 | 1488 | VFY_ACTION="Invalid Self-Issued inhibitPolicyMapping Test9"; log_banner |
michael@0 | 1489 | certImportn inhibitPolicyMapping1P1CACert |
michael@0 | 1490 | crlImportn inhibitPolicyMapping1P1CACRL.crl |
michael@0 | 1491 | certImportn inhibitPolicyMapping1P1subCACert |
michael@0 | 1492 | crlImportn inhibitPolicyMapping1P1subCACRL.crl |
michael@0 | 1493 | certImportn inhibitPolicyMapping1P1subsubCACert |
michael@0 | 1494 | crlImportn inhibitPolicyMapping1P1subsubCACRL.crl |
michael@0 | 1495 | pkitsn $certs/InvalidSelfIssuedinhibitPolicyMappingTest9EE.crt \ |
michael@0 | 1496 | $certs/inhibitPolicyMapping1P1subsubCACert.crt \ |
michael@0 | 1497 | $certs/inhibitPolicyMapping1P1subCACert.crt \ |
michael@0 | 1498 | $certs/inhibitPolicyMapping1P1SelfIssuedCACert.crt \ |
michael@0 | 1499 | $certs/inhibitPolicyMapping1P1CACert.crt |
michael@0 | 1500 | restore_db |
michael@0 | 1501 | |
michael@0 | 1502 | VFY_ACTION="Invalid Self-Issued inhibitPolicyMapping Test10"; log_banner |
michael@0 | 1503 | certImportn inhibitPolicyMapping1P1CACert |
michael@0 | 1504 | crlImportn inhibitPolicyMapping1P1CACRL.crl |
michael@0 | 1505 | certImportn inhibitPolicyMapping1P1subCACert |
michael@0 | 1506 | crlImportn inhibitPolicyMapping1P1subCACRL.crl |
michael@0 | 1507 | pkitsn $certs/InvalidSelfIssuedinhibitPolicyMappingTest10EE.crt \ |
michael@0 | 1508 | $certs/inhibitPolicyMapping1P1SelfIssuedsubCACert.crt \ |
michael@0 | 1509 | $certs/inhibitPolicyMapping1P1subCACert.crt \ |
michael@0 | 1510 | $certs/inhibitPolicyMapping1P1SelfIssuedCACert.crt \ |
michael@0 | 1511 | $certs/inhibitPolicyMapping1P1CACert.crt |
michael@0 | 1512 | restore_db |
michael@0 | 1513 | |
michael@0 | 1514 | VFY_ACTION="Invalid Self-Issued inhibitPolicyMapping Test11"; log_banner |
michael@0 | 1515 | certImportn inhibitPolicyMapping1P1CACert |
michael@0 | 1516 | crlImportn inhibitPolicyMapping1P1CACRL.crl |
michael@0 | 1517 | certImportn inhibitPolicyMapping1P1subCACert |
michael@0 | 1518 | crlImportn inhibitPolicyMapping1P1subCACRL.crl |
michael@0 | 1519 | pkitsn $certs/InvalidSelfIssuedinhibitPolicyMappingTest11EE.crt \ |
michael@0 | 1520 | $certs/inhibitPolicyMapping1P1SelfIssuedsubCACert.crt \ |
michael@0 | 1521 | $certs/inhibitPolicyMapping1P1subCACert.crt \ |
michael@0 | 1522 | $certs/inhibitPolicyMapping1P1SelfIssuedCACert.crt \ |
michael@0 | 1523 | $certs/inhibitPolicyMapping1P1CACert.crt |
michael@0 | 1524 | restore_db |
michael@0 | 1525 | } |
michael@0 | 1526 | |
michael@0 | 1527 | |
michael@0 | 1528 | pkits_InhibitAnyPolicy() |
michael@0 | 1529 | { |
michael@0 | 1530 | break_table "NIST PKITS Section 4.12: Inhibit Any Policy" |
michael@0 | 1531 | |
michael@0 | 1532 | VFY_ACTION="Invalid inhibitAnyPolicy Test1"; log_banner |
michael@0 | 1533 | certImportn inhibitAnyPolicy0CACert |
michael@0 | 1534 | crlImportn inhibitAnyPolicy0CACRL.crl |
michael@0 | 1535 | pkitsn $certs/InvalidinhibitAnyPolicyTest1EE.crt \ |
michael@0 | 1536 | $certs/inhibitAnyPolicy0CACert.crt |
michael@0 | 1537 | restore_db |
michael@0 | 1538 | |
michael@0 | 1539 | VFY_ACTION="Valid inhibitAnyPolicy Test2"; log_banner |
michael@0 | 1540 | certImportn inhibitAnyPolicy0CACert |
michael@0 | 1541 | crlImportn inhibitAnyPolicy0CACRL.crl |
michael@0 | 1542 | pkits $certs/ValidinhibitAnyPolicyTest2EE.crt \ |
michael@0 | 1543 | $certs/inhibitAnyPolicy0CACert.crt |
michael@0 | 1544 | restore_db |
michael@0 | 1545 | |
michael@0 | 1546 | VFY_ACTION="inhibitAnyPolicy Test3"; log_banner |
michael@0 | 1547 | certImportn inhibitAnyPolicy1CACert |
michael@0 | 1548 | crlImportn inhibitAnyPolicy1CACRL.crl |
michael@0 | 1549 | certImport inhibitAnyPolicy1subCA1Cert |
michael@0 | 1550 | crlImport inhibitAnyPolicy1subCA1CRL.crl |
michael@0 | 1551 | pkits $certs/inhibitAnyPolicyTest3EE.crt \ |
michael@0 | 1552 | $certs/inhibitAnyPolicy1CACert.crt \ |
michael@0 | 1553 | $certs/inhibitAnyPolicy1subCA1Cert.crt |
michael@0 | 1554 | restore_db |
michael@0 | 1555 | |
michael@0 | 1556 | VFY_ACTION="Invalid inhibitAnyPolicy Test4"; log_banner |
michael@0 | 1557 | certImportn inhibitAnyPolicy1CACert |
michael@0 | 1558 | crlImportn inhibitAnyPolicy1CACRL.crl |
michael@0 | 1559 | certImport inhibitAnyPolicy1subCA1Cert |
michael@0 | 1560 | crlImport inhibitAnyPolicy1subCA1CRL.crl |
michael@0 | 1561 | pkitsn $certs/InvalidinhibitAnyPolicyTest4EE.crt \ |
michael@0 | 1562 | $certs/inhibitAnyPolicy1CACert.crt \ |
michael@0 | 1563 | $certs/inhibitAnyPolicy1subCA1Cert.crt |
michael@0 | 1564 | restore_db |
michael@0 | 1565 | |
michael@0 | 1566 | VFY_ACTION="Invalid inhibitAnyPolicy Test5"; log_banner |
michael@0 | 1567 | certImportn inhibitAnyPolicy5CACert |
michael@0 | 1568 | crlImportn inhibitAnyPolicy5CACRL.crl |
michael@0 | 1569 | certImportn inhibitAnyPolicy5subCACert |
michael@0 | 1570 | crlImportn inhibitAnyPolicy5subCACRL.crl |
michael@0 | 1571 | certImport inhibitAnyPolicy5subsubCACert |
michael@0 | 1572 | crlImport inhibitAnyPolicy5subsubCACRL.crl |
michael@0 | 1573 | pkitsn $certs/InvalidinhibitAnyPolicyTest5EE.crt \ |
michael@0 | 1574 | $certs/inhibitAnyPolicy5CACert.crt \ |
michael@0 | 1575 | $certs/inhibitAnyPolicy5subCACert.crt \ |
michael@0 | 1576 | $certs/inhibitAnyPolicy5subsubCACert.crt |
michael@0 | 1577 | restore_db |
michael@0 | 1578 | |
michael@0 | 1579 | VFY_ACTION="Invalid inhibitAnyPolicy Test6"; log_banner |
michael@0 | 1580 | certImportn inhibitAnyPolicy1CACert |
michael@0 | 1581 | crlImportn inhibitAnyPolicy1CACRL.crl |
michael@0 | 1582 | certImportn inhibitAnyPolicy1subCAIAP5Cert |
michael@0 | 1583 | crlImportn inhibitAnyPolicy1subCAIAP5CRL.crl |
michael@0 | 1584 | pkitsn $certs/InvalidinhibitAnyPolicyTest5EE.crt \ |
michael@0 | 1585 | $certs/inhibitAnyPolicy1CACert.crt \ |
michael@0 | 1586 | $certs/inhibitAnyPolicy5subCACert.crt \ |
michael@0 | 1587 | $certs/inhibitAnyPolicy5subsubCACert.crt |
michael@0 | 1588 | restore_db |
michael@0 | 1589 | |
michael@0 | 1590 | VFY_ACTION="Valid Self-Issued inhibitAnyPolicy Test7"; log_banner |
michael@0 | 1591 | certImportn inhibitAnyPolicy1CACert |
michael@0 | 1592 | crlImportn inhibitAnyPolicy1CACRL.crl |
michael@0 | 1593 | certImport inhibitAnyPolicy1subCA2Cert |
michael@0 | 1594 | crlImport inhibitAnyPolicy1subCA2CRL.crl |
michael@0 | 1595 | pkits $certs/ValidSelfIssuedinhibitAnyPolicyTest7EE.crt \ |
michael@0 | 1596 | $certs/inhibitAnyPolicy1CACert.crt \ |
michael@0 | 1597 | $certs/inhibitAnyPolicy1SelfIssuedCACert.crt \ |
michael@0 | 1598 | $certs/inhibitAnyPolicy1subCA2Cert.crt |
michael@0 | 1599 | restore_db |
michael@0 | 1600 | |
michael@0 | 1601 | VFY_ACTION="Invalid Self-Issued inhibitAnyPolicy Test8"; log_banner |
michael@0 | 1602 | certImportn inhibitAnyPolicy1CACert |
michael@0 | 1603 | crlImportn inhibitAnyPolicy1CACRL.crl |
michael@0 | 1604 | certImport inhibitAnyPolicy1subCA2Cert |
michael@0 | 1605 | crlImport inhibitAnyPolicy1subCA2CRL.crl |
michael@0 | 1606 | certImport inhibitAnyPolicy1subsubCA2Cert |
michael@0 | 1607 | crlImport inhibitAnyPolicy1subsubCA2CRL.crl |
michael@0 | 1608 | pkitsn $certs/InvalidSelfIssuedinhibitAnyPolicyTest8EE.crt \ |
michael@0 | 1609 | $certs/inhibitAnyPolicy1CACert.crt \ |
michael@0 | 1610 | $certs/inhibitAnyPolicy1SelfIssuedCACert.crt \ |
michael@0 | 1611 | $certs/inhibitAnyPolicy1subCA2Cert.crt \ |
michael@0 | 1612 | $certs/inhibitAnyPolicy1subsubCA2Cert.crt |
michael@0 | 1613 | restore_db |
michael@0 | 1614 | |
michael@0 | 1615 | VFY_ACTION="Valid Self-Issued inhibitAnyPolicy Test9"; log_banner |
michael@0 | 1616 | certImportn inhibitAnyPolicy1CACert |
michael@0 | 1617 | crlImportn inhibitAnyPolicy1CACRL.crl |
michael@0 | 1618 | certImport inhibitAnyPolicy1subCA2Cert |
michael@0 | 1619 | crlImport inhibitAnyPolicy1subCA2CRL.crl |
michael@0 | 1620 | pkits $certs/ValidSelfIssuedinhibitAnyPolicyTest9EE.crt \ |
michael@0 | 1621 | $certs/inhibitAnyPolicy1CACert.crt \ |
michael@0 | 1622 | $certs/inhibitAnyPolicy1SelfIssuedCACert.crt \ |
michael@0 | 1623 | $certs/inhibitAnyPolicy1subCA2Cert.crt \ |
michael@0 | 1624 | $certs/inhibitAnyPolicy1SelfIssuedsubCA2Cert.crt |
michael@0 | 1625 | restore_db |
michael@0 | 1626 | |
michael@0 | 1627 | VFY_ACTION="Invalid Self-Issued inhibitAnyPolicy Test10"; log_banner |
michael@0 | 1628 | certImportn inhibitAnyPolicy1CACert |
michael@0 | 1629 | crlImportn inhibitAnyPolicy1CACRL.crl |
michael@0 | 1630 | certImport inhibitAnyPolicy1subCA2Cert |
michael@0 | 1631 | crlImport inhibitAnyPolicy1subCA2CRL.crl |
michael@0 | 1632 | pkitsn $certs/InvalidSelfIssuedinhibitAnyPolicyTest10EE.crt \ |
michael@0 | 1633 | $certs/inhibitAnyPolicy1CACert.crt \ |
michael@0 | 1634 | $certs/inhibitAnyPolicy1SelfIssuedCACert.crt \ |
michael@0 | 1635 | $certs/inhibitAnyPolicy1subCA2Cert.crt |
michael@0 | 1636 | restore_db |
michael@0 | 1637 | } |
michael@0 | 1638 | |
michael@0 | 1639 | |
michael@0 | 1640 | pkits_NameConstraints() |
michael@0 | 1641 | { |
michael@0 | 1642 | break_table "NIST PKITS Section 4.13: Name Constraints" |
michael@0 | 1643 | |
michael@0 | 1644 | VFY_ACTION="Valid DN nameConstraints Test1"; log_banner |
michael@0 | 1645 | certImport nameConstraintsDN1CACert |
michael@0 | 1646 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1647 | pkits $certs/ValidDNnameConstraintsTest1EE.crt \ |
michael@0 | 1648 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1649 | restore_db |
michael@0 | 1650 | |
michael@0 | 1651 | VFY_ACTION="Invalid DN nameConstraints Test2"; log_banner |
michael@0 | 1652 | certImport nameConstraintsDN1CACert |
michael@0 | 1653 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1654 | pkitsn $certs/InvalidDNnameConstraintsTest2EE.crt \ |
michael@0 | 1655 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1656 | restore_db |
michael@0 | 1657 | |
michael@0 | 1658 | VFY_ACTION="Invalid DN nameConstraints Test3"; log_banner |
michael@0 | 1659 | certImport nameConstraintsDN1CACert |
michael@0 | 1660 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1661 | pkitsn $certs/InvalidDNnameConstraintsTest3EE.crt \ |
michael@0 | 1662 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1663 | restore_db |
michael@0 | 1664 | |
michael@0 | 1665 | VFY_ACTION="Valid DN nameConstraints Test4"; log_banner |
michael@0 | 1666 | certImport nameConstraintsDN1CACert |
michael@0 | 1667 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1668 | pkits $certs/ValidDNnameConstraintsTest4EE.crt \ |
michael@0 | 1669 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1670 | restore_db |
michael@0 | 1671 | |
michael@0 | 1672 | VFY_ACTION="Valid DN nameConstraints Test5"; log_banner |
michael@0 | 1673 | certImport nameConstraintsDN2CACert |
michael@0 | 1674 | crlImport nameConstraintsDN2CACRL.crl |
michael@0 | 1675 | pkits $certs/ValidDNnameConstraintsTest5EE.crt \ |
michael@0 | 1676 | $certs/nameConstraintsDN2CACert.crt |
michael@0 | 1677 | restore_db |
michael@0 | 1678 | |
michael@0 | 1679 | VFY_ACTION="Valid DN nameConstraints Test6"; log_banner |
michael@0 | 1680 | certImport nameConstraintsDN3CACert |
michael@0 | 1681 | crlImport nameConstraintsDN3CACRL.crl |
michael@0 | 1682 | pkits $certs/ValidDNnameConstraintsTest6EE.crt \ |
michael@0 | 1683 | $certs/nameConstraintsDN3CACert.crt |
michael@0 | 1684 | restore_db |
michael@0 | 1685 | |
michael@0 | 1686 | VFY_ACTION="Invalid DN nameConstraints Test7"; log_banner |
michael@0 | 1687 | certImport nameConstraintsDN3CACert |
michael@0 | 1688 | crlImport nameConstraintsDN3CACRL.crl |
michael@0 | 1689 | pkitsn $certs/InvalidDNnameConstraintsTest7EE.crt \ |
michael@0 | 1690 | $certs/nameConstraintsDN3CACert.crt |
michael@0 | 1691 | restore_db |
michael@0 | 1692 | |
michael@0 | 1693 | VFY_ACTION="Invalid DN nameConstraints Test8"; log_banner |
michael@0 | 1694 | certImport nameConstraintsDN4CACert |
michael@0 | 1695 | crlImport nameConstraintsDN4CACRL.crl |
michael@0 | 1696 | pkitsn $certs/InvalidDNnameConstraintsTest8EE.crt \ |
michael@0 | 1697 | $certs/nameConstraintsDN4CACert.crt |
michael@0 | 1698 | restore_db |
michael@0 | 1699 | |
michael@0 | 1700 | VFY_ACTION="Invalid DN nameConstraints Test9"; log_banner |
michael@0 | 1701 | certImport nameConstraintsDN4CACert |
michael@0 | 1702 | crlImport nameConstraintsDN4CACRL.crl |
michael@0 | 1703 | pkitsn $certs/InvalidDNnameConstraintsTest9EE.crt \ |
michael@0 | 1704 | $certs/nameConstraintsDN4CACert.crt |
michael@0 | 1705 | restore_db |
michael@0 | 1706 | |
michael@0 | 1707 | VFY_ACTION="Invalid DN nameConstraints Test10"; log_banner |
michael@0 | 1708 | certImport nameConstraintsDN5CACert |
michael@0 | 1709 | crlImport nameConstraintsDN5CACRL.crl |
michael@0 | 1710 | pkitsn $certs/InvalidDNnameConstraintsTest10EE.crt \ |
michael@0 | 1711 | $certs/nameConstraintsDN5CACert.crt |
michael@0 | 1712 | restore_db |
michael@0 | 1713 | |
michael@0 | 1714 | VFY_ACTION="Valid DN nameConstraints Test11"; log_banner |
michael@0 | 1715 | certImport nameConstraintsDN5CACert |
michael@0 | 1716 | crlImport nameConstraintsDN5CACRL.crl |
michael@0 | 1717 | pkits $certs/ValidDNnameConstraintsTest11EE.crt \ |
michael@0 | 1718 | $certs/nameConstraintsDN5CACert.crt |
michael@0 | 1719 | restore_db |
michael@0 | 1720 | |
michael@0 | 1721 | VFY_ACTION="Invalid DN nameConstraints Test12"; log_banner |
michael@0 | 1722 | certImport nameConstraintsDN1CACert |
michael@0 | 1723 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1724 | certImport nameConstraintsDN1subCA1Cert |
michael@0 | 1725 | crlImport nameConstraintsDN1subCA1CRL.crl |
michael@0 | 1726 | pkitsn $certs/InvalidDNnameConstraintsTest12EE.crt \ |
michael@0 | 1727 | $certs/nameConstraintsDN1subCA1Cert.crt \ |
michael@0 | 1728 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1729 | restore_db |
michael@0 | 1730 | |
michael@0 | 1731 | VFY_ACTION="Invalid DN nameConstraints Test13"; log_banner |
michael@0 | 1732 | certImport nameConstraintsDN1CACert |
michael@0 | 1733 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1734 | certImport nameConstraintsDN1subCA2Cert |
michael@0 | 1735 | crlImport nameConstraintsDN1subCA2CRL.crl |
michael@0 | 1736 | pkitsn $certs/InvalidDNnameConstraintsTest13EE.crt \ |
michael@0 | 1737 | $certs/nameConstraintsDN1subCA2Cert.crt \ |
michael@0 | 1738 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1739 | restore_db |
michael@0 | 1740 | |
michael@0 | 1741 | VFY_ACTION="Valid DN nameConstraints Test14"; log_banner |
michael@0 | 1742 | certImport nameConstraintsDN1CACert |
michael@0 | 1743 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1744 | certImport nameConstraintsDN1subCA2Cert |
michael@0 | 1745 | crlImport nameConstraintsDN1subCA2CRL.crl |
michael@0 | 1746 | pkits $certs/ValidDNnameConstraintsTest14EE.crt \ |
michael@0 | 1747 | $certs/nameConstraintsDN1subCA2Cert.crt \ |
michael@0 | 1748 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1749 | restore_db |
michael@0 | 1750 | |
michael@0 | 1751 | VFY_ACTION="Invalid DN nameConstraints Test15"; log_banner |
michael@0 | 1752 | certImport nameConstraintsDN3CACert |
michael@0 | 1753 | crlImport nameConstraintsDN3CACRL.crl |
michael@0 | 1754 | certImport nameConstraintsDN3subCA1Cert |
michael@0 | 1755 | crlImport nameConstraintsDN3subCA1CRL.crl |
michael@0 | 1756 | pkitsn $certs/InvalidDNnameConstraintsTest15EE.crt \ |
michael@0 | 1757 | $certs/nameConstraintsDN3subCA1Cert.crt \ |
michael@0 | 1758 | $certs/nameConstraintsDN3CACert.crt |
michael@0 | 1759 | restore_db |
michael@0 | 1760 | |
michael@0 | 1761 | VFY_ACTION="Invalid DN nameConstraints Test16"; log_banner |
michael@0 | 1762 | certImport nameConstraintsDN3CACert |
michael@0 | 1763 | crlImport nameConstraintsDN3CACRL.crl |
michael@0 | 1764 | certImport nameConstraintsDN3subCA1Cert |
michael@0 | 1765 | crlImport nameConstraintsDN3subCA1CRL.crl |
michael@0 | 1766 | pkitsn $certs/InvalidDNnameConstraintsTest16EE.crt \ |
michael@0 | 1767 | $certs/nameConstraintsDN3subCA1Cert.crt \ |
michael@0 | 1768 | $certs/nameConstraintsDN3CACert.crt |
michael@0 | 1769 | restore_db |
michael@0 | 1770 | |
michael@0 | 1771 | VFY_ACTION="Invalid DN nameConstraints Test17"; log_banner |
michael@0 | 1772 | certImport nameConstraintsDN3CACert |
michael@0 | 1773 | crlImport nameConstraintsDN3CACRL.crl |
michael@0 | 1774 | certImport nameConstraintsDN3subCA2Cert |
michael@0 | 1775 | crlImport nameConstraintsDN3subCA2CRL.crl |
michael@0 | 1776 | pkitsn $certs/InvalidDNnameConstraintsTest17EE.crt \ |
michael@0 | 1777 | $certs/nameConstraintsDN3subCA2Cert.crt \ |
michael@0 | 1778 | $certs/nameConstraintsDN3CACert.crt |
michael@0 | 1779 | restore_db |
michael@0 | 1780 | |
michael@0 | 1781 | VFY_ACTION="Valid DN nameConstraints Test18"; log_banner |
michael@0 | 1782 | certImport nameConstraintsDN3CACert |
michael@0 | 1783 | crlImport nameConstraintsDN3CACRL.crl |
michael@0 | 1784 | certImport nameConstraintsDN3subCA2Cert |
michael@0 | 1785 | crlImport nameConstraintsDN3subCA2CRL.crl |
michael@0 | 1786 | pkits $certs/ValidDNnameConstraintsTest18EE.crt \ |
michael@0 | 1787 | $certs/nameConstraintsDN3subCA2Cert.crt \ |
michael@0 | 1788 | $certs/nameConstraintsDN3CACert.crt |
michael@0 | 1789 | restore_db |
michael@0 | 1790 | |
michael@0 | 1791 | ### bug 232737 ### |
michael@0 | 1792 | if [ -n "${KNOWN_BUG}" ]; then |
michael@0 | 1793 | VFY_ACTION="Valid Self-Issued DN nameConstraints Test19"; log_banner |
michael@0 | 1794 | certImport nameConstraintsDN1CACert |
michael@0 | 1795 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1796 | pkits $certs/ValidDNnameConstraintsTest19EE.crt \ |
michael@0 | 1797 | $certs/nameConstraintsDN1SelfIssuedCACert.crt \ |
michael@0 | 1798 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1799 | restore_db |
michael@0 | 1800 | fi |
michael@0 | 1801 | |
michael@0 | 1802 | VFY_ACTION="Invalid Self-Issued DN nameConstraints Test20"; log_banner |
michael@0 | 1803 | certImport nameConstraintsDN1CACert |
michael@0 | 1804 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1805 | pkitsn $certs/InvalidDNnameConstraintsTest20EE.crt \ |
michael@0 | 1806 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1807 | restore_db |
michael@0 | 1808 | |
michael@0 | 1809 | VFY_ACTION="Valid RFC822 nameConstraints Test21"; log_banner |
michael@0 | 1810 | certImport nameConstraintsRFC822CA1Cert |
michael@0 | 1811 | crlImport nameConstraintsRFC822CA1CRL.crl |
michael@0 | 1812 | pkits $certs/ValidRFC822nameConstraintsTest21EE.crt \ |
michael@0 | 1813 | $certs/nameConstraintsRFC822CA1Cert.crt |
michael@0 | 1814 | restore_db |
michael@0 | 1815 | |
michael@0 | 1816 | VFY_ACTION="Invalid RFC822 nameConstraints Test22"; log_banner |
michael@0 | 1817 | certImport nameConstraintsRFC822CA1Cert |
michael@0 | 1818 | crlImport nameConstraintsRFC822CA1CRL.crl |
michael@0 | 1819 | pkitsn $certs/InvalidRFC822nameConstraintsTest22EE.crt \ |
michael@0 | 1820 | $certs/nameConstraintsRFC822CA1Cert.crt |
michael@0 | 1821 | restore_db |
michael@0 | 1822 | |
michael@0 | 1823 | VFY_ACTION="Valid RFC822 nameConstraints Test23"; log_banner |
michael@0 | 1824 | certImport nameConstraintsRFC822CA2Cert |
michael@0 | 1825 | crlImport nameConstraintsRFC822CA2CRL.crl |
michael@0 | 1826 | pkits $certs/ValidRFC822nameConstraintsTest23EE.crt \ |
michael@0 | 1827 | $certs/nameConstraintsRFC822CA2Cert.crt |
michael@0 | 1828 | restore_db |
michael@0 | 1829 | |
michael@0 | 1830 | VFY_ACTION="Invalid RFC822 nameConstraints Test24"; log_banner |
michael@0 | 1831 | certImport nameConstraintsRFC822CA2Cert |
michael@0 | 1832 | crlImport nameConstraintsRFC822CA2CRL.crl |
michael@0 | 1833 | pkitsn $certs/InvalidRFC822nameConstraintsTest24EE.crt \ |
michael@0 | 1834 | $certs/nameConstraintsRFC822CA2Cert.crt |
michael@0 | 1835 | restore_db |
michael@0 | 1836 | |
michael@0 | 1837 | VFY_ACTION="Valid RFC822 nameConstraints Test25"; log_banner |
michael@0 | 1838 | certImport nameConstraintsRFC822CA3Cert |
michael@0 | 1839 | crlImport nameConstraintsRFC822CA3CRL.crl |
michael@0 | 1840 | pkits $certs/ValidRFC822nameConstraintsTest25EE.crt \ |
michael@0 | 1841 | $certs/nameConstraintsRFC822CA3Cert.crt |
michael@0 | 1842 | restore_db |
michael@0 | 1843 | |
michael@0 | 1844 | VFY_ACTION="Invalid RFC822 nameConstraints Test26"; log_banner |
michael@0 | 1845 | certImport nameConstraintsRFC822CA3Cert |
michael@0 | 1846 | crlImport nameConstraintsRFC822CA3CRL.crl |
michael@0 | 1847 | pkitsn $certs/InvalidRFC822nameConstraintsTest26EE.crt \ |
michael@0 | 1848 | $certs/nameConstraintsRFC822CA3Cert.crt |
michael@0 | 1849 | restore_db |
michael@0 | 1850 | |
michael@0 | 1851 | VFY_ACTION="Valid DN and RFC822 nameConstraints Test27"; log_banner |
michael@0 | 1852 | certImport nameConstraintsDN1CACert |
michael@0 | 1853 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1854 | certImport nameConstraintsDN1subCA3Cert |
michael@0 | 1855 | crlImport nameConstraintsDN1subCA3CRL.crl |
michael@0 | 1856 | pkits $certs/ValidDNandRFC822nameConstraintsTest27EE.crt \ |
michael@0 | 1857 | $certs/nameConstraintsDN1subCA3Cert.crt \ |
michael@0 | 1858 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1859 | restore_db |
michael@0 | 1860 | |
michael@0 | 1861 | VFY_ACTION="Invalid DN and RFC822 nameConstraints Test28"; log_banner |
michael@0 | 1862 | certImport nameConstraintsDN1CACert |
michael@0 | 1863 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1864 | certImport nameConstraintsDN1subCA3Cert |
michael@0 | 1865 | crlImport nameConstraintsDN1subCA3CRL.crl |
michael@0 | 1866 | pkitsn $certs/InvalidDNandRFC822nameConstraintsTest28EE.crt \ |
michael@0 | 1867 | $certs/nameConstraintsDN1subCA3Cert.crt \ |
michael@0 | 1868 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1869 | restore_db |
michael@0 | 1870 | |
michael@0 | 1871 | VFY_ACTION="Invalid DN and RFC822 nameConstraints Test29"; log_banner |
michael@0 | 1872 | certImport nameConstraintsDN1CACert |
michael@0 | 1873 | crlImport nameConstraintsDN1CACRL.crl |
michael@0 | 1874 | certImport nameConstraintsDN1subCA3Cert |
michael@0 | 1875 | crlImport nameConstraintsDN1subCA3CRL.crl |
michael@0 | 1876 | pkitsn $certs/InvalidDNandRFC822nameConstraintsTest29EE.crt \ |
michael@0 | 1877 | $certs/nameConstraintsDN1subCA3Cert.crt \ |
michael@0 | 1878 | $certs/nameConstraintsDN1CACert.crt |
michael@0 | 1879 | restore_db |
michael@0 | 1880 | |
michael@0 | 1881 | VFY_ACTION="Valid DNS nameConstraints Test30"; log_banner |
michael@0 | 1882 | certImport nameConstraintsDNS1CACert |
michael@0 | 1883 | crlImport nameConstraintsDNS1CACRL.crl |
michael@0 | 1884 | pkits $certs/ValidDNSnameConstraintsTest30EE.crt \ |
michael@0 | 1885 | $certs/nameConstraintsDNS1CACert.crt |
michael@0 | 1886 | restore_db |
michael@0 | 1887 | |
michael@0 | 1888 | VFY_ACTION="Invalid DNS nameConstraints Test31"; log_banner |
michael@0 | 1889 | certImport nameConstraintsDNS1CACert |
michael@0 | 1890 | crlImport nameConstraintsDNS1CACRL.crl |
michael@0 | 1891 | pkitsn $certs/InvalidDNSnameConstraintsTest31EE.crt \ |
michael@0 | 1892 | $certs/nameConstraintsDNS1CACert.crt |
michael@0 | 1893 | restore_db |
michael@0 | 1894 | |
michael@0 | 1895 | VFY_ACTION="Valid DNS nameConstraints Test32"; log_banner |
michael@0 | 1896 | certImport nameConstraintsDNS2CACert |
michael@0 | 1897 | crlImport nameConstraintsDNS2CACRL.crl |
michael@0 | 1898 | pkits $certs/ValidDNSnameConstraintsTest32EE.crt \ |
michael@0 | 1899 | $certs/nameConstraintsDNS2CACert.crt |
michael@0 | 1900 | restore_db |
michael@0 | 1901 | |
michael@0 | 1902 | VFY_ACTION="Invalid DNS nameConstraints Test33"; log_banner |
michael@0 | 1903 | certImport nameConstraintsDNS2CACert |
michael@0 | 1904 | crlImport nameConstraintsDNS2CACRL.crl |
michael@0 | 1905 | pkitsn $certs/InvalidDNSnameConstraintsTest33EE.crt \ |
michael@0 | 1906 | $certs/nameConstraintsDNS2CACert.crt |
michael@0 | 1907 | restore_db |
michael@0 | 1908 | |
michael@0 | 1909 | VFY_ACTION="Valid URI nameConstraints Test34"; log_banner |
michael@0 | 1910 | certImport nameConstraintsURI1CACert |
michael@0 | 1911 | crlImport nameConstraintsURI1CACRL.crl |
michael@0 | 1912 | pkits $certs/ValidURInameConstraintsTest34EE.crt \ |
michael@0 | 1913 | $certs/nameConstraintsURI1CACert.crt |
michael@0 | 1914 | restore_db |
michael@0 | 1915 | |
michael@0 | 1916 | VFY_ACTION="Invalid URI nameConstraints Test35"; log_banner |
michael@0 | 1917 | certImport nameConstraintsURI1CACert |
michael@0 | 1918 | crlImport nameConstraintsURI1CACRL.crl |
michael@0 | 1919 | pkitsn $certs/InvalidURInameConstraintsTest35EE.crt \ |
michael@0 | 1920 | $certs/nameConstraintsURI1CACert.crt |
michael@0 | 1921 | restore_db |
michael@0 | 1922 | |
michael@0 | 1923 | VFY_ACTION="Valid URI nameConstraints Test36"; log_banner |
michael@0 | 1924 | certImport nameConstraintsURI2CACert |
michael@0 | 1925 | crlImport nameConstraintsURI2CACRL.crl |
michael@0 | 1926 | pkits $certs/ValidURInameConstraintsTest36EE.crt \ |
michael@0 | 1927 | $certs/nameConstraintsURI2CACert.crt |
michael@0 | 1928 | restore_db |
michael@0 | 1929 | |
michael@0 | 1930 | VFY_ACTION="Invalid URI nameConstraints Test37"; log_banner |
michael@0 | 1931 | certImport nameConstraintsURI2CACert |
michael@0 | 1932 | crlImport nameConstraintsURI2CACRL.crl |
michael@0 | 1933 | pkitsn $certs/InvalidURInameConstraintsTest37EE.crt \ |
michael@0 | 1934 | $certs/nameConstraintsURI2CACert.crt |
michael@0 | 1935 | restore_db |
michael@0 | 1936 | |
michael@0 | 1937 | VFY_ACTION="Invalid DNS nameConstraints Test38"; log_banner |
michael@0 | 1938 | certImport nameConstraintsDNS1CACert |
michael@0 | 1939 | crlImport nameConstraintsDNS1CACRL.crl |
michael@0 | 1940 | pkitsn $certs/InvalidDNSnameConstraintsTest38EE.crt \ |
michael@0 | 1941 | $certs/nameConstraintsDNS1CACert.crt |
michael@0 | 1942 | restore_db |
michael@0 | 1943 | } |
michael@0 | 1944 | |
michael@0 | 1945 | pkits_PvtCertExtensions() |
michael@0 | 1946 | { |
michael@0 | 1947 | break_table "NIST PKITS Section 4.16: Private Certificate Extensions" |
michael@0 | 1948 | |
michael@0 | 1949 | VFY_ACTION="Valid Unknown Not Critical Certificate Extension Test1"; log_banner |
michael@0 | 1950 | pkits $certs/ValidUnknownNotCriticalCertificateExtensionTest1EE.crt |
michael@0 | 1951 | |
michael@0 | 1952 | VFY_ACTION="Invalid Unknown Critical Certificate Extension Test2"; log_banner |
michael@0 | 1953 | pkitsn $certs/InvalidUnknownCriticalCertificateExtensionTest2EE.crt |
michael@0 | 1954 | } |
michael@0 | 1955 | |
michael@0 | 1956 | ############################## pkits_cleanup ########################### |
michael@0 | 1957 | # local shell function to finish this script (no exit since it might be |
michael@0 | 1958 | # sourced) |
michael@0 | 1959 | ######################################################################## |
michael@0 | 1960 | pkits_cleanup() |
michael@0 | 1961 | { |
michael@0 | 1962 | html "</TABLE><BR>" |
michael@0 | 1963 | cd ${QADIR} |
michael@0 | 1964 | . common/cleanup.sh |
michael@0 | 1965 | } |
michael@0 | 1966 | |
michael@0 | 1967 | |
michael@0 | 1968 | ################################## main ################################ |
michael@0 | 1969 | pkits_init |
michael@0 | 1970 | pkits_SignatureVerification | tee -a $PKITS_LOG |
michael@0 | 1971 | pkits_ValidityPeriods | tee -a $PKITS_LOG |
michael@0 | 1972 | pkits_NameChaining | tee -a $PKITS_LOG |
michael@0 | 1973 | pkits_BasicCertRevocation | tee -a $PKITS_LOG |
michael@0 | 1974 | pkits_PathVerificWithSelfIssuedCerts | tee -a $PKITS_LOG |
michael@0 | 1975 | pkits_BasicConstraints | tee -a $PKITS_LOG |
michael@0 | 1976 | pkits_KeyUsage | tee -a $PKITS_LOG |
michael@0 | 1977 | if [ -n "$NSS_PKITS_POLICIES" ]; then |
michael@0 | 1978 | pkits_CertificatePolicies | tee -a $PKITS_LOG |
michael@0 | 1979 | pkits_RequireExplicitPolicy | tee -a $PKITS_LOG |
michael@0 | 1980 | pkits_PolicyMappings | tee -a $PKITS_LOG |
michael@0 | 1981 | pkits_InhibitPolicyMapping | tee -a $PKITS_LOG |
michael@0 | 1982 | pkits_InhibitAnyPolicy | tee -a $PKITS_LOG |
michael@0 | 1983 | fi |
michael@0 | 1984 | pkits_NameConstraints | tee -a $PKITS_LOG |
michael@0 | 1985 | pkits_PvtCertExtensions | tee -a $PKITS_LOG |
michael@0 | 1986 | pkits_cleanup |
michael@0 | 1987 |