summaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Two files did not want to go away. Go!tb2023-07-282-0/+0
|
* Remove various ${thing}_optionstb2023-07-2812-224/+7
| | | | | | | | | | Various, ancient ciphers exposed some of their innards via an _options() API. Apart from openssl version/speed, only some lua thingie in nmap ever looked at these. Go figure. hppa testing by miod, i386 testing by sthen. Thanks! ok jsing
* Remove more ASN1_BIT_STRING APItb2023-07-285-72/+3
| | | | | | | | | This removes ASN1_BIT_STRING_name_print(), ASN1_BIT_STRING_{num,set}_asc(). Before trust was properly handled using OIDs, there was a period where it used bit strings. The actual interfaces used in openssl x509 were removed, but the functions they wrapped remained unused for the next 24 years. ok jsing
* Remove ASN1_BIT_STRING_checktb2023-07-285-35/+3
| | | | | | | | This was added with the TS code for no discernible reason. I could not find a single consumer. In the unlikely event that you need this, it is easy enough to write a better version of it yourself. ok jsing
* Provide CMS{,_SignerInfo}_get_versiontb2023-07-284-3/+53
| | | | | | | Add accessors for the syntax versions of ContentInfo and SignerInfo. These will be used soon in rpki-client for some more compliance checks. ok job jsing
* Remove sk_nid_triple_*()tb2023-07-281-23/+1
| | | | | | | The nid_triple stack is no more. Its type never was part of the public API. Why its stack macros were will remain a mystery. ok jsing
* Remove OBJ_add_sigid() and OBJ_sigid_free()tb2023-07-285-24/+3
| | | | | | | | Another bit of unused extensibility that was responsible for a lot of complexity until recently. This removes the remaining stubs from the public API. ok jsing
* Remove more ERR crufttb2023-07-285-40/+3
| | | | | | | Ever wondered how many entries populate the various err hashes? Me neither. Remove this garbage. ok jsing
* Remove ERR_{get,set}_implementation()tb2023-07-286-48/+6
| | | | | | | Much like ex_data, applications can make the library use their own error stack implementation. Well, except as of right now they no longer can. ok jsing
* Make ex_data implementations internaltb2023-07-286-114/+41
| | | | | | | | | | | | | To state the obvious: library suffers from way too much extensibility. In theory, applications can implement their own ex_data implementation. In practice, none did. A glance at ex_data.c might give an idea as to why. Make this internal so this particular turd can be replaced with something slightly saner. Also sync up the CRYPTO_EX_INDEX_* defines with OpenSSL - at least the parts we support. ok jsing
* Remove BUF_[a-z]* APItb2023-07-284-104/+2
| | | | | | | | This are a bunch of strange string handlers with NULL checks that make no real sense except to some devs who like to sprinkle them everywhere. Fortunately, nothing uses these anymore, so they can go. ok jsing
* Drop BIO_n{read,write}{,0}()tb2023-07-284-268/+3
| | | | | | | | | | | | | | | | | | This is one of those strange things that should never have made it into a security-oriented libraries. From BIO_s_bio.3: .\" The following non-copying I/O functions are intentionally undocumented .\" because they seem fragile and unused by anything: It was used in a single place: the gorgeous ssltest. I'm not smart enough to follow. Also: /* WARNING: The non-copying interface is largely untested as of yet * and may contain bugs. */ Oh, really? Into the great bitbucket in the sky you go. ok jsing
* Remove the get_rfc*_prime_*() APItb2023-07-285-91/+3
| | | | | | | Inconsistently named with the rest of the API, so OpenSSL 1.1 introduced the same functions with a BN_ prefix. We'll keep the latter. ok jsing
* Make BN_BLINDING internaltb2023-07-2811-79/+33
| | | | | | | | | | RSA is pretty bad. In my most optimistic moments I dream of a world that stopped using it. That won't happen during my lifetime, unfortunately. Blinding is one way of making it a little less leaky. Unfortunately this side-channel leak mitigation leaked out of the library for no good reason. Let's at least fix that aspect of it. ok jsing
* Remove ASN1_bn_print() and ASN1_buf_print()tb2023-07-286-160/+3
| | | | | | | | | | ASN1_bn_print() is a hilariously bad API that was replaced with a saner interface internally. ASN1_buf_print() isn't terrible, but it is too specialized to be of real use. It was only exposed because ASN1_bn_print() was already there. Its only use had been in the EdDSA printing code before it was replaced with an internal helper. ok jsing
* Make ASN1_{primitive,template}_* internaltb2023-07-2810-63/+16
| | | | | | | These were long removed from the public OpenSSL API, so we can do the same. Remove ASN1_template_{d2i,i2d}() - those are unused internally. ok jsing
* Make ASN.1 BIO internaltb2023-07-289-84/+15
| | | | | | | | | | | | With every bump we can remove a bit more of the ASN.1 BIO and the streaming interface. At some point enough will be internal so that we can rewrite it and bring it in a shape where mere mortals can follow all the twists and turns. This is the next step: BIO_f_asn1(3) goes away and takes BIO_asn1_{get,set}_{prefix,suffix}() with it, a bunch of functions helping along in a write-after-free recently. The getters go away, the setters stay for now. ok jsing
* Set OPENSSL_NO_ENGINE, remove engine codetb2023-07-2833-4967/+9
| | | | | | | | | | 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
* Drop DSO and define OPENSSL_NO_DSOtb2023-07-2812-1588/+5
| | | | | | | | DSO and in particular dlopen() was used for dynamic engines, which we removed a long time ago and for dynamic conf modules, which we removed only very recently. Now remove this dangerous interface. ok jsing
* Drop the comp moduletb2023-07-2810-958/+5
| | | | | | | | | | | opensslfeatures.h has long defined OPENSSL_NO_COMP and the build with ZLIB was broken in openssl(1) since 2015 and in libcrypto since 2022. ZLIB was unifdefed a while ago, now we can retire the public API. The comp.h header stays devoid of code because a number of ports use it for historic reasons. ok jsing
* Remove some unneeded includes from ecdh.ctb2023-07-281-4/+1
|
* Pull up zeroing of out; drop unnecessary checktb2023-07-281-4/+3
| | | | | | | Move the zeroing of the output buffer a few lines up and remove an unnecessary check. requested/ok jsing
* Rename buflen to buf_len, use calloc/freezerotb2023-07-281-7/+8
| | | | | | | Some cosmetic tweaks in ecdh_compute_key(). Rename buflen to buf_len to match out_len, use calloc() and freezero(). ok jsing
* Move KDF handling to ECDH_compute_key()tb2023-07-285-47/+73
| | | | | | | | | | In OpenSSL e2285d87, the KDF handling was moved from the compute_key() method into the public API. A consequence of this change is that the ECDH_compute_key() API no longer returns -1 for some errors. Existing checks for <= 0 are safe as are those checking for the exact length as return value, which is all what the ecosystem seems to be doing. ok jsing
* Merge ecdh.h into ec.htb2023-07-284-124/+12
| | | | | | | The remaining two ECDH interfaces are relocated into ec.h. ecdh.h remains. It does nothing but include ec.h. ok jsing
* Excise ECDH_METHODtb2023-07-2813-369/+9
| | | | | | | | Unlike ECDSA_METHOD, this has been unused forever but kind of needed to stay for symmetry with ECDSA_METHOD. Now we can finally take it behind the barn and remove its tendrils into ENGINE. ok jsing
* Remove ECDH errorstb2023-07-286-123/+3
| | | | | | | Much like the ECDSA errors, the ECDH errors have been unused for a while. Garbage collect them. ok jsing
* Remove some unneeded includes from ecdsa.htb2023-07-281-5/+1
|
* Merge ecdsa.h into ec.htb2023-07-284-186/+70
| | | | | | | | | Move the remaining ECDSA API into ec.h to match OpenSSL 1.1's interface better. In particular, the EC_KEY sign and verify method accessors are moved to the right header. Whether the rest of the ECDSA stuff belongs there is debatable, but that was upstream's choice. ok jsing
* Remove ECDSA_METHODtb2023-07-2813-345/+9
| | | | | | | | After smtpd (in base) and libtls finally switched from ECDSA_METHOD to EC_KEY_METHOD, much of the ECDSA_METHOD code was neutered. Remove the remaining public API as well as numerous tentacles into ENGINE. ok jsing
* Remove ecs_err.ctb2023-07-287-132/+4
| | | | | | | These error codes have been unused for a while, so the public API loading them is pointless. ok jsing
* Place public ECDSA API next to the internal methodstb2023-07-281-51/+48
| | | | | | | | | | It is hard to remember that ECDSA_do_{sign,verify}() call ecdsa_sign_sig(). Especially since the distinction to ECDSA_{sign,verify}() isn't clear from the names. To add to the confusion, the public API is ordered differently than the methods they call. So in this case it seems tidier to place the public API next to the methods. ok jsing
* Remove ECDSA_{do_,}sign_ex()tb2023-07-281-57/+20
| | | | | | | | | | | | | There is no reason to keep these. It is cleaner to keep ECDSA_sign_setup() but remove the logic for passed-in kinv and r. Refuse to cooperate as far as possible. Someone could still implement their own versions of ECDSA_{do_,}_sign_ex() and ECDSA_sign_setup() by leveraging EC_KEY_METHOD_get_sign() and building their own wrappers. We can't make such an implementation of ECDSA_sign_setup() fail, but we make the actual signing fail since we no longer "do the right thing". ok jsing
* Make extended ECDSA signing routines internaltb2023-07-285-25/+14
| | | | | | | | | | | | | | | | | | ECDSA_sign_setup() permits precomputing the values of the inverse of the random k and the corresponding r. These can then be fed into the signing routines ECDSA_{do_,}sign_ex() multiple times if needed. This is not a great idea and the interface adds a lot of unwanted complexity. Not to mention that nothing ever used this correctly - if s works out to 0, a special error code is thrown requesting that the caller provide new kinv and r values. Unsurprisingly, nobody ever checked for that special error code. ok jsing This commit marks the start of a libcrypto major bump. Do not build the tree until I bumped the shlib_version and synced file sets (in about 35 commits).
* Remove ASN1_BIT_STRING_set docotb2023-07-281-42/+2
|
* Remove stale .Xr missed in previoustb2023-07-281-3/+2
|
* Remove ASN1_BIT_STRING_num_asc.3tb2023-07-283-151/+3
|
* Prepare the ssltest for the upcoming bumptb2023-07-271-1/+8
| | | | | | | This is a hack. The test is in rather poor shape and it is hard to tell whether it still does what it is supposed to be doing. Hopefully somemone will rewrite this in a style that doesn't make me squeal on opening this file...
* Remove antiquated options outputtb2023-07-273-44/+7
| | | | | | | | This is uninteresting and rather meaningless except for the implementer. No need to have several hundred lines of code backing half a dozen symbols in the public API for this. ok jsing
* Annotate bogus output as incorrecttb2023-07-271-1/+2
| | | | | | Some people already have way too many simple and not too important diffs in their inbox. This isn't worth kicking something more important out of the queue.
* Fix two mandoc -Tlint warnings left in previoustb2023-07-271-4/+3
|
* Fix typotb2023-07-271-3/+3
|
* Prepare this test for the upcoming bumptb2023-07-261-1/+3
|
* Remove comment containing an outdated pathtb2023-07-261-2/+1
|
* Remove ERR_get_{err_state,string}_table documentationtb2023-07-261-6/+2
|
* Remove BUF_reverse and BUF_strdup documentationtb2023-07-261-53/+2
|
* BN_BLINDING will be made internal-only. Remove its documentationtb2023-07-264-325/+5
|
* BIO_f_asn1 and the prefix/suffix API will be removedtb2023-07-265-244/+14
| | | | | | Remove their documentation and mark some associated constants as intentionally undocumented until they will be removed from public headers.
* Document CMS_SignerInfos_get_version and CMS_get_version which willtb2023-07-262-4/+53
| | | | be added in the upcoming bump.
* Tweak EC_GROUP_check_discriminant()tb2023-07-261-28/+28
| | | | | | | | Make the logic and control flow a bit more explicit and use a single extra variable for computing the discriminant. Call it discriminant, not tmp, tmp_1 or tmp_2. ok jsing