# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

scenario MegaBridge_3_2

entity Root1
  type Root

entity Root2
  type Root

entity Root3
  type Root

entity Root4
  type Root

entity Root5
  type Root

entity Root6
  type Root

entity Root7
  type Root

entity Root8
  type Root

entity Root9
  type Root

entity Bridge11
  type Bridge
  issuer Root1
  issuer Root2
  issuer Root3

entity Bridge12
  type Bridge
  issuer Root4
  issuer Root5
  issuer Root6

entity Bridge13
  type Bridge
  issuer Root7
  issuer Root8
  issuer Root9

entity Bridge21
  type Bridge
  issuer Bridge11
  issuer Bridge12
  issuer Bridge13

entity CA1
  type Intermediate
  issuer Bridge21

entity EE1
  type EE
  issuer CA1

testdb EE1

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge11
  cert Bridge11:Root1
  trust Root1:
  result pass

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge11
  cert Bridge11:Root2
  trust Root2:
  result pass

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge11
  cert Bridge11:Root3
  trust Root3:
  result pass

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge12
  cert Bridge12:Root4
  trust Root4:
  result pass

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge12
  cert Bridge12:Root5
  trust Root5:
  result pass

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge12
  cert Bridge12:Root6
  trust Root6:
  result pass

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge13
  cert Bridge13:Root7
  trust Root7:
  result pass

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge13
  cert Bridge13:Root8
  trust Root8:
  result pass

verify EE1:CA1
  cert CA1:Bridge21
  cert Bridge21:Bridge13
  cert Bridge13:Root9
  trust Root9:
  result pass

