1121986Sjhb#! /usr/bin/env perl
2121986Sjhb# Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved.
3121986Sjhb#
4121986Sjhb# Licensed under the Apache License 2.0 (the "License").  You may not use
5121986Sjhb# this file except in compliance with the License.  You can obtain a copy
6121986Sjhb# in the file LICENSE in the source distribution or at
7121986Sjhb# https://www.openssl.org/source/license.html
8121986Sjhb
9121986Sjhb
10121986Sjhbuse strict;
11121986Sjhbuse warnings;
12121986Sjhbuse OpenSSL::Test qw/:DEFAULT srctop_file/;
13121986Sjhbuse OpenSSL::Test::Utils;
14121986Sjhb
15121986Sjhbsetup("test_dane");
16121986Sjhb
17121986Sjhbplan skip_all => "test_dane uses ec which is not supported by this OpenSSL build"
18121986Sjhb    if disabled("ec");
19121986Sjhb
20121986Sjhbplan tests => 2;                # The number of tests being performed
21121986Sjhb
22121986Sjhbok(run(test(["danetest", "example.com",
23121986Sjhb             srctop_file("test", "danetest.pem"),
24121986Sjhb             srctop_file("test", "danetest.in")])), "dane tests");
25121986Sjhb
26121986Sjhbok(run(test(["danetest", "server.example",
27121986Sjhb             srctop_file("test", "certs", "cross-root.pem"),
28121986Sjhb             srctop_file("test", "dane-cross.in")])), "dane cross CA test");
29121986Sjhb