1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00
Commit Graph

7902 Commits

Author SHA1 Message Date
job
5f3a4f441a Rearrange freeing of memory in the regress test 2023-04-28 15:12:51 +00:00
tb
630f168f1e make the policy test compile on sparc64 2023-04-28 14:45:51 +00:00
job
a4301a112d Add X509_REQ_add_extensions and to X509_REQ_add1_attr to DER cache test
These new tests won't bubble up a non-zero error exit code because
other libcrypto bits still need to land first.
2023-04-28 13:48:38 +00:00
beck
5d942c1352 Hook up the the x509 policy regression tests to x509 regress.
These were adapted from BoringSSL's regress tests for x509
policy. They are currently marked as expected to fail as
we have not enabled LIBRESSL_HAS_POLICY_DAG by default yet, and
the old tree based policy code from OpenSSL is special.

These tests pass when we build with LIBRESSL_HAS_POLICY_DAG.
2023-04-28 09:11:35 +00:00
beck
b4d45f74c4 Fix copyright, convert boringssl comments to C style 2023-04-28 09:02:04 +00:00
beck
e9f3370e63 KNF
ok knfmt
2023-04-28 08:53:20 +00:00
beck
dfcebad6cf remove unused code. 2023-04-28 08:50:08 +00:00
beck
e2fa1da15d remove debugging printf 2023-04-28 08:45:50 +00:00
beck
95cce6dbe5 This test should not have V_EXPLICIT_POLICY set. with this
corrected we pass
2023-04-28 08:43:18 +00:00
beck
87535099c5 Add the rest of the boringssl policy unit tests.
We currently still fail two of these, looks like one more bug in
extracting the depth for require policy from the certificate..
2023-04-28 08:15:11 +00:00
beck
58ea120d66 correct test cases to add expected errors. 2023-04-27 13:26:57 +00:00
beck
11e92b75c2 Start of an x509 policy regress test. test cases from BoringSSL.
Still a work in progress adapting tests from boringssl x509_test.cc
but dropping in here for tb to be able to look at and run as well
since the new stuff still has bugs.
2023-04-27 12:23:31 +00:00
tb
f313d342a2 tlsexttest: check additional logic in tlsext randomization
This verifies that we put PSK always last and that the Apache 2 special
does what it is supposed to do. There is also some weak validation of
the Fisher-Yates shuffle that will likely catch errors introduced in
tlsext_randomize_build_order()
2023-04-27 10:53:58 +00:00
beck
f0813572b9 Make rpki-client choose the verification time of the time it is invoked
rather than always getting the current system time for every certificate
verification. This will result in output that is not variable on run-time.

