summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_cert.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* s3 is never NULL since s2 (formerly used for SSLv2) does not exist, so there isbcook2019-05-151-3/+2
| | | | | | | no need to check for it. Fixes COV-165788, identified with help from Alex Bumstead. ok jsing@
* Avoid leak in SSL_dup_CA_list()tb2019-04-131-8/+14
| | | | | | | | In the case that X509_NAME_dup() succeeds, but sk_X509_NAME_push() fails, name is leaked. The entire function is trying to be clever and therefore hard to follow. Let's do it the stupid but safe way. ok jsing
* Strip out all of the pkey to sigalg and sigalg to pkey linkages.jsing2019-03-251-23/+1
| | | | | | These are no longer used now that we defer signature algorithm selection. ok beck@
* Add a chain member to CERT_PKEY and provide functions for manipulating it.jsing2019-03-251-2/+66
| | | | | | | | | Note that this is not the full chain, as the leaf certificate currently remains in the x509 member of CERT_PKEY. Unfortunately we've got to contend with the fact that some OpenSSL *_chain_* APIs exclude the leaf certificate while others include it... ok beck@ tb@
* Revert previous - the default sigalg for RSA key exchange is {sha1,rsa}.jsing2018-11-191-4/+4
| | | | | | | In TLSv1.2, if the client does not send a signature algorithms extension then for RSA key exchange a signature algorithm of {sha1,rsa} is implied. The MD5+SHA1 hash only applies to older versions of TLS, which do not support sigalgs.
* Unbreak legacy ciphers for prior to 1.1 by setting having a legacybeck2018-11-161-4/+4
| | | | | sigalg for MD5_SHA1 and using it as the non sigalgs default ok jsing@
* Stop keeping track of sigalgs by guessing it from digest and pkey,beck2018-11-101-9/+13
| | | | | | just keep the sigalg around so we can remember what we actually decided to use. ok jsing@
* Stop pretending that a cert member in a SSL and SSL_CTX can be NULL.jsing2018-11-081-29/+1
| | | | ok beck@ tb@
* Mop up ecdh_tmp, since it is no longer used.jsing2018-11-051-11/+1
| | | | ok bluhm@ tb@
* OpenSSL started adding const to functions all over the place. Make alltb2018-04-251-2/+2
| | | | | | | | our libssl functions match theirs wrt const, except for BIO_f_ssl(3) which will be fixed in a later step. this went through a i386 bulk by sthen ok jsing
* Remove support for DSS/DSA, since we removed the cipher suites a whilejsing2017-08-121-7/+1
| | | | | | back. ok guenther@
* Clean up the EC key/curve configuration handling.jsing2017-08-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | Over the years OpenSSL grew multiple ways of being able to specify EC keys (and/or curves) for use with ECDH and ECDHE key exchange. You could specify a static EC key (SSL{_CTX,}_set_tmp_ecdh()), use that as a curve and generate ephemeral keys (SSL_OP_SINGLE_ECDH_USE), provide the EC key via a callback that was provided with insufficient information (SSL{_CTX,}_set_tmp_ecdh_cb()) or enable automatic selection and generation of EC keys via SSL{_CTX,}_set_ecdh_auto(). This complexity leads to problems (like ECDHE not being enabled) and potential weird configuration (like being able to do ECDHE without the ephemeral part...). We no longer support ECDH and ECDHE can be disabled by removing ECDHE ciphers from the cipher list. As such, permanently enable automatic EC curve selection and generation, effectively disabling all of the configuration knobs. The only exception is the SSL{_CTX,}_set_tmp_ecdh() functions, which retain part of their previous behaviour by configuring the curve of the given EC key as the only curve being enabled. Everything else becomes a no-op. ok beck@ doug@
* Change SSLerror() back to taking two args, with the first one being an SSL *.beck2017-02-071-16/+16
| | | | | | | | | Make a table of "function codes" which maps the internal state of the SSL * to something like a useful name so in a typical error in the connection you know in what sort of place in the handshake things happened. (instead of by arcane function name). Add SSLerrorx() for when we don't have an SSL * ok jsing@ after us both being prodded by bluhm@ to make it not terrible
* Send the function codes from the error functions to the bit bucket,beck2017-01-291-2/+2
| | | | | | as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
* Finish the fallout of the SSLerr->SSLerror cleanup to get rid of the uglybeck2017-01-261-5/+3
| | | | line wraps that resulted
* Send the error function codes to rot in the depths of hell where they belongbeck2017-01-261-16/+16
| | | | | | | We leave a single funciton code (0xFFF) to say "SSL_internal" so the public API will not break, and we replace all internal use of the two argument SSL_err() with the internal only SSL_error() that only takes a reason code. ok jsing@
* sk_free() checks for NULL so do not bother doing it from the callers.jsing2017-01-241-3/+3
|
* sk_pop_free() checks for NULL so do not bother doing it from the callers.jsing2017-01-241-9/+4
|
* Move a large part of ssl_st into internal, so we can see what squeals.beck2017-01-231-6/+6
| | | | ok jsing@
* Move most of the fields in SSL_CTX to internal - the ones that remain arejsing2017-01-231-5/+5
| | | | | | known to be in use. ok beck@
* move the callbacks from ssl_st to internalbeck2017-01-231-3/+3
| | | | ok jsing@
* Move callback function pointers and argument pointers from SSL_CTX tojsing2017-01-231-3/+4
| | | | | | internal. ok beck@
* Move most of the SSL3_STATE fields to internal - the ones that remain arejsing2017-01-221-2/+2
| | | | | | known to be used by ports. ok beck@
* Add support for ECDHE with X25519.jsing2016-12-211-1/+2
| | | | | | Testing of an earlier revision by naddy@. ok beck@
* X509_free(3) is NULL-safe, so remove NULL checks before its calls.mmcc2016-03-111-13/+7
| | | | ok doug@
* Nuke ssl_set_peer_cert_type().jsing2015-09-111-8/+1
| | | | ok "flensing knife"
* readdir() is thread-safe when DIR handles aren't shared, so delete the lock.guenther2015-04-061-3/+1
| | | | | | | (POSIX is fixing its description: readdir_r() was a botch) Patch from Carlos Mart�n Nieto (cmn (at) dwim.me) no -portable concerns bcook@
* Remove trailing whitespace.jsing2014-12-141-9/+9
|
* Remove support for GOST R 34.10-94 signature authentication, along withjsing2014-12-101-2/+1
| | | | | | | the two ciphersuites that use it. GOST94 public/private keys have been long obsoleted and libcrypto does not have support for them anyway. Discussed with Dmitry Eremin-Solenikov.
* Remove client handling of RSA in ServerKeyExchange messages, along withjsing2014-12-061-2/+1
| | | | | | | | | the associated peer_rsa_tmp goop. This was only needed for export cipher handling and intentional RFC violations. The export cipher suites have already been removed and previous cleanup means that we will never send ServerKeyExchange messages from the server side for RSA.
* Update the GOST code in libssl, as contributed by Dmitry Eremin-Solenikov.miod2014-11-181-1/+5
| | | | | This causes a libssl major version bump as this affects the layout of some internal-but-unfortunately-made-visible structs.
* Sort and group includes.jsing2014-11-161-6/+7
|
* Add support for automatic DH ephemeral keys.jsing2014-10-311-1/+2
| | | | | | | This allows an SSL server to enable DHE ciphers with a single setting, which results in an DH key being generated based on the server key length. Partly based on OpenSSL.
* Remove support for ephemeral/temporary RSA private keys.jsing2014-10-311-9/+1
| | | | | | | | | The only use for these is via SSL_OP_EPHEMERAL_RSA (which is effectively a standards violation) and for RSA sign-only, should only be possible if you are using an export cipher and have an RSA private key that is more than 512 bits in size (however we no longer support export ciphers). ok bcook@ miod@
* Add support for automatic ephemeral EC keys.jsing2014-10-031-1/+2
| | | | | | | | | | This allows an SSL server to enable ECDHE ciphers with a single setting, which results in an EC key being generated using the first preference shared curve. Based on OpenSSL with inspiration from boringssl. ok miod@
* KNF comments, reflowing and moving out of the middle of argument lists inguenther2014-07-101-16/+25
| | | | | | places ok jsing@
* tedu the SSL export cipher handling - since we do not have enabled exportjsing2014-07-091-3/+1
| | | | | | ciphers we no longer need the flags or code to support it. ok beck@ miod@
* Fix memory leak in error path.logan2014-06-211-2/+2
| | | | OK from miod@
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* No, we will not be building with OPENSSL_NO_X509_VERIFY. Nuke it andjsing2014-06-081-14/+8
| | | | | | do some other clean up while here. ok deraadt@
* BIO_free has an implicit NULL check, so do not bother checking for NULLjsing2014-06-071-4/+2
| | | | before calling it.
* The DH_free, EC_KEY_free, EVP_PKEY_free and RSA_free functions all havejsing2014-06-071-22/+12
| | | | | implicit NULL checks, so there is no point ensuring that the pointer is non-NULL before calling them.
* More KNF.jsing2014-06-071-19/+22
|
* remove some #if 0 code. we don't need any more reminders that we're usingtedu2014-05-301-14/+0
| | | | a not quite appropriate data structure. ok jsing
* Any sane platform has stdio. Stop pretending we will ever use a platformbeck2014-05-291-2/+0
| | | | | that does not. "fire bomb" tedu@
* unidef DH, ECDH, and ECDSA. there's no purpose to a libssl without them.tedu2014-05-291-22/+0
| | | | ok deraadt jsing
* We don't really to keep history in constructs such as:miod2014-05-261-6/+1
| | | | | | | | #if 1 /* new with openssl 0.9.4 */ current code; #else obsolete code; #endif
* There are two actual uses of e_os2.h in libssl - an OPENSSL_GLOBAL (anjsing2014-05-221-1/+0
| | | | | | | | | empty define) and an OPENSSL_EXTERN (which is defined as, well... extern). The use of OPENSSL_EXTERN is already inconsistent since the lines above and below just use plain old "extern". Expand the two uses of these macros and stop including e_os2.h in libssl. ok miod@
* Replace all use of ERR_add_error_data with ERR_asprintf_error_data.beck2014-04-261-1/+1
| | | | | | | | This avoids a lot of ugly gymnastics to do snprintfs before sending the bag of strings to ERR, and eliminates at least one place in dso_dlfctn.c where it was being called with the incorrect number of arguments and using random things off the stack as addresses of strings. ok krw@, jsing@
* more malloc/realloc/calloc cleanups; ok beck kettenisderaadt2014-04-211-9/+3
|