summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_rsa.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix two more unchecked EVP_PKEY_assign() callstb2023-12-301-17/+25
| | | | | | | | | In SSL{_CTX}_use_RSAPrivateKey() switch from EVP_PKEY_assign_RSA() to EVP_PKEY_set1_RSA() and hold on to the reference of the the pkey for the duration of ssl_set_pkey(). Use single exit and other minor style cleanups. ok joshua jsing
* Hide all public symbols in libsslbeck2023-07-081-1/+22
| | | | | | With the guentherizer 9000 ok tb@
* Make internal header file names consistenttb2022-11-261-2/+2
| | | | | | | | | | | | | | | | 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
* Recommit -r1.45 but without error checking EVP_PKEY_copy_parameters()tb2022-08-311-4/+12
| | | | | | | | EVP_PKEY_copy_parameters() will unconditionally fail if the pkey's ameth has no copy_params(). Obviously this is indistinguishable from actual failure... ok jsing
* Revert r1.46. Causes fireworks in regress.tb2022-08-311-9/+5
|
* Avoid potential NULL dereference in ssl_set_pkey()tb2022-08-311-5/+9
| | | | | | | | | | | Switch from X509_get_pubkey() to X509_get0_pubkey() to avoid an unnecessary EVP_PKEY_free(). Check the return values of X509_get0_pubkey() and EVP_PKEY_copy_parameters(). If the former returns NULL, the latter will dereference NULL. CID 25020 ok jsing
* Rename use_* to ssl_use_* for consistency.tb2022-06-301-9/+10
| | | | discussed with jsing
* Make ssl_cert_add{0,1}_chain_cert() take ssl/ctxtb2022-06-291-6/+2
| | | | ok beck jsing
* ssl_cert_set{0,1}_chain() take ssl/ctxtb2022-06-291-2/+2
| | | | ok beck jsing
* Add a security check to ssl_set_cert()tb2022-06-291-1/+7
| | | | ok beck jsing
* Make ssl_set_{cert,pkey} take an ssl/ctxtb2022-06-291-12/+20
| | | | ok beck jsing
* Refactor use_certificate_chain_* to take ssl/ctx instead of a certtb2022-06-291-19/+33
| | | | ok beck jsing
* Cleanup/simplify ssl_cert_type()jsing2022-02-031-3/+3
| | | | | | | | Remove the X509 argument as it is unused - this was passed so that ssl_cert_type() can get the public key from the X509 object if the EVP_PKEY argument is NULL, however this is never the case. ok tb@
* Rename CERT to SSL_CERT and CERT_PKEY to SSL_CERT_PKEY.jsing2022-01-081-9/+9
| | | | | | | Nearly all structs in libssl start with an SSL_ suffix, rename CERT and CERT_PKEY for consistency. ok inoguchi@ tb@
* Stop using BIO_s_file_inernal() in libssl.tb2021-11-291-8/+8
| | | | | | | | BIO_s_file_internal() should never have leaked out of libcrypto, but it did. As a first step of getting rid of it, stop using it internally. ok jsing
* Simplify two weirdly formatted pieces of code in ssl_rsa.c and stoptb2021-11-261-27/+25
| | | | | | reaching into the EVP_PKEY struct. ok inoguchi jsing
* Unhandroll X509_up_ref()tb2021-10-231-2/+2
| | | | ok beck jsing
* Indent all labels with a single space.jsing2021-06-111-9/+9
| | | | | | This ensures that diff reports the correct function prototype. Prompted by tb@
* Make local header inclusion consistent.jsing2021-05-161-3/+3
| | | | | Consistently include local headers in the same location, using the same grouping/sorting across all files.
* Prepare to provide SSL_use_certificate_chain_file()tb2021-03-191-14/+36
| | | | | | | | | This is the same as SSL_CTX_use_certificate_chain_file() but for an SSL object instead of an SSL_CTX object. remi found this in a recent librelp update, so we need to provide it. The function will be exposed in an upcoming library bump. ok inoguchi on an earlier version, input/ok jsing
* Rework ssl_ctx_use_certificate_chain_bio() to use the CERT_PKEY chain.jsing2019-03-251-46/+26
| | | | | | | | | | This means that any additional CA certificates end up on the per certificate chain, rather than the single/shared extra_certs. Also simplify this code and in particular, avoid setting the return value to indicate success until we've actually succeeded. ok beck@ tb@
* Stop pretending that a cert member in a SSL and SSL_CTX can be NULL.jsing2018-11-081-25/+1
| | | | ok beck@ tb@
* OpenSSL started adding const to functions all over the place. Make alltb2018-04-251-16/+8
| | | | | | | | 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
* Change SSLerror() back to taking two args, with the first one being an SSL *.beck2017-02-071-52/+52
| | | | | | | | | 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
* 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-52/+52
| | | | | | | 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_pop_free() checks for NULL so do not bother doing it from the callers.jsing2017-01-241-5/+3
|
* move default_passwd_cb and default_passwd_cb_userdata back intobeck2017-01-231-17/+17
| | | | | | | the ssl_ctx from internal - these are used directly by python and openvpn and a few other things - we have the set accessors but the get accessors were added in 1.1 and these roll their own caveat OPENSSL_VERSION chickenpluckery
* Move most of the fields in SSL_CTX to internal - the ones that remain arejsing2017-01-231-7/+7
| | | | | | known to be in use. ok beck@
* Move callback function pointers and argument pointers from SSL_CTX tojsing2017-01-231-17/+17
| | | | | | internal. ok beck@
* X509_free(3) is NULL-safe, so remove NULL checks before its calls.mmcc2016-03-111-9/+5
| | | | ok doug@
* Rename SSL_CTX_use_certificate_chain() to SSL_CTX_use_certificate_chain_mem().reyk2015-02-061-2/+2
| | | | | As discussed with beck@ jsing@ and others OK beck@
* Remove trailing whitespace.jsing2014-12-141-7/+7
|
* Sort and group includes.jsing2014-11-161-3/+5
|
* Add a new API function SSL_CTX_use_certificate_chain() that allows toreyk2014-09-281-16/+48
| | | | | | | | | | | read the PEM-encoded certificate chain from memory instead of a file. This idea is derived from an older implementation in relayd that was needed to use the function with a privep'ed process in a chroot. Now it is time to get it into LibreSSL to make the API more privsep- friendly and to make it available for other programs and the ressl library. ok jsing@ miod@
* if (x) FOO_free(x) -> FOO_free(x).miod2014-07-121-3/+2
| | | | | | | Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
* KNF, particularly wrapped lines of calls to PEM_read_bio_FOO() andguenther2014-06-221-24/+44
| | | | | | multiline comments ok jsing@
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* BIO_free has an implicit NULL check, so do not bother checking for NULLjsing2014-06-071-14/+7
| | | | before calling it.
* Any sane platform has stdio. Stop pretending we will ever use a platformbeck2014-05-291-14/+0
| | | | | that does not. "fire bomb" tedu@
* always build in RSA and DSA. ok deraadt miodtedu2014-04-171-10/+0
|
* First pass at applying KNF to the OpenSSL code, which almost makes itjsing2014-04-141-466/+416
| | | | | readable. This pass is whitespace only and can readily be verified using tr and md5.
* Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.miod2014-04-131-5/+9
|
* resolve conflicts, fix local changesdjm2010-10-011-1/+1
|
* resolve conflictsdjm2008-09-061-75/+37
|
* resolve conflictsdjm2005-04-291-1/+1
|
* merge 0.9.7c; minor bugsfixes;markus2003-11-111-1/+3
| | | | | API addition: ERR_release_err_state_table [make includes before you build libssl/libcrypto]
* merge openssl-0.9.7-beta3, tested on vax by miod@markus2002-09-101-1/+1
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-21/+21
|
* OpenSSL 0.9.4 mergebeck1999-09-291-174/+158
|