ok tb@ claudio@
2023-04-27 08:37:53 +00:00
claudio
d6d042a578 Unbreak regress after yesterdays churn.
Friendly reminder from anton@
2023-04-27 06:11:43 +00:00
anton
a6c219455f cope with recent vmm changes 2023-04-27 05:42:44 +00:00
job
4962ea4335 Add test for invalidation of DER cache for X509_CRL_* setter functions
The program won't exit with a non-zero exit code if X509_CRL_set_*
tests fail, as the relevant bits haven't been committed to libcrypto yet.
2023-04-26 22:05:36 +00:00
job
a876585f00 Clean up X509 memory before exit 2023-04-26 21:30:12 +00:00
job
f31624a4e6 Add lookup name+function pointer table for improved diagnostics
OK tb@
2023-04-26 19:05:37 +00:00
job
bbab4d9ef4 Parameter names are not needed 2023-04-26 11:06:32 +00:00
job
0aff555d26 Remove unneeded parentheses 2023-04-26 11:04:12 +00:00
job
60f9a6092d No need to pass around const pointer cpder2
Suggested by tb@
2023-04-26 11:00:49 +00:00
job
39ee18e065 Shrink signature as cpder is only needed as local variable
Suggested by tb@
2023-04-26 10:55:58 +00:00
job
926a83681f Replace macros with functions
Requested by tb@
2023-04-26 10:34:08 +00:00
dv
eb18c5c166 regress: remove vmd path length tests.
These add no value and we'd now that we don't artificially limit
path lengths just be updating them to check PATH_MAX.
2023-04-26 10:14:21 +00:00
tb
c9d1fabebf Some more EC2M cleanup 2023-04-26 09:31:12 +00:00
tb
a04ff7ee09 Garbage collect test using the nseq command
reminded by anton
2023-04-26 09:07:59 +00:00
job
6b967e81da Rename dercache regress test to x509_asn1
Requested by jsing@
2023-04-26 08:58:03 +00:00
job
041ea02dfc Add regress test for invalidation of DER cache in select X509 setter functions 2023-04-25 21:51:44 +00:00
tb
5f7d54af02 bio_asn1: adjust for more recent churn 2023-04-25 19:48:24 +00:00
tb
8f4cde5df3 Remove a couple of temporary hacks 2023-04-25 17:17:21 +00:00
tb
eea36a4067 Update Wycheproof.go to exercise truncated SHA-2 and SHA-3 2023-04-25 15:56:56 +00:00
tb
9870d2f633 bn_mod_exp: temporarily add a prototype for BN_mod_exp_recp() 2023-04-25 15:34:07 +00:00
tb
87562733b2 bn_test: temporarily add prototypes for reciprocal functions
This is a hack needed until bn_local.h is updated
2023-04-25 15:33:25 +00:00
tb
30ad135c9b bn_test: BN_one() will become void, so stop checking it 2023-04-25 15:32:33 +00:00
tb
472a54ea59 bn_primes: the NIST primes will go away, so remove their tests 2023-04-25 15:30:03 +00:00
tb
457f098cc4 The bio_asn1 test will need to be linked statically after the bump 2023-04-25 15:29:17 +00:00
tb
d5165814ca Remove CTS test 2023-04-25 15:19:28 +00:00
tb
cee49816a3 CTS support will go away, so unhook corresponding regress 2023-04-25 15:18:59 +00:00
tb
dc5a472f91 Fix the client test and the tlsext test to work with randomized
TLS extensions (this involves unrandomizing the extension order
for the tests that rely on golden numbers.
2023-04-23 18:59:41 +00:00
anton
be82246fa6 cope with more s/XCR0/XFEATURE renames 2023-04-23 18:38:55 +00:00
tb
242be85ce0 Link c2sp test to build 2023-04-23 13:47:35 +00:00
tb
a82bb09bce Import C2SP/CCTV test
This currently only covers Ed25519 using the c2sp-testvectors package
and checks that our Ed25519 implementation behaves as expected from a
"ref10" implementation.

This test has Go and c2sp-testvectors as a hard dependency. It will
optionally pick up any OpenSSL package installed on the system and
test that as well.

https://github.com/C2SP/CCTV
https://github.com/C2SP/CCTV/tree/main/ed25519
2023-04-23 13:43:46 +00:00
jsing
703277b6c7 Provide initial regress for BN_{asc,dec,hex}2bn()/BN_bn2{dec,hex}() 2023-04-22 14:03:03 +00:00
tb
f911aa70c7 Exercise d2i_IPAddrBlocks() and X509v3_addr_subset() a little bit 2023-04-20 07:39:17 +00:00
job
6a90d08cae Fix missing whitespace in bgpd(8) output 2023-04-19 19:26:26 +00:00
tb
2c34d847be interop: work around extreme REGRESS_SKIP_SLOW slowness
A few years back beck introduced REGRESS_SKIP_SLOW dances with the idea
that this should speed up the interop tests for us devs because this also
checked interop between opensslX and opensslY, which we don't particularly
care about. This never really worked. On a mac m1 mini the result is this:

REGRESS_SKIP_SLOW unset
    9m56.69s real     3m42.24s user     3m00.70s system
REGRESS_SKIP_SLOW=yes
   11m04.61s real     7m29.61s user     1m40.29s system

The problem is that REGRESS_SKIP_SLOW simply wasn't designed to handle
the huge number of tests we have here. There are many nested .for loops
resulting in several thousand tests. Each test has a name of length ~80.
REGRESS_SKIP_SLOW concatenates them into a several hundred kilobytes
long string in REGRESS_SKIP_TARGETS, iterates over all regress targets and
tests with ".if ${REGRESS_SKIP_TARGETS:M${RT}}" if it should skip them.
This means that during a regress run, make spends a lot of time linearly
scanning a huge string.

I ran into this when I added OpenSSL 3.0 tests to the already existing
1.0.2 and 1.1 tests with the result that with REGRESS_SLOW_TARGTS set
it took the better part of an hour while without it it took about 15 min.

The hack here is simply to avoid using REGRESS_SLOW_TARGTES here and
handle the situation differently.

patch, REGRESS_SKIP_SLOW=yes
    5m42.32s real     2m09.98s user     1m45.21s system

The real solution would be to fix this in bsd.regress.mk, which someone
who understands make well is very welcome to do. For now, I'm happy with
this.

Debugged with jsing a few months ago
2023-04-19 15:34:23 +00:00
claudio
bea568aa1d Add workaround for introduction of flowrib and re_rib() functional change. 2023-04-19 13:25:07 +00:00
jsg
6bae335dd0 remove duplicate includes 2023-04-19 12:58:15 +00:00
bluhm
bf98328f8a Skip all tests that need internet connection unless they have it.
Run reachability ping only once.  Fix clean files and always run
make obj.  Do not suppress messages from redirectchain test.
2023-04-18 19:41:50 +00:00