summaryrefslogtreecommitdiff
path: root/src/lib/libssl (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Move SSL_library_init() next to OPENSSL_init_ssl()tb2023-11-221-3/+2
| | | | | | | Its current position makes no sense and it will become a wrapper of the latter in a subsequent commit. ok jsing
* Unifdef OPENSSL_NO_ENGINE in libssltb2023-11-195-69/+5
| | | | | | As usual, a few manual fixes to avoid duplicate lines. ok jsing
* Manually unifdef OPENSSL_NO_ENGINE in ssl_clnt.ctb2023-11-191-17/+4
| | | | | | This allows us to simplify ssl_do_client_cert_cb() a bit. ok jsing
* Check for negative EVP_CIPHER_CTX_iv_length() return in libssltb2023-11-182-9/+13
| | | | ok beck
* Mention a subtle difference between PEM_def_callback(3) and the example.schwarze2023-09-191-2/+9
| | | | | | | | It's relevant not only for the example, but also because the functions documented here use PEM_def_callback(3) by default, and that exhibits surprising and potentially dangerous behaviour by not NUL-terminating. OK tb@
* Remove the duplicate documentation of pem_password_cb(3).schwarze2023-09-191-56/+94
| | | | | | | | | | | | | | | | | | | While here, also: * Avoid the misleading term "default password callback" because none of the functions in SSL_CTX_use_certificate(3) support overriding it. * Do not talk about "storing", "writing", and "encryption" since the cb passed to SSL_CTX_set_default_passwd_cb(3) is never used for any of that. * List the functions using cb. * Document what happens by default. * Remove the misleading words "which must be provided by the application" because all this is actually optional. * Make several wordings more precise. * Below EXAMPLES, fix argument naming to agree with pem_password_cb(3), clarify the description of what the example does, and, as suggested by tb@, use strlcpy(3). OK tb@
* More 0/NULL confusions in SSL_CTX_new()tb2023-09-191-8/+8
|
* Fix some NULL/0 misspellings in SSL_CTX_new()tb2023-09-191-5/+5
|
* Also remove ecdh.h use from libssltb2023-07-281-2/+1
|
* bump libcrypto, libssl, libtls majorstb2023-07-281-1/+1
|
* Set OPENSSL_NO_ENGINE, remove engine codetb2023-07-282-3/+1
| | | | | | | | | | ENGINE was special. It's horrible code even by the low standards of this library. Some ports may now try to use the stubs which will fail, but the fallout from this should be minimal. Of course there are various language bindings that expose the ENGINE API. OpenSSL 3 disabling ENGINE by default will likely help fixing this at some point. ok jsing
* Fix two aliases in libcrypto spotted by the new symbols testtb2023-07-192-3/+4
| | | | ok jsing
* Remove old workaround for F5tb2023-07-111-13/+2
| | | | | | | | | | | F5 is well-known for needing workaround (go read RFC 8446). In this particular case, it required implementation sending CHs larger than 255 bytes to 0x0300 otherwise their server would hang. This is the same hang that required the CH padding extension which broke other implementations. The CH padding extension was removed ~6 years ago, so hopefully this kludge will no longer needed either. ok jsing
* fix comment to unbreak things that care about warningsbeck2023-07-081-2/+2
| | | | ok tb@ krw@
* Hide all public symbols in libsslbeck2023-07-0821-33/+828
| | | | | | With the guentherizer 9000 ok tb@
* Enable reading RSA-PSS certificatestb2023-07-071-1/+2
| | | | ok beck jsing
* unifdef the LIBRESSL_HAS_TLS1_3_[CLIENT|SERVER] goobeck2023-07-063-54/+3
| | | | | And remove the tendrils. This was useful for transition but we are now well past this.
* upstream hidden file #include_next workaround for MS C compilersbcook2023-07-051-1/+5
| | | | ok beck@, tb@
* Simplify allocation checkstb2023-07-021-11/+11
| | | | | | | | | | Instead of attempting to allocate a few times and only then check all the returned pointers for NULL, allocate and check one after the othre. This is easier on the eyes and what we usually do. Prompted by a report by Ilya Shipitsin ok beck
* Disable TLS 1.0 and TLS 1.1 in libsslbeck2023-07-022-12/+4
| | | | | | | | | | | | Their time has long since past, and they should not be used. This change restricts ssl to versions 1.2 and 1.3, and changes the regression tests to understand we no longer speak the legacy protocols. For the moment the magical "golden" byte for byte comparison tests of raw handshake values are disabled util jsing fixes them. ok jsing@ tb@
* Switch from get_rfc*() to BN_get_rfc*()tb2023-06-271-7/+7
| | | | | | | | The existence of the public get_rfc*() API is a historic curiosity that may soon be corrected. We inherited its use and it survived in libssl until now. Switch to the better named BN_get_rfc*() wrappers. ok jsing
* Convert legacy server kex to one-shot sign/verifytb2023-06-112-47/+62
| | | | | | | | | | This converts ssl3_{get,send}_server_key_exchange() to EVP_DigestVerify() and EVP_DigestSign(). In order to do this, build the full signed_params up front and rework the way the key exchange parameters are constructed. This way we can do the verify and sign steps in one go and at the same use a more idiomatic approach with CBB/CBS. with/ok jsing
* Easy EVP_Digest{Sign,Verify} conversions for legacy stacktb2023-06-112-23/+8
| | | | | | | Convert ssl3_send_client_verify_{sigalgs,gost}() to EVP_DigestSign() and ssl3_get_cert_verify() to EVP_DigestVerify(). ok jsing
* Convert EVP_Digest{Sign,Verify}* to one-shot for TLSv1.3tb2023-06-102-22/+10
| | | | | | | Using one-shot EVP_DigestSign() and EVP_DigestVerify() is slightly shorter and is needed for Ed25519 support. ok jsing
* Move verified_chain from SSL to SSL_HANDSHAKEtb2023-05-264-14/+17
| | | | | | | | This is a better version of the fix for the missing pointer invalidation but a bit larger, so errata got the minimal fix. tested by jcs ok jsing
* add missing pointer invalidationjcs2023-05-161-1/+2
| | | | ok tb
* Use -Wshadow with clangtb2023-05-051-2/+2
| | | | ok jsing (a very long time ago)
* Too many stupid things whine about these being used uninitializedtb2023-04-281-2/+2
| | | | (which they aren't), so appease them.
* ssl_tlsext.c: Add an accessor for the tls extension type.tb2023-04-271-1/+7
| | | | | | Needed for the tlsexttest.c ok jsing
* Bump majors after symbol addition and removaltb2023-04-251-2/+2
|
* Fix allocation sizetb2023-04-251-3/+3
| | | | Reported by anton
* Unbreak tree: file missed in last committb2023-04-251-1/+3
| | | | Reported by anton
* Free and calloc() the tlsext_build_order and remember its lengthtb2023-04-241-2/+14
| | | | | | | Aligns tlsext_randomize_build_order() with tlsext_linearize_build_order() and will help regression testing. ok jsing
* Use TLSEXT_TYPE_alpn instead of the stupid long onetb2023-04-241-2/+2
|
* Randomize the order of TLS extensionstb2023-04-234-5/+71
| | | | | | | | | | | | | | | | | | | | | On creation of an SSL using SSL_new(), randomize the order in which the extensions will be sent. There are several constraints: the PSK extension must always come last. The order cannot be randomized on a per-message basis as the strict interpretation of the standard chosen in the CH hashing doesn't allow changing the order between first and second ClientHello. Another constraint is that the current code calls callbacks directly on parsing an extension, which means that the order callbacks are called depends on the order in which the peer sent the extensions. This results in breaking apache-httpd setups using virtual hosts with full ranomization because virtual hosts don't work if the SNI is unknown at the time the ALPN callback is called. So for the time being, we ensure that SNI always precedes ALPN to avoid issues until this issue is fixed. This is based on an idea by David Benjamin https://boringssl-review.googlesource.com/c/boringssl/+/48045 Input & ok jsing
* Document the RETURN VALUES of BIO_method_type(3) and BIO_method_name(3)schwarze2023-04-111-2/+11
| | | | for the various BIO types.
* Crankl libcrypto/libssl/libtls minors after symbol additiontb2023-03-101-1/+1
|
* libressl *_namespace.h: adjust *_ALIAS() to require a semicolontb2023-02-162-7/+7
| | | | | | | | | | LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon. This does not conform to style(9), breaks editors and ctags and (most importantly) my workflow. Fix this by neutering them with asm("") so that -Wpedantic doesn't complain. There's precedent in libc's namespace.h fix suggested by & ok jsing
* fix another typo in comment in a line touched by the last commit (thissthen2022-12-261-1/+1
| | | | one wouldn't have triggered a spell checker though)
* spelling fixes; from paul tagliamontejmc2022-12-2610-23/+23
| | | | ok tb
* document the interaction with BIO_dup_chain(3)schwarze2022-12-181-2/+14
|
* Add a small blurb on @SECLEVEL=nlibressl-v3.7.0tb2022-12-111-2/+8
|
* Make header guards of internal headers consistenttb2022-11-262-4/+4
| | | | | Not all of them, only those that didn't leak into a public header... Yes.
* Make internal header file names consistenttb2022-11-2646-104/+103
| | | | | | | | | | | | | | | | Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names used for internal headers. Move all these headers we inherited from OpenSSL to *_local.h, reserving the name *_internal.h for our own code. Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h. constant_time_locl.h is moved to constant_time.h since it's special. Adjust all .c files in libcrypto, libssl and regress. The diff is mechanical with the exception of tls13_quic.c, where #include <ssl_locl.h> was fixed manually. discussed with jsing, no objection bcook
* Reverse arguments in CBS_dup()tb2022-11-231-2/+2
| | | | | | | | We want to copy the tls_content_cbs() into the cbs, not the other way around CID 377013 ok jsing
* Bump libssl minor to match libcryptotb2022-11-131-1/+1
|
* Convert the legacy TLS stack to tls_content.jsing2022-11-1110-190/+292
| | | | | | | | | | This converts the legacy TLS stack to tls_content - records are now opened into a tls_content structure, rather than being written back into the same buffer that the sealed record was read into. This will allow for further clean up of the legacy record layer. ok tb@
* Symbols.list: Drop comments and sort.tb2022-11-111-33/+22
| | | | | | | While grouping the API by its purpose is nice, it doesn't help much if >90% is "general API". ok jsing
* Add support for symbol hiding disabled by default.beck2022-11-114-2/+78
| | | | | | | | | | | | Fully explained in libcrypto/README. TL;DR make sure libcrypto and libssl's function calls internally and to each other are via symbol names that won't get overridden by linking other libraries. Mostly work by guenther@, which will currently be gated behind a build setting NAMESPACE=yes. once we convert all the symbols to this method we will do a major bump and pick up the changes. ok tb@ jsing@
* Use tls_buffer for alert and handshake fragments in the legacy stack.jsing2022-11-105-49/+94
| | | | | | This avoids a bunch of pointer munging and a handrolled memmove. ok tb@