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

7952 Commits

Author SHA1 Message Date
jsing
8a60fc3bc8 Add coverage for calling BN_{dec,hex}2bn() with NULL inputs. 2023-05-27 15:50:56 +00:00
bluhm
ce018c3c11 Skip tests if p5-BSD-Socket-Splice is not installed. 2023-05-24 20:31:49 +00:00
bluhm
d662361922 Default pf rule "block return; pass" interferes with test.
Use "block; pass" instead.
2023-05-24 11:52:30 +00:00
tb
5c7ffd3288 Copy the verify param hostflags independently of the host list
Without this, hostflags set on the SSL_CTX would not propagate to newly
created SSL. This is surprising behavior that was changed in OpenSSL 1.1
by Christian Heimes after the issue was flagged by Quentin Pradet:
https://bugs.python.org/issue43522
This is a version of the fix that landed in OpenSSL.

There used to be a workaround in place in urllib3, but that was removed at
some point. We haven't fixed this earlier since it wasn't reported. It only
showed up after recent fallout of extraordinarily strict library checking
in urllib3 coming from their own interpretation of the implications of
PEP 644.

ok jsing
2023-05-24 09:15:14 +00:00
tb
90fab13908 Add a test to verify that an SSL inherits the hostflags from the SSL_CTX
This is currently an expected failure that will be fixed shortly.
2023-05-24 08:54:59 +00:00
tb
0cc069c764 Provide CRYPTO_INT for statically linking libcrypto for libssl regress
This will be needed for the ssl_verify_param test
2023-05-24 08:49:06 +00:00
tb
cf62a661e0 Add empty line for consistency 2023-05-23 11:06:52 +00:00
tb
6183aea1d1 Add regress coverage for obj_dat.c r1.52 2023-05-23 11:05:09 +00:00
claudio
fc405d53b7 Don't use ibuf_open(0) as test. 0 lenght ibufs make little sense and
result in a malloc(0) call which is no bueno. Use ibuf_open(1) instead.
OK miod@
2023-05-23 09:32:37 +00:00
tb
e8736803f1 Bye, bye, horrible reacharounds into libcrypto
Now that rpki-client no longer uses LibreSSL-specific ASN1_time_* API,
we can get rid of some of the gross hacks needed for testing against
OpenSSL in regress. This simplifies things greatly.

Unfortunately, the unistd.h hack needs to stay until someone unearths
their STACK_OF compat diffs.
2023-05-22 15:20:16 +00:00
tb
2369b3d44d ecdhtest: Fix indent 2023-05-20 16:00:22 +00:00
tb
6a9ebb2fe8 Add a slow regress target that runs openssl speed with proper alignment
and with an unaligned offset. Let's see if all ciphers on our strict
alignment arches can deal with this.
2023-05-20 12:07:21 +00:00
djm
b349d29252 add LTESTS_FROM variable to allow skipping of tests up to a specific
point. e.g. "make LTESTS_FROM=t-sftp" will only run the sftp.sh test
and subsequent ones. ok dtucker@
2023-05-17 05:52:01 +00:00
tb
062268a7fa ecdhtest: check malloc() return values
From Ilya Chipitsine
2023-05-16 18:41:18 +00:00
dv
3c817da7c9 vmm(4)/vmd(8): switch to anonymous shared mappings.
While splitting out emulated virtio network and block devices into
separate processes, I originally used named mappings via shm_mkstemp(3).
While this functionally achieved the desired result, it had two
unintended consequences:

1) tearing down a vm process and its child processes required
excessive locking as the guest memory was tied into the VFS layer.

2) it was observed by mlarkin@ that actions in other parts of the
VFS layer could cause some of the guest memory to flush to storage,
possibly filling /tmp.

This commit adds a new vmm(4) ioctl dedicated to allowing a process
request the kernel share a mapping of guest memory into its own vm
space. This requires an open fd to /dev/vmm (requiring root) and
both the "vmm" and "proc" pledge(2) promises. In addition, the caller
must know enough about the original memory ranges to reconstruct them
to make the vm's ranges.

Tested with help from Mischa Peters.

