summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-01-02Move down EVP_CIPHER_CTX accessors expose EVP_CIPHER internalstb1-38/+42
These confusingly named getters were added "for convenience" in 1.1. They fit best next to the EVP_CIPHER API.
2024-01-02Move the trivial EVP_CIPHER getters downtb1-31/+35
They are now below the CMS ASN.1 IV stuff, but above the EVP_CIPHER_meth* API, which are setters, in a way.
2024-01-02Simplify EVP_CIPHER_{asn1_to_param,parma_to_asn1}()tb1-17/+13
There's no need for a ret variable and else if/else
2024-01-02Move the EVP_CIPHER API that only exists for CMS/legacy a bit downtb1-121/+125
2024-01-02sm4: more NULL misspellingstb1-4/+4
2024-01-02Two spellings of key length are enoughtb1-6/+7
The API is called EVP_CIPHER_CTX_set_key_length() it has an argument called keylen and, the EVP_CIPHER_CTX's member is called key_len. One of the three is trivial to adjust, so do it.
2024-01-02Rename the poor outlier EVP_CIPHER *e into *ciphertb1-3/+3
2024-01-02Better variable names in EVP_CIPHER_type()tb1-7/+8
The EVP_CIPHER *ctx (yes) is renamed to cipher, otmp becomes an aobj. Change two !ptr to ptr == NULL checks.
2024-01-02Consistently use ctx for an EVP_CIPHER_CTXtb1-36/+36
Not c (which is most of the time an EVP_CIPHER) or a (?!).
2024-01-01Fix bounds check in EVP_PKEY_CTX_get_keygen_info()tb1-2/+2
Replace > with >= for the upper array bound to disallow a 4 byte overread. For RSA you can read the padding mode and for DH past the DH_PKEY_CTX. Unfortunately, Ruby thought it important to use this, so we can't kill it easily. ok miod
2024-01-01kill gross whitespacetb1-6/+6
2024-01-01pkey_is_pss() and pkey_ctx_is_pss() to rsa_ameth.ctb2-6/+6
These aren't particularly helpful and should probably both be expanded. For now move them to the only place where they are actually used.
2024-01-01Remove EVP_PKEY's save_type membertb2-6/+2
This was only used to avoid an ameth lookup in EVP_PKEY_set_type(), a micro-optimization that was removed in p_lib.c r1.48. ok jsing
2023-12-31KNF nittb1-2/+2
2023-12-31Sort the NIDs by nametb1-8/+8
requested by jsing
2023-12-31Replace the sorted extensions lookup with a switchtb1-58/+23
If all you have is OBJ_bsearch_(), everything looks like a nail. This changes a binary search over a list of 12 elements with a lookup via a switch. switch suggested by claudio ok jsing
2023-12-31Sprinkle a handfull of missing continuetb1-1/+10
2023-12-30Make x509_issuer_cache_free_oldest() statictb1-2/+2
This is an internal function and you can't hold the required mutex to call it anyway since that's internal, too.
2023-12-30Some Australians don't like voids eithertb1-3/+3
2023-12-30One more missing void was hiding heretb1-2/+2
2023-12-30Some BoringSSL devs spent too much time with C++tb2-4/+4
2023-12-30Add extended regress coverage for ASN.1 methodstb1-1/+147
Validate that every alias resolves to a non-alias in one step and that non-aliases have pkey_id == pkey_base_id, an info string and a pem_str. They can be looked up by their pkey_id or pem_str. Conversely, all these are false for aliases.
2023-12-30Fix two more unchecked EVP_PKEY_assign() callstb1-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
2023-12-29fix previous: key -> parametertb1-2/+2
2023-12-29A .Xr to DSA_generate_parameters_ex() was lost accidentallytb1-1/+2
2023-12-29Move DSA_generate_parameters.3 to DSA_generate_parameters_ex.3tb2-3/+3
2023-12-29Adjust documentation for upcoming DSA_generate_parameters removaltb5-70/+17
This removes any mention of DSA_generate_parameters in the manuals apart from a comment that it is intentionally undocumented and adapts cross references to DSA_generate_parameters_ex. The file itself will be moved in a second step.
2023-12-29ameth_lib: zap trailing empty linetb1-2/+1
2023-12-29eckey: adjust some variable names and unwrap function definitionstb1-11/+8
ok jsing
2023-12-29Clean up old_ec_priv_decode()tb1-10/+17
As per usual. Stylistic adjustments and missing error check. ok jsing
2023-12-29Clean up eckey_param_decode()tb1-9/+16
This aligns eckey's parameter decoding routine with the one of other cipher abstractions: better variable names, single exit and add missing check for EVP_PKEY_assign_EC_KEY(). ok jsing
2023-12-29Rework eckey_priv_decode()tb1-49/+53
Factor out the pubkey computation and bring it into more sensible form. This removes lots of pointless setting of errors (twice) and makes the code a bit easier on the eyes. Other than that perform some stylistic cleanup like single exit and add an error check for EVP_PKEY_assign(). ok jsing
2023-12-29Move a call to X509_ALGOR_get0() down a linetb1-2/+2
2023-12-29Neuter the SSL_set_debug(3) APItb4-21/+5
The TLSv1.3 stack didn't support this in the first place, and in the legacy stack it only added some dubious BIO_flush(3) calls. The sleep call between SSL_read(3) and SSL_write(3) advertised in the comment next to the flag has been a sleep call in the s_server since time immemorial, nota bene between calls to BIO_gets(3). Anyway. This can all go and what remains will go with the next major bump. ok jsing
2023-12-29Garbage collect the last users of SSL_set_debug(3)tb2-5/+2
This undocumented, incomplete public function has never done anything useful. It will be removed from libssl. Removing it from openssl(1) clears the way for this. ok jsing
2023-12-29s_client: pause hasn't worked in ages. Just ignore ittb2-13/+5
ok jsing
2023-12-29Move the EVP_PKEY_asn1_* API that will stay to evp/p_lib.ctb5-212/+260
Most of these functions are only called from this file internally apart from the pem_str lookups from pem/. In the next major bump we can then remove asn/ameth_lib.c. Also move EVP_PKEY_ASN1_METHOD to evp_local.h. While this is used to dispatch to various ASN.1 decoding routines, it doesn't fit into asn1/ at all.
2023-12-29Zap some whitespacetb1-2/+2
2023-12-29Replace outdated comment on EVP_PKEY_asn1_find() with a todo itemtb1-5/+5
2023-12-29Move EVP_PKEY_asn1_add* to the end of the filetb1-15/+20
Also add a reminder to remove most of the public API in this file.
2023-12-29Move the EVP_MD block size accessor downtb1-7/+11
This way all the EVP_MD accessors are in the order of the struct fields. Well, arguably the EVP_MD_meth* should come first, but they are scheduled to go meet the dodo.
2023-12-29Move the EVP_MD_CTX flag accessors up a bittb1-19/+19
This way the accessors are sorted the same way as the struct.
2023-12-29Hoist EVP_MD_CTX accessors to after EVP_MD_CTX_ctrltb1-63/+62
This way the file has EVP_Digest*, then EVP_MD_CTX new/free/clean, then ctrl then the EVP_MD_CTX accessors, then the EVP_MD accessors and finally the EVP_MD_meth stuff and the order of things starts making a wee bit of sense.
2023-12-29Move init/reset next to cleanuptb1-13/+13
This way new/free aka create/destroy are next to each other. reset/cleanup are the same thing and init will join the club after some other fixing because two APIs that do the exact same thing aren't enough.
2023-12-29Move the copy/copy_ex stuff down below the new/free/clear messtb1-63/+64
2023-12-29Merge the EVP_CIPHER_meth_* API into evp_cipher.ctb3-188/+176
2023-12-29Merge the remainder of evp_lib.c into evp_cipher.ctb3-367/+299
2023-12-29Move the middle part of evp_lib.c to evp_digest.ctb2-205/+205
These are ~200 lines of EVP_MD API that separated two parts of the file dedicated to EVP_CIPHER thingies.
2023-12-29Use more consistent naming for some files in evptb4-7/+7
EVP_Digest{Init,Update,Final}() move from digest.c to evp_digest.c which will become the home of all things related to EVP_MD{,_CTX} handling. EVP_Cipher{Init,Update,Final}() move from evp_enc.c to evp_cipher.c which will become the home of all things related to EVP_CIPHER{,_CTX} handling. EVP_Encode{Init,Update,Final}() move from encode.c to evp_encode.c which already is the home of EVP_ENCODE_CTX_{new,free}(). discussed with jsing
2023-12-29Use a void pointer rather than char for method_datatb2-9/+7
This way we don't need to cast from BY_DIR * to char * and back in its only consumer, the lovely by_dir.