summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add documentation for s2i_ASN1_INTEGER and related functionstb2023-04-201-0/+195
| | | | | | | | | | | | | | | | These functions convert strings to internal objects and vice versa. This is a best effort, probably with a lot of room for improvement, which can happen in tree if anyone cares. It's better than nothing. Nothing in turn would be significantly better than the utter garbage a related project has managed to land as part of their efforts towards significant documentation improvements in a recent major relase. This leaves a dangling reference to the misnamed X509V3_METHOD_get_nid(3) which I may or may not fill in the future. I am unsure about the HISTORY section's precision, but that's what I got from cvs history. All these functions are about a quarter century old (and it shows), so I don't think it matters very much.
* Exercise d2i_IPAddrBlocks() and X509v3_addr_subset() a little bittb2023-04-201-9/+34
|
* Fix botched line wraptb2023-04-191-4/+3
|
* interop: work around extreme REGRESS_SKIP_SLOW slownesstb2023-04-193-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove duplicate includesjsg2023-04-192-4/+2
|
* remove duplicate includesjsg2023-04-191-2/+1
| | | | ok tb@
* Rename Hex array to hex_digits.jsing2023-04-191-5/+5
| | | | ok tb@
* Move the BN_bn2bin()/BN_bin2bn() family to bn_convert.cjsing2023-04-192-182/+183
|
* Reorder functions.jsing2023-04-191-102/+102
| | | | No functional change.
* Move BN_options() from bn_convert.c to bn_lib.cjsing2023-04-192-21/+21
|
* unifdef BN_RECURSIONjsing2023-04-195-594/+5
| | | | | | | | | | | | This removes a bunch of incomplete and scary code, which potentially leaks secrets and is not constant time. A performance gain is achieved on arm64 for sizes that we care about, while a minimal decrease in performance is noted for larger sizes on some other platforms. While we will potentially reimplement Karatsuba (or Toom-Cook) at a later date, it will be easier and safer to do it from a clean slate. ok tb@
* Use NULL, not 0 for pointers and use an explicit comparison against NULL.tb2023-04-181-3/+3
|
* ectest: Remove #if 1tb2023-04-181-3/+1
|
* Unifdef OPENSSL_NO_EC_NISTP_64_GCC_128tb2023-04-181-203/+1
|
* Remove prototypes under OPENSSL_NO_EC_NISTP_64_GCC_128tb2023-04-181-18/+1
| | | | | | | The code was deleted a while back, the prototypes remained. We had OPENSSL_NO_EC_NISTP_64_GCC_128 in opensslfeatures.h since forever. discussed with jsing
* Move x509.h inclusion into alphabetical ordertb2023-04-181-3/+2
|
* Bring includes into canonical ordertb2023-04-186-37/+35
| | | | Requested by jsing
* Sigh cvs... Also drop OPENSSL_NO_DEPRECATED from ec.htb2023-04-181-3/+1
|
* Move some includes out of OPENSSL_NO_DEPRECATEDtb2023-04-189-27/+9
| | | | | | | | | | | | | Some headers were included conditionally on OPENSSL_NO_DEPRECATED in hopes that eventually the mess of everything includes everything will magically resolve itself. Of course everyone would end up building openssl with OPENSSL_NO_DEPRECATED over time... Right. Surprisingly, the ecosystem has come to rely on these implicit inclusions, so about two dozen ports would fail to build because of this. Patching this would be easy but really not worth the effort. ok jsing
* ectest: drop a broken #if 0 /* optional */ piece of codetb2023-04-181-20/+5
| | | | | This places a point at infinity and then fails. Fix some wacky indentation in the vicinity.
* ec_point_conversion: drop test for sect571k1tb2023-04-181-350/+2
| | | | Maybe it should be replaced by another test, although P-256 seems enough.
* ectest: drop some gross unused macrostb2023-04-181-49/+1
|
* ectest: unifdef OPENSSL_NO_EC2Mtb2023-04-181-418/+1
|
* Skip binary curves in ec_point_conversiontb2023-04-171-3/+14
|
* Switch all ec tests to using dynamic linkingtb2023-04-173-8/+14
| | | | | This only requires very minor changes and simplifies testing quite a bit. Some of the changes can be undone after the next bump.
* Simplify Makefiletb2023-04-171-12/+1
|
* Drop GF2m teststb2023-04-171-647/+1
| | | | The code they test will go away soon.
* Allow overriding the bc implementation used in run-bctb2023-04-171-2/+7
| | | | | | | | | | | | While base bc is great, it uses libcrypto's BIGNUM implementation. This implies that the independent verification of the bn_test isn't as independent as it should be. With this commit, run-bc picks up bn-gh if it is installed. This appears to work on amd64, arm64 and sparc64 (where gbc is busted). I will send PRs to the regress maintainers once I will have tested this a bit more thoroughly. Committing this early since I juggle way too many diffs already.
* Fix typotb2023-04-171-2/+2
|
* Drop two useless READMEstb2023-04-172-18/+0
| | | | "go ahead" jsing
* Skip sect* curve checkstb2023-04-171-2/+2
| | | | | GF2m curves will go away soon. This reduces the pile of diffs in my jungle a tiny little bit.
* c_zlib.c needs bio_local.h with -DZLIB.tb2023-04-171-1/+2
| | | | | Apparently nobody tried to compile libcrypto with ZLI since Jan 2022. Maybe this means that we can unifdef -U ZLIB or maybe not...
* Tweak indent and use named registers.jsing2023-04-171-13/+13
| | | | No functional change.
* Hook sha3 up to build.jsing2023-04-171-1/+3
| | | | ok tb@
* Move BN_bn2mpi()/BN_mpi2bn() into bn_convert.cjsing2023-04-173-138/+74
|
* Use C99 initializers for the default_pctx and mark it static consttb2023-04-171-8/+3
|
* Add missing const qualifiers to the v3_* externstb2023-04-171-11/+11
| | | | ok jsing
* Fix whitespace in DHparam_print_fp()tb2023-04-171-2/+4
|
* Remove now unused dh_prn.ctb2023-04-171-64/+0
|
* Drop dh_prn.ctb2023-04-171-2/+1
|
* Move DHparam_print_fp() next to DHparam_print()tb2023-04-172-17/+18
| | | | | As usual with the fp suffix, the former wraps the latter with a file BIO. There is no reason for this function to be in a separate file.
* remove bad Pp;jmc2023-04-171-3/+2
| | | | (sorry, otto, for not spotting in the updated diff)
* Fix previous: add a missing andtb2023-04-161-2/+3
|
* Dump (leak) info using utrace(2) and compile the code always inotto2023-04-162-148/+199
| | | | | except for bootblocks. This way we have built-in leak detecction always (if enable by malloc flags). See man pages for details.
* Garbage collect the now unused obfuscating macro string_stack_free()tb2023-04-161-4/+1
|
* Inline the three uses of string_stack_free()tb2023-04-161-4/+4
| | | | | | | sk_OPENSSL_STRING_pop_free() is much more explicit and isn't that much more complicated. x509_util.c can also use it directly... No binary change
* Remove the now unused vpm_int.htb2023-04-161-64/+0
|
* x509_vfy.c and x509_vpm.c don't need vpm_int.h anymoretb2023-04-162-4/+4
|
* Move X509_VERIFY_PARAM_st from vpm_int.h to x509_local.htb2023-04-162-13/+13
|
* Provide EVP methods for SHA3 224/256/384/512.jsing2023-04-163-2/+193
| | | | ok tb@