1 # $NetBSD: t_libcrypto.in,v 1.1 2009/02/13 20:58:14 jmmv Exp $
3 # Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
15 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 # POSSIBILITY OF SUCH DAMAGE.
30 atf_check -o ignore -e ignore "$(atf_get_srcdir)/$1"
34 tc:bf:h_bftest:Checks blowfish cipher
35 tc:cast:h_casttest:Checks CAST cipher
36 tc:des:h_destest:Checks DES cipher (libdes)
37 tc:rc2:h_rc2test:Checks RC2 cipher
38 tc:rc4:h_rc4test:Checks RC4 cipher
43 atf_set "descr" "Checks IDEA cipher"
47 [ -x "$(atf_get_srcdir)/h_ideatest" ] \
48 || atf_skip "IDEA support not available; system built" \
49 "with MKCRYPTO_IDEA=no"
56 atf_set "descr" "Checks RC5 cipher"
60 [ -x "$(atf_get_srcdir)/h_rc5test" ] \
61 || atf_skip "RC5 support not available; system built" \
62 "with MKCRYPTO_RC5=no"
66 # Public key cryptography
67 tc:dsa:h_dsatest:Checks DSA cipher
68 tc:dh:h_dhtest:Checks Diffie-Hellman key agreement protocol
69 tc:rsa:h_rsatest:Checks RSA
70 tc:ec:h_ectest:Checks EC cipher
71 tc:ecdh:h_ecdhtest:Checks ECDH key agreement protocol
72 tc:ecdsa:h_ecdsatest:Checks ECDSA algorithm
75 tc:x509v3:h_x509v3test:Checks x509v3 certificates
77 # Authentication codes, hash functions
78 tc:hmac:h_hmactest:Checks HMAC message authentication code
79 tc:md2:h_md2test:Checks MD2 digest
80 tc:md4:h_md4test:Checks MD4 digest
81 tc:md5:h_md5test:Checks MD5 digest
82 tc:ripemd:h_ripemdtest:Checks RMD-160 digest
83 tc:sha:h_shatest:Checks SHA-1 digest
88 atf_set "descr" "Checks MDC2 digest"
92 [ -x "$(atf_get_srcdir)/h_mdc2test" ] \
93 || atf_skip "MDC2 support not available; system built" \
94 "with MKCRYPTO_MDC2=no"
99 tc:engine:h_enginetest:Checks ENGINE framework
100 tc:rand:h_randtest:Checks pseudo-random number generator
105 atf_set "descr" "Checks BIGNUM library"
117 atf_set "descr" "Checks configuration modules"
121 cp $(atf_get_srcdir)/d_conf_ssleay.cnf ssleay.cnf
123 atf_check -o file:$(atf_get_srcdir)/d_conf.out \
124 $(atf_get_srcdir)/h_conftest
130 atf_set "descr" "Checks lhash - dynamic hash tables"
134 atf_check -o ignore -e ignore -x \
135 "echo hoge | $(atf_get_srcdir)/h_lhashtest"
138 atf_test_case threads
141 atf_set "descr" "Checks threading"
145 $(atf_get_srcdir)/h_threadstest \
146 -cert $(atf_get_srcdir)/d_server.pem \
147 -ccert $(atf_get_srcdir)/d_client.pem \
149 atf_check -s eq:1 -o empty -e empty grep :error: out
152 atf_init_test_cases()