VirtualBox

source: vbox/trunk/src/libs/openssl-3.3.2/test/recipes/80-test_policy_tree.t@ 108931

Last change on this file since 108931 was 108206, checked in by vboxsync, 3 months ago

openssl-3.3.2: Exported all files to OSE and removed .scm-settings ​bugref:10757

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1#! /usr/bin/env perl
2# Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9
10use strict;
11use warnings;
12
13use POSIX;
14use OpenSSL::Test qw/:DEFAULT srctop_file with data_file/;
15
16use OpenSSL::Test::Utils;
17use OpenSSL::Glob;
18
19setup("test_policy_tree");
20
21plan skip_all => "No EC support" if disabled("ec");
22
23plan tests => 2;
24
25# The small pathological tree is expected to work
26my $small_chain = srctop_file("test", "recipes", "80-test_policy_tree_data",
27 "small_policy_tree.pem");
28my $small_leaf = srctop_file("test", "recipes", "80-test_policy_tree_data",
29 "small_leaf.pem");
30
31ok(run(app(["openssl", "verify", "-CAfile", $small_chain,
32 "-policy_check", $small_leaf])),
33 "test small policy tree");
34
35# The large pathological tree is expected to fail
36my $large_chain = srctop_file("test", "recipes", "80-test_policy_tree_data",
37 "large_policy_tree.pem");
38my $large_leaf = srctop_file("test", "recipes", "80-test_policy_tree_data",
39 "large_leaf.pem");
40
41ok(!run(app(["openssl", "verify", "-CAfile", $large_chain,
42 "-policy_check", $large_leaf])),
43 "test large policy tree");
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette