summaryrefslogtreecommitdiff
path: root/src/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Document ENGINE_{get,set}_ECtb2023-07-211-29/+17
| | | | | | | ENGINE_{get,set}_{ECDH,ECDSA} will go away and won't come back. Replace their documentation with the missing ENGINE_{get,set}_EC. In the unlikely event that we will need to bring back ENGINE after the next bump, this manual will not be outdated and incomplete.
* Remove some ancient cruft that hasn't been used in agestb2023-07-204-1695/+1
| | | | discussed with jsing
* Move get_rfc3526_prime_8192.3 to BN_get_rfc3526_prime_8192.3tb2023-07-202-4/+4
| | | | | This way we will have a manual corresponding to an existing function after the next bump.
* Remove unnecessary inclusion of dso.htb2023-07-203-6/+3
|
* Remove last internal consumer of DSOtb2023-07-201-80/+9
| | | | | | | | | | | | It is currently possible to extend libcrypto by having it load a shared object via dlopen() either from a config file on library initialization or when an application calls the relevant API. Recent and not so recent events showed how dangerous an idea dlopen() is. Independently of such concerns, this should not be handled in the characteristically convoluted way of this toolkit. DSO will go away in the upcoming bump. This commit clears the road for a plain cvs rm of the dso code. ok jsing
* eng_aesni.c: add evp_local.h so it compiles again.tb2023-07-201-1/+3
|
* Remove get_rfc*_prime_* documentationtb2023-07-202-46/+20
| | | | | | Their BN_get_rfc*_prime_* aliases from the OpenSSL 1.1 API will remain. Perhaps the manual should be moved to BN_get_rfc3526_prime_8192.3; that can be done in a second step.
* Remove ECDSA_{do_,}sign_ex() and ECDSA_sign_setup()tb2023-07-204-103/+20
| | | | | These very poorly designed interfaces will go away, so stop documenting them.
* Cap the size of numbers we check for primalitytb2023-07-201-1/+12
| | | | | | | | | | | We refuse to generate RSA keys larger than 16k and DH keys larger than 10k. Primality checking with adversarial input is a DoS vector, so simply don't do this. Introduce a cap of 32k for numbers we try to test for primality, which should be more than large enough for use withing a non-toolkit crypto library. This is one way of mitigating the DH_check()/EVP_PKEY_param_check() issue. ok jsing miod
* Fix two aliases in libcrypto spotted by the new symbols testtb2023-07-192-3/+4
| | | | ok jsing
* Mop up MD32_XARRAY from md5.jsing2023-07-151-91/+84
| | | | | | | MD32_XARRAY was added as a workaround for a broken HP C compiler (circa 1999). Clean it up to simplify the code. No change in generated assembly.
* Mop up MD32_XARRAY from md4.jsing2023-07-151-75/+68
| | | | | | | MD32_XARRAY was added as a workaround for a broken HP C compiler (circa 1999). Clean it up to simplify the code. No change in generated assembly.
* Refactor ASN1_item_sign_ctx()tb2023-07-131-54/+89
| | | | | | | | | | | | | | | | | | | | | | Oh, joy! The muppets had a feast: they could combine the horrors of EVP with X.509... Return values between -1 and 3 indicating how much work needs to be done, depending on whether methods are present or absent. Needless to say that RSA and EdDSA had inconsistent return values until recently. Instead of interleaving if/else branches, split out two helper functions that do essentially independent things, which results in something that isn't entirely bad. Well, at least not compared to the surrounding code. asn1_item_set_algorithm_identifiers() extracts the signature algorithm from the digest and pkey if known, and sets it on the two X509_ALGOR that may or may not have been passed in. asn1_item_sign() converts data into der and signs. Of course there were also a few leaks and missing error checks. ok jsing
* Revert accidental addition of cofactor ECDH supporttb2023-07-121-16/+2
| | | | This snuck in with ech_key.c r1.33 because I committed from a dirty tree.
* 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
* Rename EC_KEY from r to key like in the rest of the filetb2023-07-101-4/+4
|
* Pull BIGNUM constants out of get_* function bodiestb2023-07-101-315/+331
| | | | | | | | | The get_rfc*_prime_* functions will be removed. The constants will remain for the BN_get_rfc*_prime_* functions. Make the latter call BN_bin2bn() directly on these constants rather than going through get_*. This avoids some overlong lines. Also KNF for some comments. Reduces the diff I currently carry by quite a bit.
* BIO_indent: use %*s rather than puts in a looptb2023-07-101-6/+5
| | | | ok beck jsing millert
* bn_print: string.h is no longer neededtb2023-07-101-2/+1
|
* Fix ndef_{prefix,suffix}()tb2023-07-091-11/+12
| | | | | | | | | These functions inline a poor version of asn1_item_flags_i2d() without error checks. This can be replaced with a single correct call to ASN1_item_ndef_i2d(). Mechanically adding malloc checks and checks for negative did not really improve things all that much in a related project. ok beck jsing
* Reimplement BN_print() and BN_print_fp()tb2023-07-092-47/+45
| | | | | | | | These can now use the internal version of BN_bn2hex() and be direct wrappers of BIO_printf() and fprintf() as they should have been all along. ok jsing
* Simplify bn_print()tb2023-07-091-5/+3
| | | | | | | We no longer need to do weird things as taking the length of the hex string and jumping over a sign we didn't need. ok jsing
* Refactor BN_bn2hex()tb2023-07-092-8/+57
| | | | | | | | | Various outputting functions are variants of BN_bn2hex(). They do not want a sign or they display the BIGNUM at nibble granularity instead of byte granularity. So add this functionality to an internal variant of BN_bn2hex(). with/ok jsing
* Provide optimised bn_subw() for riscv64.jsing2023-07-091-1/+18
|
* Provide optimised bn_addw() for riscv64.jsing2023-07-091-1/+18
|
* Add Xr to EVP_MD_meth_new to top level librarytb2023-07-091-2/+3
|
* Fix OpenBSD releasetb2023-07-091-3/+3
|
* ASN1_bn_print() will be removed soon. Remove docs.tb2023-07-095-130/+7
|
* fix comment to unbreak things that care about warningsbeck2023-07-081-2/+2
| | | | ok tb@ krw@
* link EVP_MD_meth_new.3 to buildtb2023-07-081-1/+2
|
* Import EVP_MD_meth_new.3 from OpenSSL 1.1.1 headtb2023-07-081-0/+292
| | | | | | | As usual, this has a lot of room for improvement, but it is better than nothing at all. It leaves a dangling reference to EVP_MD_CTX_md_data(), which I leave for schwarze to document. This is a terrible API and the way it is used in the wild is terrifying.
* Hide all public symbols in libsslbeck2023-07-0821-33/+828
| | | | | | With the guentherizer 9000 ok tb@
* Hide symbols in dhbeck2023-07-089-7/+171
| | | | ok tb@
* Hide symbols in curve22519beck2023-07-083-1/+45
| | | | ok tb@
* Hide symbols in modes.hbeck2023-07-089-7/+120
| | | | ok tb@
* Hit modes with the loving mallet of knfmtbeck2023-07-089-1164/+1342
| | | | ok tb@
* Hide symbols in gost.beck2023-07-089-5/+160
| | | | ok tb@ after some puking in his mouth.
* hide symbols in dsabeck2023-07-0810-8/+232
| | | | ok tb@
* Hide symbols in cmacbeck2023-07-083-1/+57
| | | | ok tb@
* Hide symbols in objectsbeck2023-07-087-5/+130
| | | | ok tb@
* Hide symbols in rsabeck2023-07-0818-18/+384
| | | | ok tb@
* Hide symbols in shabeck2023-07-085-3/+101
| | | | ok tb@
* Hide symbols in bnbeck2023-07-0820-18/+449
| | | | ok tb@
* Hide symbols in txt_dbbeck2023-07-083-1/+48
| | | | ok tb@
* Hide symbols in md4 and md5beck2023-07-087-6/+92
| | | | ok tb@
* Hide symbols in cast, idea, and ocspbeck2023-07-0823-20/+630
| | | | ok tb@
* Hide symbols in crypto.hbeck2023-07-0810-8/+190
| | | | ok jsing@
* Hide symbols in cms, comp, conf, and bufferbeck2023-07-0824-19/+546
| | | | ok jsing@
* Remove unused SHA-1 implementation.jsing2023-07-081-86/+1
|
* Remove now unnecessary "do { } while (0)"jsing2023-07-081-4/+2
|