ok mlarkin@
2023-05-13 23:15:28 +00:00
tb
9b0855c6d8 Assert that test->want != NULL at this point
Should make coverity happier
2023-05-13 07:17:32 +00:00
tb
193c648312 asn1oct: add a couple more tests 2023-05-12 10:43:28 +00:00
tb
52bf25b24e asn1oct: minor tweak in error message 2023-05-12 08:56:05 +00:00
tb
51de66fb3a Add regress coverage for {s2i,i2s}_ASN1_OCTET_STRING 2023-05-12 08:28:05 +00:00
djm
bfb0999009 test ChrootDirectory in Match block 2023-05-12 06:37:42 +00:00
djm
86d79ac85d better error messages 2023-05-12 06:36:27 +00:00
guenther
e9dcde5677 Teach dump_tables about PKs and display non-readable pages as such 2023-05-11 22:28:38 +00:00
otto
6ca44032e7 Make malloc tests that set flags more robust against the user also
having flags set.
2023-05-09 19:07:37 +00:00
tb
b584737232 Add regress coverage for -1 modulus as well. 2023-05-09 05:39:24 +00:00
otto
81678eb090 Enable malloc_errs test 2023-05-08 11:13:30 +00:00
otto
83821b1ea0 Add a regress test to test various malloc API and heap mismanagement
errors which should cause abort. A few are not enabled yet, they
will be once the corresponding diffs in malloc are committed.
2023-05-08 11:12:44 +00:00
tb
e253a7cc21 symbols.awk: Remove cfb dance
With e_old.c gone, we no longer need this.
2023-05-04 20:15:27 +00:00
tb
e20de6bd7c sigh. typo 2023-05-04 13:50:14 +00:00
tb
48185ea66a Let ecdsatest exercise ECParameters_dup() a bit
This currently leaks, which will fixed in a follow-on commit.
2023-05-04 13:49:29 +00:00
tb
5fcb6f2258 Remove x9_62_test_internal()
This test depends on RAND_set_rand_method() allowing stupid things like
making ECDSA signatures deterministic. This was gutted a long time ago
and the function should have followed its wrappers into the attic.
2023-05-04 13:41:20 +00:00
beck
c883d2fc30 Revert utf-8 fix for X509_NAME_get_index_by_NID to avoid libtls
regress for the moment.  this will come back after we rethink
the failure versus not there case.

ok tb@ jsing@
2023-05-03 08:10:23 +00:00
beck
de9b195a9c Change X509_NAME_get_index_by[NID|OBJ] to be safer.
Currently these functions return raw ASN1_STRING bytes as
a C string and ignore the encoding in a "hold my beer I am
a toolkit not a functioning API surely it's just for testing
and you'd never send nasty bytes" kind of way.

Sadly some callers seem to use them to fetch things liks
subject name components for comparisons, and often just
use the result as a C string.

Instead, encode the resulting bytes as UTF-8 so it is
something like "text",

Add a failure case if the length provided is inadequate
or if the resulting text would contain an nul byte.

based on boringssl.

nits by dlg@
ok tb@
2023-05-02 14:13:05 +00:00
schwarze
e982dbc862 Mark the BIO_F_* function codes as intentionally undocumented
and for now, skip the the BIO_R_* reason codes.
It looks like all public symbols in the BIO library
are now documented or marked as intentionally undocumented.
2023-05-02 13:15:05 +00:00
tb
845c6a7399 Simplify slightly and use i2d_PKCS7_bio_stream()
This is a wrapper of i2d_ASN1_bio_stream() that doesn't require us to
pass in PKCS7_it.
2023-05-02 09:30:37 +00:00
job
3dbd52dfc1 Make warnings more precise 2023-05-01 11:02:23 +00:00
tb
5369d03540 x509_asn1: make this test pass again after reinstating DER preservation 2023-04-30 21:31:16 +00:00
tb
30e9f0bb03 check_complete.pl: update for recent changes in bn 2023-04-30 20:33:31 +00:00
tb
eb7a1b1add Sort alphabetically 2023-04-30 05:02:59 +00:00
tb
d08f134996 Remove unnecessary target 2023-04-30 04:59:20 +00:00
tb
3b5acced0d policy test: simplify Makefile 2023-04-30 04:55:30 +00:00
bluhm
d372de4fdb Run open rsync and ports rsync programs against each other using
the --rsync-path option.  So we can see whether the tests pass in
all interoperability combinations.
Suggested by claudio@
2023-04-29 00:20:46 +00:00
schwarze
18be3cce30 adjust after man_validate.c rev. 1.128 improved the error messages 2023-04-28 20:34:26 +00:00
bluhm
e6a9832747 Execute each test as make target. Remove the shell wrapper. Mark
failing test so that claudio@ can fix them.
2023-04-28 19:41:07 +00:00
job
b0c625892f Free all libcrypto global state memory before returning
Found with the help of Otto's malloc memory leak detector!
2023-04-28 18:32:40 +00:00
job
cea08c0a7a Return a non-zero error exit code on any DER cache discrepancies 2023-04-28 18:31:34 +00:00
tb
e17ab34e70 Fix leaks reported by ASAN
debugged with job
2023-04-28 18:27:49 +00:00
schwarze
2188fc5dbd Mark the obsolete PROXY_PARAM and SOCKS BIO_ctrl(3) command constants
as intentionally undocumented.  Do that here because no related
manual pages exist.
2023-04-28 16:59:03 +00:00
beck
7d883af911 Enable policy checking by default now that we are DAG implementation based.
This ensures that we will no longer silently ignore a certificate with
a critical policy extention by default.

ok tb@
2023-04-28 16:50:16 +00:00
claudio
3a0ab0b7dc Import rsync regress provided by Martin Cracauer so that bluhm@ can work
improve it in tree.
2023-04-28 16:28:28 +00:00
tb
56597df0a4 The policy test is no longer expected to fail 2023-04-28 16:18:17 +00:00