summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add RCS tagtb2023-05-081-0/+1
|
* Enable malloc_errs testotto2023-05-081-2/+2
|
* Add a regress test to test various malloc API and heap mismanagementotto2023-05-082-0/+291
| | | | | errors which should cause abort. A few are not enabled yet, they will be once the corresponding diffs in malloc are committed.
* X509_verify_cert(): Garbage collect the unused roots variabletb2023-05-081-4/+1
| | | | | | | | | roots was used to store the trusted stack or pull the roots out of the X509_STORE before beck unmooned Ethel in x509_vfy.c r1.88. Since then this variable is effectively unused. It seems the STACK_OF(3) madness is too complicated for -Wunused-but-set-variable to notice. ok miod
* Avoid trailing whitespace in extension printingtb2023-05-081-2/+2
| | | | | | | If an extension is non-critical, X509V3_extensions_print() would leave trailing whitespace. This can be trivially avoided. ok miod
* Recommit -Wshadow now that the warning on BIG_ENDIAN is fixedtb2023-05-071-2/+2
|
* xts128 mode: avoid two -Wshadow warnings in the BIG_ENDIAN code path.tb2023-05-071-5/+5
| | | | Found by, compile tested & ok bluhm.
* Backout -Wshadow, it breaks build on powerpc64.bluhm2023-05-071-2/+2
|
* Remove a misplaced empty linetb2023-05-071-2/+1
|
* Regen cert.pemtb2023-05-061-419/+402
| | | | | | | | | This drops a few certs per the CA's request and TrustCor because of drama. Certainly, a new CA, is added as well as new certs for DigiCert, SECOM and E-Tugra. Unizeto still haven't fixed one of their certs and we still don't want the alternative Firmaprofesional with sha1WithRSAEncryption. ok sthen
* Use -Wshadow with clangtb2023-05-053-6/+6
| | | | ok jsing (a very long time ago)
* Reinstate X9.31 padding mode support in rsautltb2023-05-052-7/+18
|
* Fix error handling in tls_check_common_name()tb2023-05-051-6/+10
| | | | | | | | A calloc failure should be a fatal error, so make it return -1. Also switch the default rv to -1 and distinguish error cases with acceptable situations with goto err/goto done. ok jsing
* Salt shares the blame of the continued existence of the X9.31 padding modetb2023-05-051-2/+2
|
* Reinstate documentation of RSA_X931_PADDINGtb2023-05-051-7/+6
|
* Add back support for RSA_X931_PADDINGtb2023-05-053-65/+127
| | | | | | | This makes the custom stalt stack work again. Tested by robert as part of a larger diff ok jsing
* Link rsa_x931.c to buildtb2023-05-051-1/+2
|
* Bring back the X9.31 padding helperstb2023-05-051-0/+164
| | | | | | | | | | Nothing should be using this anymore, except that salt decided to use it in its home-cooked protocol, which already had its share of issues. Hopefully the efforts to switch salt to something more reasonable and standardized like mTLS will succeed sooner rather than later. tested as part of a larger patch by robert ok jsing
* symbols.awk: Remove cfb dancetb2023-05-041-4/+2
| | | | With e_old.c gone, we no longer need this.
* Rewrite ECParameters_dup()tb2023-05-041-7/+12
| | | | | | | This should leak slightly less than the direct expansion of ASN1_dup_of(). Use freezero() since the DER could contain a private key. ok jsing
* sigh. typotb2023-05-041-2/+2
|
* Let ecdsatest exercise ECParameters_dup() a bittb2023-05-041-2/+3
| | | | This currently leaks, which will fixed in a follow-on commit.
* Remove x9_62_test_internal()tb2023-05-041-72/+1
| | | | | | 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.
* Use size_t instead of int in EC_POINT_point2oct()tb2023-05-041-2/+2
| | | | | | | An int would be perfectly sufficient for this, but then again there would be fewer traps. ok jsing
* Fix line wrappingtb2023-05-041-3/+3
|
* Fix function name in doc commenttb2023-05-041-2/+2
|
* Revert utf-8 fix for X509_NAME_get_index_by_NID to avoid libtlsbeck2023-05-033-124/+22
| | | | | | | regress for the moment. this will come back after we rethink the failure versus not there case. ok tb@ jsing@
* Bring back length check tb ok'ed and I managed to remove whilebeck2023-05-031-2/+2
| | | | | | changing tests. ok tb@
* Fix a few KNF/whitespace issuestb2023-05-031-9/+5
|
* Change X509_NAME_get_index_by[NID|OBJ] to be safer.beck2023-05-023-22/+124
| | | | | | | | | | | | | | | | | | | | | | 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@
* Mark the BIO_F_* function codes as intentionally undocumentedschwarze2023-05-021-1/+1
| | | | | | 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.
* Rename P into generatortb2023-05-021-6/+6
| | | | ok jsing
* Simplify EC_GROUP_new_by_curve_name()tb2023-05-021-20/+14
| | | | | | | | | | | | | Pull the setting of the name a.k.a. nid into ec_group_new_from_data(). This way, we can return early on finding the nid in the curve_list[]. This also avoids a silly bug where a bogus ERR_R_UNKNOWN_BUG is pushed onto the error stack when ec_group_new_from_data() failed. While there rework the exit path of ec_group_new_from_data() a bit. Instead of an ok variable we can use an additional pointer to keep track of the return value and free the EC_GROUP unconditionally. ok jsing
* Style tweaks for SMIME_write_PKCS7()tb2023-05-021-7/+5
| | | | | | | | Initialize the mdalgs stack at the top and test and assign for ctype_nid. Use an empty line to separate variable declarations from the actual code and zap an extra empty line. ok jsing
* Unwrap a linetb2023-05-021-3/+2
|
* Simplify slightly and use i2d_PKCS7_bio_stream()tb2023-05-021-3/+3
| | | | | This is a wrapper of i2d_ASN1_bio_stream() that doesn't require us to pass in PKCS7_it.
* stray whitespacetb2023-05-011-2/+2
|
* Add a missing pair of braces.tb2023-05-011-2/+3
|
* Use uppercase for the CURVE_LIST_LENGTH macrotb2023-05-011-6/+6
|
* Consistently use lowercase hex digits for curve parameterstb2023-05-011-749/+749
|
* Now that we have C99 initializers, garbage collect some commentstb2023-05-011-299/+299
|
* Rework the curve list to use actual structs instead of a customtb2023-05-011-742/+1530
| | | | | | serialized format. ok jsing
* Drop the now unnecessary and unused field_type from the curve datatb2023-05-011-54/+4
| | | | ok jsing
* Convert EC_CURVE_DATA to C99 initializerstb2023-05-011-51/+192
| | | | | | Also clean up the definition of EC_CURVE_DATA a bit. ok jsing
* Simplify ec_group_new_from_data() furthertb2023-05-011-16/+55
| | | | | | | | | | We have a BN_CTX available, so we may as well use it. This simplifies the cleanup path at the cost of a bit more code in the setup. Also use an extra BIGNUM for the cofactor. Reusing x for this is just silly. If you were really going to avoid extra allocations, this entire function could easily have been written with three BIGNUMs. ok jsing
* Make warnings more precisejob2023-05-011-4/+4
|
* Drop some dead codetb2023-05-011-11/+2
| | | | | | | No member of the curve_list[] table has a method set. Thus, curve.meth is always NULL and we never take the EC_GROUP_new(meth) code path. ok jsing
* Remove pointless/wrong .meth = 0 entries from curves_list[]tb2023-05-011-55/+1
|
* Mechanically convert curve_list[] to C99 initializerstb2023-05-011-55/+325
| | | | ok jsing
* Clean up handling of nist_curves[]tb2023-05-011-18/+14
| | | | | | | | There's no point in introducing a typedef only for two sizeof() calls. We might as well use an anonymous struct for this list. Make it const while there, drop some braces and compare strcmp() return value to 0. ok jsing