summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2019-10-31In rsa_pmeth.c rev. 1.30, jsing@ set the minimum RSA key lengthIngo Schwarze
for RSA key generation to 512 bits. Document that minimum.
2019-10-31Add CMS controls for RSA.Joel Sing
2019-10-31Add support for RSA-PSS.Joel Sing
From OpenSSL 1.1.1d. ok inoguchi@
2019-10-31Move RSA min modulus to a define and increase from 256 to 512 bits.Joel Sing
From OpenSSL 1.1.1d. ok inoguchi@
2019-10-31Fix indent and indent before labels.Joel Sing
2019-10-31Use braces where a statement has both multi-line and single-line blocks.Joel Sing
Makes code more robust and reduces differences with OpenSSL. ok inoguchi@
2019-10-31Add additional validation of key size, message digest size and publicJoel Sing
exponent. From OpenSSL 1.1.1d. ok inoguchi@
2019-10-31Clean up some code.Joel Sing
Assign and test, explicitly test against NULL and use calloc() rather than malloc. ok inoguchi@
2019-10-31Avoid potentially leaking pub_exp in pkey_rsa_copy().Joel Sing
ok inoguchi@
2019-10-30Fix declaration of S1 by swapping misplaced ',' and ';'.Theo Buehler
This is inside !(defined(__amd64__) || defined(__i386__)), while the file is only used on those two architectures. "Free commit! No strings attached! No hidden tricks!" from miod
2019-10-29In rsa.h rev. 1.41, jsing@ provided RSA_pkey_ctx_ctrl(3).Ingo Schwarze
Write the documentation from scratch.
2019-10-29merge documentation for several macros EVP_PKEY_CTX_*_rsa_oaep_*(3)Ingo Schwarze
and EVP_PKEY_CTX_*_ecdh_*(3); from Antoine Salon <asalon at vmware dot com> via OpenSSL commit 87103969 Oct 1 14:11:57 2018 -0700 from the OpenSSL 1.1.1 branch, which is still under a free license
2019-10-29merge documentation for EVP_PKEY_CTX_set1_id(3), EVP_PKEY_CTX_get1_id(3),Ingo Schwarze
and EVP_PKEY_CTX_get1_id_len(3), but make it sound more like English text; from Paul Yang via OpenSSL commit f922dac8 Sep 6 10:36:11 2018 +0800 from the OpenSSL 1.1.1 branch, which is still under a free license
2019-10-29merge documentation of EVP_PKEY_CTX_set_ec_param_enc(3)Ingo Schwarze
from Stephen Henson via OpenSSL commit 146ca72c Feb 19 14:35:43 2015 +0000
2019-10-29correct HISTORY of some RSA control macrosIngo Schwarze
2019-10-29list supported algorithm ids and clarify how the engine argument is usedIngo Schwarze
2019-10-29Add two controls that were missed in the previous commit.Joel Sing
2019-10-29Update RSA OAEP code.Joel Sing
This syncs the RSA OAEP code with OpenSSL 1.1.1d, correctly handling OAEP padding and providing various OAEP related controls. ok inoguchi@ tb@
2019-10-29Provide EVP_PKEY_CTX_md().Joel Sing
This handles controls with a message digest by name, looks up the message digest and then proxies the control through with the EVP_MD *. This is internal only for now and will be used in upcoming RSA related changes. Based on OpenSSL 1.1.1d. ok inoguchi@ tb@
2019-10-29mobileip(4) is going to the atticDavid Gwynne
2019-10-27Mark the _Qp_{mul,div,add,sub} functions as 'protected' to eliminatePhilip Guenther
PLT entries and prevent overriding ok kettenis@ deraadt@
2019-10-26Stop exporting the internal _mcount symbol as that's only referencedPhilip Guenther
by the ASM stub, which is also in libc. The compiler only generates invocations of the latter. ok mpi@ deraadt@ kettenis@
2019-10-25Free maskHash when RSA_PSS_PARAMS is freed.Joel Sing
ok tb@
2019-10-25Adjust whitespace, so Ta macros are aligned vertically as already done inTheo Buehler
ober_add_string.3 and as it was before the ber -> ober rename.
2019-10-24Provide ASN1_TYPE_{,un}pack_sequence().Joel Sing
These are internal only for now. Based on OpenSSL 1.1.1d. ok inoguchi@
2019-10-24Provide RSA_OAEP_PARAMS along with ASN.1 encoding/decoding.Joel Sing
For now these are internal only. From OpenSSL 1.1.1d. ok inoguchi@
2019-10-24Bump libcrypto, libssl and libtls majors due to changes in struct sizesJoel Sing
and symbol addition.
2019-10-24Add RSA_PSS_PARAMS pointer to RSA struct.Joel Sing
This will be used by upcoming RSA-PSS code. ok tb@
2019-10-24Add maskHash field to RSA_PSS_PARAMS.Joel Sing
This will be soon used as an optimisation and reduces the differences between OpenSSL. ok tb@
2019-10-24Provide RSA_pkey_ctx_ctrl().Joel Sing
This is a wrapper around EVP_PKEY_CTX_ctrl() which requires the key to be either RSA or RSA-PSS. From OpenSSL 1.1.1d. ok tb@
2019-10-24Add EVP_PKEY_RSA_PSS.Joel Sing
ok tb@
2019-10-24The ber_* namespace is used by liblber since time immemorial,Theo Buehler
so move our BER API to the unused ober_* prefix to avoid some breakage in ports. Problem diagnosed by jmatthew with ber_free() in samba, but there are many others as pointed out by sthen. tests & ok rob ok sthen (who had an almost identical diff for libutil) "go head hit it" deraadt
2019-10-24Backout previous synch.h commit (r1.5, "Use process-private futexes to avoidStuart Henderson
the uvm_map lookup overhead"). This causes hangs with Python, seen easily by trying to build ports/graphics/py-Pillow.
2019-10-24Allow the caller of asr functions to create and use a specific context.Otto Moerbeek
Diff from eric@ and florian@, commiting on their behalf since they are absent and we want to ride the minor shlib bump.
2019-10-23Unexport __floatundidf.Mark Kettenis
ok deraadt@
2019-10-22struct proc: change ps_start from utc time to uptimecheloha
Allows us to determine how long a process has been running, even if the UTC clock jumps. With help from bluhm@ and millert@, who squashed several bugs. ok bluhm@ millert@
2019-10-21Use process-private futexes to avoid the uvm_map lookup overhead.Martin Pieuchot
While here kill unused _wait() function. ok visa@
2019-10-21Kill unused _wait() function.Martin Pieuchot
ok visa@
2019-10-18setting uid to -1 won't work with setresuid, so detect that conditionTed Unangst
and return an error instead. may prevent some unset/missing confusion. ok deraadt millert
2019-10-17Sync RSA_padding_check_PKCS1_OAEP_mgf1().Joel Sing
Update RSA_padding_check_PKCS1_OAEP_mgf1() with code from OpenSSL 1.1.1d (with some improvements/corrections to comments). This brings in code to make the padding check constant time. ok inoguchi@ tb@
2019-10-17Provide err_clear_last_constant_time() as a way of clearing an error fromJoel Sing
the top of the error stack in constant time. This will be used by upcoming RSA changes. From OpenSSL 1.1.1d. ok inoguchi@ tb@
2019-10-10bump internal version to 3.0.2Brent Cook
2019-10-10bump to 3.0.2Brent Cook
2019-10-09Use EVP_MAX_MD_SIZE instead of SHA_DIGEST_LENGTH and remove OPENSSL_NO_SHA*Joel Sing
conditionals, now that this code handles arbitrary message digests. ok inoguchi@ tb@
2019-10-08convert unbounded sprintf/strcpy (in disabled debug code) to snprintf/strlcpyTheo de Raadt
2019-10-05The mips64 symbol table layout means we have to consider symbol visibilityPhilip Guenther
and skip 'protected' symbols when identifying which functions will be subjects of lazy resolution
2019-10-05Get the architecture from the ELF header instead of running uname,Philip Guenther
so that we can operate on libs from other archs
2019-10-04Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey.Theo Buehler
(Note that the CMS code is currently disabled.) Port of Edlinger's Fix for CVE-2019-1563 from OpenSSL 1.1.1 (old license) tests from bluhm@ ok jsing commit e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f Author: Bernd Edlinger <bernd.edlinger@hotmail.de> Date: Sun Sep 1 00:16:28 2019 +0200 Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey An attack is simple, if the first CMS_recipientInfo is valid but the second CMS_recipientInfo is chosen ciphertext. If the second recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct encryption key will be replaced by garbage, and the message cannot be decoded, but if the RSA decryption fails, the correct encryption key is used and the recipient will not notice the attack. As a work around for this potential attack the length of the decrypted key must be equal to the cipher default key length, in case the certifiate is not given and all recipientInfo are tried out. The old behaviour can be re-enabled in the CMS code by setting the CMS_DEBUG_DECRYPT flag. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9777) (cherry picked from commit 5840ed0cd1e6487d247efbc1a04136a41d7b3a37)
2019-10-04Use a valid curve when constructing an EC_KEY that looks like X25519.Joel Sing
The recent EC group cofactor change results in stricter validation, which causes the EC_GROUP_set_generator() call to fail. Issue reported and fix tested by rsadowski@ ok tb@
2019-10-04Provide internal RSA_padding_{add,check}_PKCS1_OAEP_mgf1() functions.Joel Sing
These are internal only for now and will be made public at a later date. The RSA_padding_{add,check}_PKCS1_OAEP() functions become wrappers around the *_mgf1() variant. ok tb@ inoguchi@ (as part of a larger diff)