summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/recallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-11-06Toss tedu's cleanse into crypto_memory.ctb2-9/+9
2024-11-06add an empty line between license and #include linestb1-1/+2
2024-11-06Rename malloc-wrapper.c to crypto_memory.ctb2-3/+3
Apparently it's important that five trivial one-line wrappers remain in a file with the ISC license. So instead of cleaning the root directory of our favorite pigsty further by squashing all the useless legacy garbage into a single file, rename the oddly-named malloc-wrapper.c into crypto_memory.c. discussed with beck, jsing
2024-11-05bn_convert: avoid a zero-sized allocationtb1-2/+2
2024-11-05Rename cpt_err.c into crypto_err.ctb2-3/+3
It is a bit sad, because cpt is such an apt abbreviation for crypto that everybody immediately understands. discussed with jsing
2024-11-05Relocate FIPS stubs to crpyto_legacy.ctb3-80/+20
discussed with jsing
2024-11-05CRYPTO_mem_ctrl() is also relocated to crypto_legacy.ctb3-122/+9
discussed with jsing
2024-11-05Move OPENSSL_cleanse() to crypto_legacy()tb3-15/+9
The correct spelling is explicit_bzero() and it doesn't need its own file. discussed with jsing
2024-11-05Fold cversion.c into crypto_legacy.ctb3-119/+57
discussed with jsing
2024-11-05Rename cryptlib.c into crypto_legacy.ctb2-3/+3
discussed with jsing
2024-11-05crypto_local.h: add comment to #endiftb1-2/+2
2024-11-05Move cryptlib.h to crypto_local.htb6-158/+28
discussed with jsing
2024-11-05ec_asn1_test: remove debug leftover that broke the build on Windowstb1-3/+1
2024-11-05EC_POINT_is_at_infinity() returns a booleantb3-15/+15
This may have been different at some point in the past, but it may also have been a confusion with EC_POINT_is_on_curve() which, like any great API with a name implying a boolean return, actually has three possible return values. ok jsing
2024-11-05cryptlib.h: adjust header guard for upcoming surgerytb14-16/+16
It is gross that an internal detail leaked into a public header, but, hey, it's openssl. No hack is too terrible to appear in this library. opensslconf.h needs major pruning but the day that happens is not today. ok jsing
2024-11-04crypto_local.h is empty, so cryptlib.c doesn't need it right now.tb1-2/+1
2024-11-04Rewrite EC_POINT_new() and EC_POINT_dup()tb1-27/+34
Like most of the code in this file that hasn't been overhauled, these are just terrible. As jsing points out, we will need to ensure that finish() works on a not fully initialized point. That's currently safe. ok jsing
2024-11-04ec tests: allow linking against eopenssltb2-3/+16
2024-11-03affine coordinates: the intention was to move the check, not to copy it...tb1-6/+1
So... zap the now redundant check. Should have been committed along with ec_lib.c -r1.77
2024-11-03Move point at infinity check to API boundarytb1-2/+7
Since we only consider standard affine coordinates, the point at infinity must be excluded. Check at the API boundary that the point isn't the point at infinity rather than hiding this check somewhere in a method. ok jsing
2024-11-03Add regress coverage for BN_bn2binpad() and BN_bn2lebinpad().jsing1-3/+137
2024-11-03Add some additional BN conversion test cases.jsing1-3/+21
2024-11-02d2i_ECPKParameters(): unify return statement with rest of filetb1-2/+3
2024-11-02netcat: drop caddr_t cast. It's not needed and not portable.tb1-2/+2
From Jonas 'Sortie' Termansen
2024-11-02ec_convert: remove _OCT also from the macro namestb1-24/+24
2024-11-02Fix includes in ec_lib and ecp_smpltb2-2/+11
2024-11-02Merge compressed coordinate setting back into ecp_smpl and ec_libtb5-286/+140
The reason these were in separate files was FIPS. Not our problem.
2024-11-02ec_asn1_test: I somehow managed to commit the version without freezero...tb1-3/+4
2024-11-02Assert assumption on CRYPTO_THREADIDtb1-1/+2
This type has been opaque for a while, and nobody should be able to call this function with id != NULL. If they do, we want to know and it should be noisy. suggested by/ok jsing
2024-11-02Rewrite/clean up ec_GFp_simple_set_compressed_coordinates()tb1-62/+48
The biggest change here is that the computation is now performed in the Montgomery domain if we have a Montgomery curve. This avoids constant checking whether need to use plain field operations or whether we can use curve-specific ones. Use a few better variable names and stop attempting to figure out whether the operation failed due to an error in BN_mod_sqrt() or a bad point. All in all this only shaves off 10 lines, but it is astounding what a few tweaks can do to code that looked like Rome in 455 AD. with/ok jsing
2024-11-02Bye bye CRYPTO_THREADIDtb2-37/+2
After we ripped it out of RSA blinding and finally the error stack, it can go play in the attic with ENGINE and all the other abominations from this particular keyboard. ok jsing
2024-11-02Inline last uses of CRYPTO_THREADID in err/tb2-19/+10
This is another Thorpian obfuscation scheme hiding nasty casts of pthread_t to unsigned long and comparing them. We can do this in a less underhanded way by calling the portable functions directly. ok jsing
2024-11-02sort includestb1-2/+2
2024-11-01More include sweeping in cms.tb3-17/+26
2024-11-01Fix includes in cms_env.ctb1-9/+10
2024-11-01Drop some pointless parenthesestb2-9/+9
2024-11-01Only include cryptlib.h where it's neededtb5-25/+31
Clean up the other includes while there.
2024-11-01ec_asn1_test: set compressed coordinates for the "simple" generatortb1-3/+3
2024-11-01Also exercise the "simple" version of the builtin curves, not only "mont"tb1-27/+124
2024-11-01Clean up PPC CPU capabilities and Montgomery code.jsing5-1122/+6
ppc64-mont.pl (which produces bn_mul_mont_fpu64()) is unused on both powerpc and powerpc64, so remove it. ppccap.c doesn't actually contain anything to do with CPU capabilities - it just provides a bn_mul_mont() that calls bn_mul_mont_int() (which ppc-mont.pl generates). Change ppc-mont.pl to generate bn_mul_mont() directly and remove ppccap.c. ok tb@
2024-11-01Update cert.pem, ok sthentb1-59/+592
New: CommScope /C=US/O=CommScope/CN=CommScope Public Trust ECC Root-01 /C=US/O=CommScope/CN=CommScope Public Trust ECC Root-02 /C=US/O=CommScope/CN=CommScope Public Trust RSA Root-01 /C=US/O=CommScope/CN=CommScope Public Trust RSA Root-02 Cybertrust Japan Co., Ltd. /C=JP/O=Cybertrust Japan Co., Ltd./CN=SecureSign Root CA12 /C=JP/O=Cybertrust Japan Co., Ltd./CN=SecureSign Root CA14 /C=JP/O=Cybertrust Japan Co., Ltd./CN=SecureSign Root CA15 Deutsche Telekom Security GmbH /C=DE/O=Deutsche Telekom Security GmbH/CN=Telekom Security TLS ECC Root 2020 /C=DE/O=Deutsche Telekom Security GmbH/CN=Telekom Security TLS RSA Root 2023 Firmaprofesional SA /C=ES/O=Firmaprofesional SA/2.5.4.97=VATES-A62634068/CN=FIRMAPROFESIONAL CA ROOT-A WEB TrustAsia Technologies, Inc. /C=CN/O=TrustAsia Technologies, Inc./CN=TrustAsia Global Root CA G3 /C=CN/O=TrustAsia Technologies, Inc./CN=TrustAsia Global Root CA G4 Added to existing: /C=TW/O=TAIWAN-CA/OU=Root CA/CN=TWCA CYBER Root CA Deleted: e-commerce monitoring GmbH /C=AT/O=e-commerce monitoring GmbH/CN=GLOBALTRUST 2020
2024-11-01regen cert.pem after sort order change in format-pem.pltb1-953/+953
ok sthen
2024-11-01Don't lowercase cert subjects when sorting; combined with perl foreach oversthen1-5/+5
a hash returning entries in random order, the order of "COMODO CA Limited" and "Comodo CA Limited" was switching randomly. This results in a bigger change of sort order now, but means that future changes will then be in a repeatable order. ok tb@
2024-11-01KNFtb1-2/+3
2024-11-01Move point_conversion_t conversion to API boundarytb1-23/+33
EC_POINT_oct2point() is the only API that needs detailed knowledge about this incomplete enum. [Arguably, the setters for the EC_KEY and EC_GROUP member of that type would also need to be able to validate what's being set, but they can't since they can't fail.] Anyway. Add a helper that lets EC_POINT_oct2point() translate that enum to its internal representation at the API boundary and add a check that ensures that we only encode the point at infinity as the point at infinity. ok jsing
2024-11-01Garbage collect field_div() member.tb1-3/+1
It was only used by EC2M.
2024-11-01sorttb1-2/+2
2024-10-31Drop the _oct from the function prefixestb1-31/+31
With the functions living in ec_convert now, the oct makes little sense. And ec_oct_oct2point() was too much for poor jsing to bear. requested by jsing
2024-10-31Retire the oct2point and point2oct EC_METHOD memberstb4-32/+10
Both our remaining EC_METHODs use the methods that used to be called ec_GFp_simple_{oct2point,point2oct}() so there's no need for the function pointer indirection. Make the public API call them directly. ok jsing
2024-10-31Clean up the mess in i2d_EC_PRIVATEKEY()tb1-16/+36
Use a few local variables to make the checks at the start slightly less unappealing. Use those to simplify the conditionals a bit and avoid a particularly silly exit code. ok is set unless ret is 0, so what do you think 'return (ok ? ret : 0);' returns? By the way, ret < 0 is an error as well. While most of the stuff in this file could use a lot more cleanup, I think the first layer of cockroaches has been exterminated and there's even some faint golden glimmer between the turds. Let's shelve the biohazard warnings for now. ok jsing