summaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* X509_sign: make variables in SYNOPSIS match the ones used in DESCRIPTIONtb2025-07-111-8/+8
|
* X509_verify(): sync with X509_CRL_verify()tb2025-07-101-2/+6
| | | | | | | Check X509_ALGOR_cmp() explicitly against 0 and add an explanatory comment referring to the relevant RFC 5280 sections. ok beck kenjiro
* Add missing check to X509_CRL_verify()tb2025-07-101-1/+7
| | | | | | | | | | | | | When fixing CVE-2014-8275 in commit 684400ce, Henson added a check that the AlgorithmIdentifier in the certificate's signature matches the one in the tbsCertificate. A corresponding check for CRLs was missed. BoringSSL added such a check in 2022, so this should be fine for us to do as well even though OpenSSL still doesn't have it. The only caller will set an error on the stack, so we don't do it here. There's no obvious check that X509_REQ_verify() could do. ok beck kenjiro
* libcrypto regress: add interop harness for openssl/3.5tb2025-07-098-10/+75
|
* libcrypto regress: move GOCACHE to obj/tb2025-07-093-12/+28
| | | | | | | | | | | | | While it may be acceptable for Go to fill regular users' homedirs with a compiler cache that is unable to deal with corruption and full disks, this is terrible for people running regress as root since the cache can quickly grow to hundreds of megs and can thus result in all sorts hilarity below /root. Move the GOCACHE under ${.OBJDIR} and use a cleanup target to get rid of it again. This makes these tests a bit slower for regular users as well, but so be it. Let's see how this goes before I switch libtls to the same model. discussed with claudio and jsing
* .Lb libtls libssl libcryptoschwarze2025-07-0712-24/+37
| | | | OK tb@ and no objection from tedu@
* Move aes_ecb_encrypt_internal() prototype to aes_local.h.jsing2025-07-062-5/+5
|
* X509_get0_signature: call out inconsistent argument order in BUGStb2025-07-061-2/+9
| | | | | These annoying and careless inconsistencies were introduced when const was sprinkled everywhere without rhyme or reason.
* Add minimal regress coverage for AES-XTSjsing2025-07-051-2/+183
|
* fix double word; ok tb@jsg2025-07-041-3/+3
|
* pkcs7.h: remove whitespace before opening paren.tb2025-07-021-2/+2
| | | | fixes in particular ./check_complete.pl pkcs7
* Const correct the documentation of EVP_PKEY_get{0,1}_{DH,DSA,EC_KEY,RSA}()tb2025-07-021-9/+9
|
* Const correct EVP_PKEY_get{0,1}_{DH,DSA,EC_KEY,RSA}()tb2025-07-022-26/+22
| | | | | | | | | | | | | | | | These are safe to call concurrently and they don't modify the memory region pointed to by the pkey - they only bump the refcount of the key hanging off of it. The returned "legacy" key has to be handled with care in threaded constexts, so it is handed back as non-const. This also matches what EVP_PKEY_get0() always had. This way our signature is identical to BoringSSL's and doesn't cause compiler warnings in code that overuses const because one of the many API incoherencies added by OpenSSL 3 was to turn get0 into a function that takes and returns const while leaving get1 as it was. dlg agrees ok kenjiro
* Fix documented EVP_PKEY{,_base}_id() signaturetb2025-07-021-4/+4
| | | | | These have been taking a const pkey ever since they were added in OpenSSL 1.0.0.
* EVP_CipherInit_ex(): normalize EVP_CIPHER_CTX_ctrl() error checktb2025-07-021-2/+2
| | | | | | | | | While EVP_CIPHER_CTX_ctrl() can return a negative value this can't actually happen currently as all ciphers with EVP_CIPH_CTRL_INIT set normalize the EVP_CTRL_INIT return value to boolean in their ctrl() methods. Still, this check looks weird in grep, so align it. ok beck kenjiro
* X509_print_ex.3: document X509_FLAG_NO_IDStb2025-07-011-2/+7
| | | | ok job kenjiro
* X509_print: emit UIDs unless X509_FLAG_NO_IDS is settb2025-07-011-1/+28
| | | | | | | | | | | | | | | | | | | | | issuerUID and subjectUID are a curiosity introduced in X.509v2 before extensions were a thing. Their purpose is to help distinguishing certs with identical subject. They are rarely used and are MUST NOT use in the CA/BF baseline requirements. They do occasionally show up in test certificates and it is confusing that openssl x509 silently ignores them. Their encoding also makes them relatively hard to spot in the output of asn1 parsing tools. The output is identical to OpenSSL < 3 and BoringSSL, but due to some weird tweaks added leading up to OpenSSL 3 their output is no longer compatible with that. It is not entirely correct anyway. Since it is a (not further specified) bit string, you shouldn't be ignoring its unused bits... The X509_FLAG_NO_IDS flag has no effect for CSRs. discussed with beck ok job kenjiro (on an earlier version)
* x509.h: provide X509_FLAG_NO_IDStb2025-07-011-1/+2
|
* make the argument to ether_ntoa const.dlg2025-06-292-5/+5
| | | | | | | | this drives me nuts when i want to print something out of what's already const. casting it works, but feels gross. ok guenther@ tb@ deraadt@ enh says this is already in bionic/glibc/musl
* Provide accelerated SHA-1 for aarch64.jsing2025-06-284-2/+253
| | | | | | | | Provide an assembly implementation of SHA-1 for aarch64 using the ARM Cryptographic Extension (CE). This results in around a 2x speed up for larger block sizes. ok tb@
* Rework gcm128 implementation selection for amd64/i386.jsing2025-06-287-61/+130
| | | | | | | | | Provide gcm128_amd64.c and gcm128_i386.c, which contain the appropriate gcm128 initialisation and CPU feature tests for the respective platform. This allows for all of the #define spagetti to be removed from gcm128.c and removes one of the two remaining consumers of crypto_cpu_caps_ia32(). ok tb@
* Use a single implementation of gcm_mul()/gcm_ghash().jsing2025-06-281-19/+8
| | | | | | | | Since we always initialise the gmult/ghash function pointers, use the same implementaion of gcm_mul() and gcm_ghash(), regardless of the actual underlying implementation. ok tb@
* Remove less than useful comment.jsing2025-06-281-8/+1
|
* Add CLMUL and MMX to machine dependent CPU capabilities for i386.jsing2025-06-282-4/+10
| | | | ok tb@
* Add CLMUL to machine dependent CPU capabilities for amd64.jsing2025-06-282-4/+7
| | | | ok tb@
* Simplify EVP AES-GCM implementation and remove AES-NI specific code.jsing2025-06-273-175/+31
| | | | | | | | | | | | Like CTR, the mode implementation for GCM has two variants - rather than using multiple variants (one for AES-NI, another for non-AES-NI), consistently use CRYPTO_gcm128_{en,de}crypt_ctr32() with the aes_ctr32_encrypt_internal() function added for CTR mode. This lets us remove the AES-NI specific code, AES-NI specific EVP_CIPHER methods and the ctr function pointer from EVP_AES_GCM_CTX. ok tb@
* Move AES-NI from EVP to AES for CTR mode.jsing2025-06-276-76/+95
| | | | | | | | | | | | | | | | | | | | The mode implementation for CTR has two variants - one takes the block function, while the other takes a "ctr32" function. The latter is expected to handle the lower 32 bits of the IV/counter, but is not expected to handle overflow. The AES-NI implementation for CTR currently uses the second variant. Provide aes_ctr32_encrypt_internal() as a function that can be replaced on a machine dependent basis, along with an aes_ctr32_encrypt_generic() function that provides the default implementation and can be used as a fallback. Wire up the AES-NI version for amd64 and i386, change AES_ctr128_encrypt() to use CRYPTO_ctr128_encrypt_ctr32() (which calls aes_ctr32_encrypt_internal()) and remove the various AES-NI specific EVP_CIPHER methods for CTR. Callers of AES_ctr128_encrypt() will now use AES-NI, if available. ok tb@
* Remove unused defines from aes_local.h.jsing2025-06-271-5/+1
| | | | | | | | | MAXKB was added in OpenSSL commit deb2c1a1 and appears to have never been used, while MAXKC (originally RIJNDAEL_MAXKC) stopped being used in that same commit. MAXNR is also unused - AES_MAXNR exists in the public header. ok tb@
* openssl-ruby-tests: prepare for ruby default switch to 3.4tb2025-06-271-4/+4
|
* X509_print and friends: switch from BIO_write() to BIO_printf()tb2025-06-251-17/+16
| | | | | | Manually counting letters in const strings is ... suboptimal. ok beck jsing
* nc: document -Talpntb2025-06-241-2/+6
| | | | From David Leadbeater
* nc: add ALPN TLS option, so you can specify -T alpn=valuetb2025-06-241-2/+8
| | | | | From David Leadbeater with a report_tls tweak by me ok jsing
* sort process_tls_opt[]tb2025-06-241-2/+2
| | | | requested by jsing
* sync anton's fix for OpenSSL 3.3 interop to 3.4tb2025-06-231-2/+2
|
* OpenSSL is linked against pthread by now; ok tb@anton2025-06-231-2/+2
|
* Remove AES-NI specific EVP_CIPHER methods for CFB/CFB1/CFB8.jsing2025-06-161-205/+1
| | | | | | These now end up in aesni_encrypt() via AES_encrypt(), when appropriate. ok tb@
* Remove AES-NI specific EVP_CIPHER methods for OFB.jsing2025-06-161-64/+1
| | | | | | These now end up in aesni_encrypt() via AES_encrypt(), when appropriate. ok tb@
* Remove AES-NI specific EVP_CIPHER methods for CBC.jsing2025-06-161-66/+1
| | | | | | | These now end up in aesni_cbc_encrypt() via AES_cbc_encrypt(), when appropriate. ok tb@
* strip the temporary filename when displaying a verification error;sthen2025-06-161-1/+2
| | | | avoids unnecessary diff in output between runs
* crypto_ex_data: use same sizeof idiom as everywhere else in our own codetb2025-06-151-7/+6
| | | | ok beck
* Remove aesni_init_key().jsing2025-06-151-47/+22
| | | | | | | | The various methods can now use the regular init key functions, since the call to AES_set_{en,de}crypt_key() will be routed to the AES-NI implementation, if supported. ok tb@
* Integrate AES-NI into the AES code.jsing2025-06-156-62/+270
| | | | | | | | | | Currently, the AES-NI code is only integrated into EVP - add code to integrate AES-NI into AES. Rename the assembly provided functions and provide C versions for the original names, which check for AES-NI support and dispatch to the appropriate function. This means that the AES_* public API will now use AES-NI, if available. ok tb@
* Provide machine dependent CPU capabilities for i386.jsing2025-06-152-3/+17
| | | | | | This indicates if AES-NI is available via CRYPTO_CPU_CAPS_I386_AES. ok tb@
* Provide CRYPTO_CPU_CAPS_AMD64_AES in machine dependent CPU capabilities.jsing2025-06-152-4/+7
| | | | ok tb@
* tlsfuzzer: adjust test filenames to upstream churn.tb2025-06-151-154/+154
| | | | Requires py3-tlsfuzzer-20250516 to work
* ec_asn1_test: be better at sortingtb2025-06-141-3/+3
|
* ec_asn1_test: for curves that have a seed, validate the parameters a and btb2025-06-141-2/+195
| | | | | | per X9.62, F.3.4.b. This ensures that the table entries in ec_curves.c for the NIST curves P-224, P-256, P-384, and P-521 are internally consistent and in particular that the seed is correct.
* Fix signature of BN_zerotb2025-06-141-5/+4
| | | | This was changed a bit more than two years ago.
* The mdoc(7) .Ft macro does not need quoting of its arguments, but aboutschwarze2025-06-1323-124/+124
| | | | | | | 10% of our manual pages using this macro employed useless quoting anyway. Remove these quotes such that they do not incite fear, uncertainty, and doubt in developers who happen to look at these pages. jmc@ and tb@ agree with the direction.
* <uvm/uvmexp.h> is clearly only for VM_MALLOC_CONF, but <sys/sysctl.h> takesderaadt2025-06-121-2/+1
| | | | care of doing that include.