summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_err.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-11-10Move bn_prime.h to the public domain.tb1-57/+4
It's entirely trivial. ok beck
2022-11-09Start migrating to one source file per line.joshua1-18/+83
ok jsing@ tb@
2022-11-09Remove prime_t remnant and link bn_primes test staticallytb2-3/+4
2022-11-09Sync CBS_strdup() documentation update from libcrypto.jsing1-6/+4
2022-11-09Move table in bn_primes.h to a .c file and get rid of prime_ttb5-335/+292
This way we deduplicate two inclusions of the same big table and eliminate lots of stupid casts. input and ok many
2022-11-09Fix up indentation for EVP_PKEY_* defines.jsing1-19/+19
2022-11-09Revise CBS_strdup() documentation.jsing1-6/+4
CBS_strdup() now internally checks if the data contains NUL, failing if it does. Prompted by beck@
2022-11-09Clean up EVP_PKEY_METHOD related tables and code.jsing1-56/+41
This is effectively the same as done for EVP_PKEY_ASN1_METHOD, although this table only has nine entries. ok tb@
2022-11-09Clean up EVP_PKEY_ASN1_METHOD related tables and code.jsing1-87/+52
Rather than messing around with an OBJ_bsearch() for a table that contains 16 entries (and a stack find for any application added methods), simply do a reverse linear scan. This maintains the application method first behaviour, while removing a chunk of code. While here rename some variables and do some style clean up. ok tb@
2022-11-09Add tests for boundary conditions of struct tm.beck1-1/+125
Struct tm is limited by it's year being an int.
2022-11-09Revise ED25519 regress following API changes.jsing1-25/+5
2022-11-09Make X25519_public_from_private() internally reachable.jsing2-5/+8
2022-11-09Rename public_value to public_key for consistency.jsing1-9/+9
ok tb@
2022-11-09Rework ED25519 API.jsing3-45/+40
BoringSSL implemented a compound private key, which includes a copy of the public key as a performance optimisation for signing. However, this does not readily match with how EVP works, makes the ED25519 API inconsistent with the X25519 API, diverges from th RFC and does not align with the OpenSSL API. Instead, the caller can readily compute the public key and pass this in to the signing process. ok tb@
2022-11-09Add some regress coverage for EVP_PKEY_METHOD.jsing1-3/+40
2022-11-09Sort EVP_PKEY_METHOD externs.jsing1-5/+10
2022-11-09Sort EVP_PKEY_ASN1_METHOD externs.jsing1-6/+6
2022-11-09Add some regress coverage for EVP_PKEY_ASN1_METHODjsing2-2/+118
2022-11-09Inline use of bn_is_prime_bpsw()tb1-24/+20
Instead of using the BN_is_prime_fasttime_ex() API, use a direct call to bn_is_prime_bpsw(). This increases readability and simplifies error handling. Also put a division by two to the natural place now that we no longer need to do Miller-Rabin rounds. ok beck jsing
2022-11-09Remove unnecessary sizeofjoshua2-6/+6
ok jsing@ tb@
2022-11-09Next pass of bn_prime.c cleanuptb1-39/+29
Garbage collect a few pointless variables and remove a loop that wasn't really a loop. Simplify BN_CTX handling and drop some stupid comments. ok jsing miod
2022-11-09Drop some dead codetb1-136/+1
ok jsing
2022-11-09Fix possible memory leak in BN_mpi2bn() if BN_bin2bn() fails.tobhe1-3/+7
found with CodeChecker feedback from millert@ ok tb@
2022-11-08In case lh_OBJ_NAME_insert returns NULL due to a failed malloc, onpmbuhl1-1/+2
is leaked in OBJ_NAME_add. ok tb Found by CodeChecker.
2022-11-08Rename out to err to conform with standard naming scheme.tobhe1-4/+4
2022-11-08Fix leak of pk if EVP_PKEY_set1_DSA() fails.tobhe1-5/+9
Found with CodeChecker ok jsing@
2022-11-08Refactor/split ED25519_keypair.jsing2-16/+24
This brings in ED25519_keypair_from_seed() from BoringSSL commit c034e2d3ce16, which ED25519_keypair then wraps. This reduces differences between us and BoringSSL.
2022-11-08Change function argument to reduce differences with BoringSSL.jsing1-2/+2
2022-11-08Remove pointless loops.jsing1-13/+1
From BoringSSL 997c706d43504.
2022-11-08Avoid signed integer overflow in i2c_ASN1_BIT_STRING()tb1-5/+9
If the length of the bitstring is INT_MAX, adding 1 to it is undefined behavior, so error out before doing so. Based on BoringSSL eeb3333f by davidben ok beck joshua
2022-11-08Add missing $OpenBSD$beck1-0/+1
2022-11-08Fix leak of pk if EVP_PKEY_set1_RSA() fails.tobhe1-5/+9
Found with CodeChecker feedback and ok tb@
2022-11-08Replace the old OpenSSL julian date stuff with BoringSSL'sbeck7-326/+289
OpenSSL dealt with time conversion using a classical julian day scheme. BoringSSL got rid of it and uses only a julian style calculation for seconds since the POSIX time epoch. This changes libressl to use the seconds calculation exculusively instead of a mix of the julian day based conversions and the system time conversions to and from time_t to tm. ok tb@ jsing@
2022-11-07Wrap long linesjoshua1-3/+5
ok jsing@
2022-11-07Move variables above codejoshua1-18/+18
ok jsing@
2022-11-07White space KNF, no code change:schwarze1-15/+12
- line breaking and indentation in three struct declarations - removal of trailing whitespace Found while working on /usr/src/regress/lib/libcrypto/man/check_complete.pl . OK tb@
2022-11-07Link aes/ to regressjoshua1-1/+2
2022-11-07Add regress coverage for AESjoshua2-0/+986
ok tb@
2022-11-07Fix whitespace. Looks like I was a pig 3 years ago...tb1-205/+205
2022-11-07Rewrite TLSv1.2 key exporter.jsing5-96/+163
Replace the grotty TLSv1.2 key exporter with a cleaner version that uses CBB and CBS. ok tb@
2022-11-07Move tls13_exporter() code.jsing2-72/+73
It makes more sense to have tls13_exporter() in tls13_key_schedule.c, rather than tls13_lib.c ok tb@
2022-11-06Document that OPENSSL_free() is required in some circumstancestb1-2/+6
BoringSSL uses the common trick of storing malloc metadata in a prefix and then returning a pointer with an offset. Therefore callers must not call free() but OPENSSL_free(). Reported by dropk1ck via tobhe ok beck jsing
2022-11-06Add regress for Ed25519.jsing2-4/+409
From tb@
2022-11-06Enable Ed25519 internal to libcrypto.jsing2-15/+44
Based on a diff from tb@
2022-11-06Remove useless ancient files.jsing4-74/+0
ok beck@ tb@
2022-11-06Replace existing Blowfish regress testsjoshua3-515/+1370
ok tb@ jsing@
2022-11-06Enable time_conversion regress testsbeck1-1/+2
2022-11-06Add a bunch of regression tests for time conversion.beck2-0/+1736
This regression tests time conversion across various limits, leap seconds, and daylight transistions. gmtime_r, localtime_r, timegm, and mktime are tested against themselves and expected outputs. It requires the "posix" and "right" zoneinfo to be installed on the test running machine in order to access testable time zones. If those are not present the test is skipped successfully with a warning.
2022-11-05Add regress coverage for TLS exporters.jsing3-1/+677
2022-10-30The previous commit message out to say this:kn1-1/+1
--- Fix sparc64 build cc1: warnings being treated as errors .../constraints.c: In function 'test_constraints1': .../constraints.c:451: warning: ISO C90 forbids mixed declarations and code Fix RCS ID while here.