Importing NetBSD "Kyua" test framework
To do so, a few dependencies have been imported: * external/bsd/lutok * external/mit/lua * external/public-domain/sqlite * external/public-domain/xz The Kyua framework is the new generation of ATF (Automated Test Framework), it is composed of: * external/bsd/atf * external/bsd/kyua-atf-compat * external/bsd/kyua-cli * external/bsd/kyua-tester * tests Kyua/ATF being written in C++, it depends on libstdc++ which is provided by GCC. As this is not part of the sources, Kyua is only compiled when the native GCC utils are installed. To install Kyua do the following: * In a cross-build enviromnent, add the following to the build.sh commandline: -V MKBINUTILS=yes -V MKGCCCMDS=yes WARNING: At this point the import is still experimental, and not supported on native builds (a.k.a make build). Change-Id: I26aee23c5bbd2d64adcb7c1beb98fe0d479d7ada
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# $NetBSD: Makefile,v 1.9 2012/07/14 04:06:17 christos Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
.if ${MKCRYPTO} != "no"
|
||||
|
||||
SUBDIR+=bf bn cast conf des dh dsa ec ecdh ecdsa engine evp hmac lhash \
|
||||
md2 md4 md5 rand rc2 rc4 ripemd rsa sha sha1 srp threads x509v3
|
||||
|
||||
SUBDIR+=idea mdc2
|
||||
|
||||
.if ${MKCRYPTO_RC5} != "no"
|
||||
SUBDIR+=rc5
|
||||
.endif
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/crypto/libcrypto
|
||||
|
||||
TESTS_SH= t_certs
|
||||
TESTS_SH+= t_ciphers
|
||||
TESTS_SH+= t_hashes
|
||||
TESTS_SH+= t_libcrypto
|
||||
TESTS_SH+= t_pubkey
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
||||
.else
|
||||
|
||||
NOPROG=
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
.endif
|
||||
@@ -0,0 +1,29 @@
|
||||
# $NetBSD: Makefile.inc,v 1.6 2011/06/11 18:03:17 christos Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include "../Makefile.inc"
|
||||
TESTSDIR= ${TESTSBASE}/crypto/libcrypto
|
||||
ATFFILE= no
|
||||
|
||||
.if defined(HELPER_NAME)
|
||||
HELPER_SRCS?= ${HELPER_NAME}.c
|
||||
|
||||
PROG= h_${HELPER_NAME}
|
||||
SRCS= ${HELPER_SRCS}
|
||||
MAN= # empty
|
||||
BINDIR= ${TESTSDIR}
|
||||
|
||||
DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
|
||||
LDADD+= -lcrypto -lcrypt
|
||||
|
||||
CWARNFLAGS.clang+= -Wno-format
|
||||
|
||||
CPPFLAGS+= -DOPENSSL_FIPS
|
||||
CPPFLAGS+= -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto
|
||||
CRYPTODIST= ${NETBSDSRCDIR}/crypto
|
||||
.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
|
||||
.PATH: ${OPENSSLSRC}/crypto/${HELPER_DIR}
|
||||
|
||||
.include <bsd.test.mk>
|
||||
.include <bsd.prog.mk>
|
||||
.endif
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
HELPER_NAME= bftest
|
||||
HELPER_DIR= bf
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
SUBDIR=bn div exp
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
@@ -0,0 +1,3 @@
|
||||
# $NetBSD: Makefile.inc,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
.include "../Makefile.inc"
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
HELPER_NAME= bntest
|
||||
HELPER_DIR= bn
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.2 2010/12/18 04:27:17 joerg Exp $
|
||||
|
||||
HELPER_NAME= divtest
|
||||
HELPER_DIR= bn
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
HELPER_NAME= exptest
|
||||
HELPER_DIR= bn
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
HELPER_NAME= casttest
|
||||
HELPER_DIR= cast
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,11 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
HELPER_NAME= conftest
|
||||
HELPER_DIR= conf
|
||||
HELPER_SRCS= test.c
|
||||
|
||||
FILESDIR= ${TESTSDIR}
|
||||
FILES= d_conf_ssleay.cnf
|
||||
FILES+= d_conf.out
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,94 @@
|
||||
num_items = 47
|
||||
num_nodes = 24
|
||||
num_alloc_nodes = 32
|
||||
num_expands = 16
|
||||
num_expand_reallocs = 1
|
||||
num_contracts = 0
|
||||
num_contract_reallocs = 0
|
||||
num_hash_calls = 60
|
||||
num_comp_calls = 5
|
||||
num_insert = 47
|
||||
num_replace = 0
|
||||
num_delete = 0
|
||||
num_no_delete = 0
|
||||
num_retrieve = 5
|
||||
num_retrieve_miss = 8
|
||||
num_hash_comps = 132
|
||||
node 0 -> 4
|
||||
node 1 -> 1
|
||||
node 2 -> 1
|
||||
node 3 -> 4
|
||||
node 4 -> 0
|
||||
node 5 -> 2
|
||||
node 6 -> 1
|
||||
node 7 -> 1
|
||||
node 8 -> 6
|
||||
node 9 -> 2
|
||||
node 10 -> 1
|
||||
node 11 -> 1
|
||||
node 12 -> 3
|
||||
node 13 -> 1
|
||||
node 14 -> 4
|
||||
node 15 -> 3
|
||||
node 16 -> 5
|
||||
node 17 -> 0
|
||||
node 18 -> 2
|
||||
node 19 -> 0
|
||||
node 20 -> 2
|
||||
node 21 -> 2
|
||||
node 22 -> 0
|
||||
node 23 -> 1
|
||||
20 nodes used out of 24
|
||||
47 items
|
||||
load 1.95 actual load 2.35
|
||||
init2=10
|
||||
cipher1=NULL
|
||||
s_client:cipher1=DES_CBC_MD5:DES_CBC_SHA:DES_EDE_SHA:RC4_MD5cipher2 = DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
|
||||
---------------------------- DUMP ------------------------
|
||||
[req] Attribute_text_7=Email Address
|
||||
[req] Attribute_text_2=State or Province Name (full name)
|
||||
[default] tmp_cert_dir=/tmp/eay/.ca_certs
|
||||
[req] Attribute_text_1=Country Name (2 letter code)
|
||||
[[genrsa]]
|
||||
[req] Attribute_default_5=TR
|
||||
[req] Attribute_text_6=Common Name (eg, YOUR name)
|
||||
[req] Attribute_default_1=AU
|
||||
[[req]]
|
||||
[[special]]
|
||||
[[gendh]]
|
||||
[req] Attribute_text_3=Locality Name (eg, city)
|
||||
[req] Attribute_type_1=countryName
|
||||
[default] init5==10' again
|
||||
[req] Attribute_type_3=localityName
|
||||
[s_client] cipher3=DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
|
||||
[default] in\#it1=10
|
||||
[req] Attribute_text_4=Organization Name (eg, company)
|
||||
[req] Attribute_type_7=emailAddress
|
||||
[gendh] def_generator=2
|
||||
[default] HOME=/tmp/eay
|
||||
[s_client] cipher4=DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
|
||||
[default] init=5
|
||||
[SSLeay] version=0.5.0
|
||||
[req] Attribute_type_4=organizationName
|
||||
[default] tmp2_cert_dir=thisis/tmp/eaystuff
|
||||
[req] Attribute_type_5=organizationalUnitName
|
||||
[[SSLEAY]]
|
||||
[default] init4=10'
|
||||
[[default]]
|
||||
[default] LOGNAME=Eric Young (home=/tmp/eay)
|
||||
[special] RANDFILE=/tmp/eay/.rand
|
||||
[req] default_keyfile=privkey.pem
|
||||
[req] Attribute_default_4=Mincom Pty Ltd
|
||||
[req] Attribute_default_2=Queensland
|
||||
[gendh] default_bits=512
|
||||
[req] default_bits=512
|
||||
[default] init2=10
|
||||
[SSLEAY] version=0.5.0
|
||||
[s_client] cipher1=DES_CBC_MD5:DES_CBC_SHA:DES_EDE_SHA:RC4_MD5cipher2 = DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
|
||||
[req] Attribute_text_5=Organizational Unit Name (eg, section)
|
||||
[req] Attribute_type_2=stateOrProvinceName
|
||||
[genrsa] default_bits=512
|
||||
[default] init3=10'
|
||||
[[SSLeay]]
|
||||
[[s_client]]
|
||||
[req] Attribute_type_6=commonName
|
||||
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# This is a test configuration file for use in SSLeay etc...
|
||||
#
|
||||
|
||||
init = 5
|
||||
in\#it1 =10
|
||||
init2='10'
|
||||
init3='10\''
|
||||
init4="10'"
|
||||
init5='='10\'' again'
|
||||
|
||||
SSLeay::version = 0.5.0
|
||||
|
||||
[genrsa]
|
||||
default_bits = 512
|
||||
SSLEAY::version = 0.5.0
|
||||
|
||||
[gendh]
|
||||
default_bits = 512
|
||||
def_generator = 2
|
||||
|
||||
[s_client]
|
||||
cipher1 = DES_CBC_MD5:DES_CBC_SHA:DES_EDE_SHA:RC4_MD5\
|
||||
cipher2 = 'DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5'
|
||||
cipher3 = "DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5"
|
||||
cipher4 = DES_CBC_MD5 DES_CBC_SHA DES_EDE_SHA RC4_MD5
|
||||
|
||||
[ default ]
|
||||
#cert_dir = $ENV::HOME/.ca_certs
|
||||
|
||||
HOME = /tmp/eay
|
||||
|
||||
tmp_cert_dir = $HOME/.ca_certs
|
||||
tmp2_cert_dir = thisis$(HOME)stuff
|
||||
|
||||
LOGNAME = Eric Young (home=$HOME)
|
||||
|
||||
[ special ]
|
||||
|
||||
#H=$HOME
|
||||
#H=$default::HOME
|
||||
#H=$ENV::HOME
|
||||
#
|
||||
# SSLeay example configuration file.
|
||||
# This is mostly being used for generation of certificate requests.
|
||||
#
|
||||
|
||||
RANDFILE = $HOME/.rand
|
||||
|
||||
[ req ]
|
||||
default_bits = 512
|
||||
default_keyfile = privkey.pem
|
||||
|
||||
Attribute_type_1 = countryName
|
||||
Attribute_text_1 = Country Name (2 letter code)
|
||||
Attribute_default_1 = AU
|
||||
|
||||
Attribute_type_2 = stateOrProvinceName
|
||||
Attribute_text_2 = State or Province Name (full name)
|
||||
Attribute_default_2 = Queensland
|
||||
|
||||
Attribute_type_3 = localityName
|
||||
Attribute_text_3 = Locality Name (eg, city)
|
||||
|
||||
Attribute_type_4 = organizationName
|
||||
Attribute_text_4 = Organization Name (eg, company)
|
||||
Attribute_default_4 = Mincom Pty Ltd
|
||||
|
||||
Attribute_type_5 = organizationalUnitName
|
||||
Attribute_text_5 = Organizational Unit Name (eg, section)
|
||||
Attribute_default_5 = TR
|
||||
|
||||
Attribute_type_6 = commonName
|
||||
Attribute_text_6 = Common Name (eg, YOUR name)
|
||||
|
||||
Attribute_type_7 = emailAddress
|
||||
Attribute_text_7 = Email Address
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
HELPER_NAME= destest
|
||||
HELPER_DIR= des
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $
|
||||
|
||||
HELPER_NAME= dhtest
|
||||
HELPER_DIR= dh
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= dsatest
|
||||
HELPER_DIR= dsa
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= ectest
|
||||
HELPER_DIR= ec
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= ecdhtest
|
||||
HELPER_DIR= ecdh
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= ecdsatest
|
||||
HELPER_DIR= ecdsa
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= enginetest
|
||||
HELPER_DIR= engine
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.1 2011/06/09 05:25:17 spz Exp $
|
||||
|
||||
HELPER_NAME= evp_test
|
||||
HELPER_DIR= evp
|
||||
|
||||
FILES= evptests.txt
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= hmactest
|
||||
HELPER_DIR= hmac
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,9 @@
|
||||
# $NetBSD: Makefile,v 1.4 2012/07/14 04:06:17 christos Exp $
|
||||
|
||||
HELPER_NAME= ideatest
|
||||
HELPER_DIR= idea
|
||||
|
||||
.include <bsd.init.mk>
|
||||
|
||||
LDADD= -lcrypto
|
||||
LDADD+= -Wl,--no-fatal-warnings
|
||||
@@ -0,0 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= lhashtest
|
||||
HELPER_DIR= lhash
|
||||
HELPER_SRCS= lh_test.c
|
||||
|
||||
CPPFLAGS+= -DMalloc=malloc
|
||||
DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= md2test
|
||||
HELPER_DIR= md2
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= md4test
|
||||
HELPER_DIR= md4
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= md5test
|
||||
HELPER_DIR= md5
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,9 @@
|
||||
# $NetBSD: Makefile,v 1.4 2012/07/14 04:06:17 christos Exp $
|
||||
|
||||
HELPER_NAME= mdc2test
|
||||
HELPER_DIR= mdc2
|
||||
|
||||
.include <bsd.init.mk>
|
||||
|
||||
LDADD= -lcrypto
|
||||
LDADD+= -Wl,--no-fatal-warnings
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= randtest
|
||||
HELPER_DIR= rand
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= rc2test
|
||||
HELPER_DIR= rc2
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= rc4test
|
||||
HELPER_DIR= rc4
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,14 @@
|
||||
# $NetBSD: Makefile,v 1.3 2011/07/05 10:03:10 spz Exp $
|
||||
|
||||
HELPER_NAME= rc5test
|
||||
HELPER_DIR= rc5
|
||||
|
||||
.include <bsd.init.mk>
|
||||
|
||||
.if ${MKCRYPTO_RC5} != "no"
|
||||
LDADD= -lcrypto_rc5 -lcrypto
|
||||
.else
|
||||
CPPFLAGS+= -DOPENSSL_NO_RC5
|
||||
.endif
|
||||
|
||||
LDADD+= -Wl,--no-fatal-warnings
|
||||
@@ -0,0 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= ripemdtest
|
||||
HELPER_DIR= ripemd
|
||||
HELPER_SRCS= rmdtest.c
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $
|
||||
|
||||
HELPER_NAME= rsatest
|
||||
HELPER_DIR= rsa
|
||||
HELPER_SRCS= rsa_test.c
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:16 jmmv Exp $
|
||||
|
||||
HELPER_NAME= shatest
|
||||
HELPER_DIR= sha
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:16 jmmv Exp $
|
||||
|
||||
HELPER_NAME= sha1test
|
||||
HELPER_DIR= sha
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.1 2011/06/09 05:25:20 spz Exp $
|
||||
|
||||
HELPER_NAME= srptest
|
||||
HELPER_DIR= srp
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@@ -0,0 +1,41 @@
|
||||
# $NetBSD: t_certs.sh,v 1.1 2010/07/10 16:43:25 jmmv Exp $
|
||||
#
|
||||
# Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
atf_test_case x509v3
|
||||
x509v3_head()
|
||||
{
|
||||
atf_set "descr" "Checks x509v3 certificates"
|
||||
}
|
||||
x509v3_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_x509v3test"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case x509v3
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
# $NetBSD: t_ciphers.sh,v 1.4 2012/07/14 16:04:06 spz Exp $
|
||||
#
|
||||
# Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
atf_test_case bf
|
||||
bf_head()
|
||||
{
|
||||
atf_set "descr" "Checks blowfish cipher"
|
||||
}
|
||||
bf_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_bftest"
|
||||
}
|
||||
|
||||
atf_test_case cast
|
||||
cast_head()
|
||||
{
|
||||
atf_set "descr" "Checks CAST cipher"
|
||||
atf_set "timeout" "300"
|
||||
}
|
||||
cast_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_casttest"
|
||||
}
|
||||
|
||||
atf_test_case des
|
||||
des_head()
|
||||
{
|
||||
atf_set "descr" "Checks DES cipher (libdes)"
|
||||
}
|
||||
des_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_destest"
|
||||
}
|
||||
|
||||
atf_test_case evp
|
||||
evp_head()
|
||||
{
|
||||
atf_set "descr" "Checks EVP cipher"
|
||||
}
|
||||
evp_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore $(atf_get_srcdir)/h_evp_test $(atf_get_srcdir)/evptests.txt
|
||||
}
|
||||
|
||||
atf_test_case rc2
|
||||
rc2_head()
|
||||
{
|
||||
atf_set "descr" "Checks RC2 cipher"
|
||||
}
|
||||
rc2_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_rc2test"
|
||||
}
|
||||
|
||||
atf_test_case rc4
|
||||
rc4_head()
|
||||
{
|
||||
atf_set "descr" "Checks RC4 cipher"
|
||||
}
|
||||
rc4_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_rc4test"
|
||||
}
|
||||
|
||||
atf_test_case idea
|
||||
idea_head()
|
||||
{
|
||||
atf_set "descr" "Checks IDEA cipher"
|
||||
}
|
||||
idea_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_ideatest"
|
||||
}
|
||||
|
||||
atf_test_case rc5
|
||||
rc5_head()
|
||||
{
|
||||
atf_set "descr" "Checks RC5 cipher"
|
||||
}
|
||||
rc5_body()
|
||||
{
|
||||
[ -x "$(atf_get_srcdir)/h_rc5test" ] \
|
||||
|| atf_skip "RC5 support not available; system built" \
|
||||
"with MKCRYPTO_RC5=no"
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_rc5test"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case bf
|
||||
atf_add_test_case cast
|
||||
atf_add_test_case des
|
||||
atf_add_test_case evp
|
||||
atf_add_test_case rc2
|
||||
atf_add_test_case rc4
|
||||
atf_add_test_case idea
|
||||
atf_add_test_case rc5
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
# $NetBSD: t_hashes.sh,v 1.2 2012/07/14 16:04:06 spz Exp $
|
||||
#
|
||||
# Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
atf_test_case hmac
|
||||
hmac_head()
|
||||
{
|
||||
atf_set "descr" "Checks HMAC message authentication code"
|
||||
}
|
||||
hmac_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_hmactest"
|
||||
}
|
||||
|
||||
atf_test_case md2
|
||||
md2_head()
|
||||
{
|
||||
atf_set "descr" "Checks MD2 digest"
|
||||
}
|
||||
md2_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_md2test"
|
||||
}
|
||||
|
||||
atf_test_case md4
|
||||
md4_head()
|
||||
{
|
||||
atf_set "descr" "Checks MD4 digest"
|
||||
}
|
||||
md4_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_md4test"
|
||||
}
|
||||
|
||||
atf_test_case md5
|
||||
md5_head()
|
||||
{
|
||||
atf_set "descr" "Checks MD5 digest"
|
||||
}
|
||||
md5_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_md5test"
|
||||
}
|
||||
|
||||
atf_test_case ripemd
|
||||
ripemd_head()
|
||||
{
|
||||
atf_set "descr" "Checks RMD-160 digest"
|
||||
}
|
||||
ripemd_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_ripemdtest"
|
||||
}
|
||||
|
||||
atf_test_case sha
|
||||
sha_head()
|
||||
{
|
||||
atf_set "descr" "Checks SHA-1 digest"
|
||||
}
|
||||
sha_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_shatest"
|
||||
}
|
||||
|
||||
|
||||
atf_test_case mdc2
|
||||
mdc2_head()
|
||||
{
|
||||
atf_set "descr" "Checks MDC2 digest"
|
||||
}
|
||||
mdc2_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_mdc2test"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case hmac
|
||||
atf_add_test_case md2
|
||||
atf_add_test_case md4
|
||||
atf_add_test_case md5
|
||||
atf_add_test_case ripemd
|
||||
atf_add_test_case sha
|
||||
atf_add_test_case mdc2
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
# $NetBSD: t_libcrypto.sh,v 1.3 2010/11/08 19:06:12 pooka Exp $
|
||||
#
|
||||
# Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
atf_test_case engine
|
||||
engine_head()
|
||||
{
|
||||
atf_set "descr" "Checks ENGINE framework"
|
||||
}
|
||||
engine_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_enginetest"
|
||||
}
|
||||
|
||||
atf_test_case rand
|
||||
rand_head()
|
||||
{
|
||||
atf_set "descr" "Checks peudo-random number generator"
|
||||
}
|
||||
rand_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_randtest"
|
||||
}
|
||||
|
||||
atf_test_case bn
|
||||
bn_head()
|
||||
{
|
||||
atf_set "descr" "Checks BIGNUM library"
|
||||
atf_set "timeout" "300"
|
||||
}
|
||||
bn_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_bntest"
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_divtest"
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_exptest"
|
||||
}
|
||||
|
||||
atf_test_case conf
|
||||
conf_head()
|
||||
{
|
||||
atf_set "descr" "Checks configuration modules"
|
||||
}
|
||||
conf_body()
|
||||
{
|
||||
cp $(atf_get_srcdir)/d_conf_ssleay.cnf ssleay.cnf
|
||||
|
||||
atf_check -o file:$(atf_get_srcdir)/d_conf.out \
|
||||
$(atf_get_srcdir)/h_conftest
|
||||
}
|
||||
|
||||
atf_test_case lhash
|
||||
lhash_head()
|
||||
{
|
||||
atf_set "descr" "Checks lhash - dynamic hash tables"
|
||||
}
|
||||
lhash_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore -x \
|
||||
"echo hoge | $(atf_get_srcdir)/h_lhashtest"
|
||||
}
|
||||
|
||||
atf_test_case threads
|
||||
threads_head()
|
||||
{
|
||||
atf_set "descr" "Checks threading"
|
||||
}
|
||||
threads_body()
|
||||
{
|
||||
$(atf_get_srcdir)/h_threadstest \
|
||||
-cert $(atf_get_srcdir)/d_server.pem \
|
||||
-ccert $(atf_get_srcdir)/d_client.pem \
|
||||
2>&1 | tee out
|
||||
atf_check -s eq:1 -o empty -e empty grep :error: out
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case engine
|
||||
atf_add_test_case rand
|
||||
atf_add_test_case bn
|
||||
atf_add_test_case conf
|
||||
atf_add_test_case lhash
|
||||
atf_add_test_case threads
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
# $NetBSD: t_pubkey.sh,v 1.3 2011/06/09 05:25:21 spz Exp $
|
||||
#
|
||||
# Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
atf_test_case dsa
|
||||
dsa_head()
|
||||
{
|
||||
atf_set "descr" "Checks DSA cipher"
|
||||
}
|
||||
dsa_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_dsatest"
|
||||
}
|
||||
|
||||
atf_test_case dh
|
||||
dh_head()
|
||||
{
|
||||
atf_set "descr" "Checks Diffie-Hellman key agreement protocol"
|
||||
}
|
||||
dh_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_dhtest"
|
||||
}
|
||||
|
||||
atf_test_case rsa
|
||||
rsa_head()
|
||||
{
|
||||
atf_set "descr" "Checks RSA"
|
||||
atf_set "timeout" "300"
|
||||
}
|
||||
rsa_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_rsatest"
|
||||
}
|
||||
|
||||
atf_test_case ec
|
||||
ec_head()
|
||||
{
|
||||
atf_set "descr" "Checks EC cipher"
|
||||
atf_set "timeout" "300"
|
||||
}
|
||||
ec_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_ectest"
|
||||
}
|
||||
|
||||
atf_test_case ecdh
|
||||
ecdh_head()
|
||||
{
|
||||
atf_set "descr" "Checks ECDH key agreement protocol"
|
||||
}
|
||||
ecdh_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_ecdhtest"
|
||||
}
|
||||
|
||||
atf_test_case ecdsa
|
||||
ecdsa_head()
|
||||
{
|
||||
atf_set "descr" "Checks ECDSA algorithm"
|
||||
atf_set "timeout" "300"
|
||||
}
|
||||
ecdsa_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_ecdsatest"
|
||||
}
|
||||
|
||||
atf_test_case srp
|
||||
srp_head()
|
||||
{
|
||||
atf_set "descr" "Checks SRP key agreement protocol"
|
||||
}
|
||||
srp_body()
|
||||
{
|
||||
atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_srptest"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case dsa
|
||||
atf_add_test_case dh
|
||||
atf_add_test_case rsa
|
||||
atf_add_test_case ec
|
||||
atf_add_test_case ecdh
|
||||
atf_add_test_case ecdsa
|
||||
atf_add_test_case srp
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# $NetBSD: Makefile,v 1.2 2009/02/14 05:07:54 cube Exp $
|
||||
|
||||
HELPER_NAME= threadstest
|
||||
HELPER_DIR= threads
|
||||
HELPER_SRCS= mttest.c
|
||||
|
||||
CPPFLAGS+= -DPTHREADS
|
||||
CFLAGS+= -pthread
|
||||
|
||||
DPADD+= ${LIBPTHREAD} ${LIBSSL}
|
||||
LDADD+= -lpthread -lssl
|
||||
|
||||
FILESDIR= ${TESTSDIR}
|
||||
FILES= server.pem
|
||||
FILESNAME_server.pem= d_server.pem
|
||||
FILES+= client.pem
|
||||
FILESNAME_client.pem= d_client.pem
|
||||
|
||||
.include <bsd.init.mk>
|
||||
|
||||
.PATH: ${OPENSSLSRC}/apps
|
||||
@@ -0,0 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:16 jmmv Exp $
|
||||
|
||||
HELPER_NAME= x509v3test
|
||||
HELPER_DIR= x509v3
|
||||
HELPER_SRCS= tabtest.c
|
||||
|
||||
.include <bsd.init.mk>
|
||||
Reference in New Issue
Block a user