summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/merge.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-09-07Below RETURN VALUES,schwarze1-10/+12
* mention that EVP_MD_CTX_md(3) also returns NULL if no message digest is configured yet; and * omplete the list of functions returning const EVP_MD *, also making the wording more precise. Delete EVP_MAX_MD_SIZE from the NAME, SYNOPSIS, and HISTORY sections because we do not usually document preprocessor macro constants in this way. There is nothing special about this constant justifying an exception.
2023-09-07add the missing entries for EVP_MD_CTX_pkey_ctx(3) and EVP_MD_CTX_md_data(3)schwarze1-1/+7
to the RETURN VALUES section
2023-09-07document EVP_MD_nid(3) and EVP_MD_name(3)schwarze1-4/+41
2023-09-07improve the descriptions of most functionsschwarze1-30/+45
2023-09-07Split two new manual pages EVP_MD_nid(3) and EVP_MD_CTX_ctrl(3)schwarze5-315/+501
out of the large EVP_DigestInit(3). No text change.
2023-09-06Mark EVP_CIPHER_set_asn1_iv() and EVP_CIPHER_get_asn1_iv() as intentionallyschwarze1-2/+7
undocumented because they are unused outside libcrypto according to codesearch.debian.net and should probably not be public: they seem hardly useful even for implementing custom EVP_CIPHER algorithms. tb@ came to similar conclusions regarding these two functions.
2023-09-06Initialize afi & safi to zerojob1-4/+5
OK tb@
2023-09-06Avoid use-of-uninitialized in i2r_IPAddrBlocks()tb1-1/+8
Reported by Viktor Szakats in https://github.com/libressl/portable/issues/910 ok job
2023-09-06Correct the RETURN VALUES of OBJ_add_object(3).schwarze1-6/+33
The text was misleading before and after the improvement in obj_dat.c rev. 1.61. The way i'm fixing the documentation here takes that improvement into account. Also add a CAVEATS section about adding incomplete objects.
2023-09-05add a BUGS section warning about the creation of incomplete objectsschwarze1-3/+22
2023-09-05Improve error handling in OBJ_add_object()tb1-13/+7
There is no need for a helper function to obfuscate lh_ADDED_OBJ_new(). Just call the real thing directly. Adding an object with a NID of NID_undef basically amounts to disabling a built-in OID. It does so in an incoherent fashion and the caller can't easily tell success from failure of the operation. Arguably the result is a corrupted objects table. Let's not allow adding such an object in an attempt at keeping things slightly more coherent. Issue noted and initial diff by schwarze while writing documentation ok schwarze
2023-09-05document EVP_CIPHER_name(3)schwarze1-2/+32
2023-09-05add the missing .Dv macros to the list of flagsschwarze1-13/+13
2023-09-05improve the descriptions of almost all flags,schwarze1-40/+101
in particular saying which API functions each flag affects
2023-09-05Partial rewrite:schwarze1-140/+231
* Integrate the leftovers of the former NOTES section into the main text, resulting in a more logical order of information. * Make many descriptions more precise and tweak many wordings. For example, the description of OBJ_cmp(3) was totally misleading. Add a CAVEATS section explaining the scary ownership contracts of the functions returning ASN1_OBJECT pointers. Move the discussion of NID_undef to the BUGS section because the statement "objects which are not in the table have the NID value NID_undef" was misleading in more than one way. Considering that an API as fundamental as this one contains such a gigantic amount of quirks and traps and gaps makes me shudder.
2023-09-04Make wp_local.h and cmll_local.h self-standingtb4-9/+12
2023-09-04unbreak build with llvm-16 by including sys/types.h for __BEGIN_HIDDEN_DECLSrobert2-2/+6
/usr/src/lib/libcrypto/whrlpool/wp_local.h:5:1: error: unknown type name '__BEGIN_HIDDEN_DECLS' ok tb@
2023-09-02whitespacetb1-2/+2
2023-09-02Align EVP_PKEY_get1_RSA() with EVP_PKEY_get0_RSA()tb1-6/+7
2023-09-01Many improvements, almost amounting to a partial rewrite:schwarze1-48/+109
* more precision what the CIPHER_CTX functions do * more precision what an NID is * avoid talking about RC2, use AES-256 for an example instead * clarify that block sizes are measured in bytes * mention additional restrictions regarding valid block sizes * add the missing description of the *_flags(3) functions * mention the public mask constant EVP_CIPH_MODE * add three missing modes that can occur as return values * add the missing entries for *_flags(3) and *_mode(3) below RETURN VALUES * tweak various wordings for precision and conciseness
2023-09-01Fix EVP_PKEY_get0_RSA() for RSA-PSStb1-6/+6
It currently returns NULL. This is OpenSSL 4088b926 + De Morgan. ok jsing
2023-09-01fix an obvious typo in the OBJ_NAME_add(3) prototypeschwarze1-3/+3
2023-08-31Split three new manual pages EVP_CIPHER_nid(3), EVP_CIPHER_CTX_ctrl(3),schwarze6-451/+727
and EVP_CIPHER_CTX_set_flags(3) out of the excessively large and unwieldy EVP_EncryptInit(3). This causes a number of inaccuracies and gaps to stand out, but i'm not mixing text changes or content additions into this split. Using very useful feedback from tb@ regarding what belongs together and how important the various functions are. I refrained from bothering him with the complete patch, but he likes the general direction.
2023-08-30Ensure no memory is leaked after passing NULL to ASN1_TIME_normalize()libressl-v3.8.1job2-2/+7
OK tb@
2023-08-30Document EVP_{CIPHER,MD}_do_all{,_sorted}(3)tb3-3/+139
The function prototypes in the SYNOPSIS don't look great, but schwarze assures me that this is how it is supposed to be. It is rather strange that OpenSSL chose to sprinkle OPENSSL_init_crypto() calls into these four functions rather than two inside OBJ_NAME_do_all{,_sorted}(3). Surely there was a good reason for that. With input and fixes from schwarze
2023-08-30Fix leaks in copy_issuer()tb1-8/+14
The stack of subject alternative names from the issuer is parsed using X509V3_EXT_d2i(), so it must be freed with sk_GENERAL_NAME_pop_free(). It's not worth doing complicated ownership handling when the individual alternative names can be copied with GENERAL_NAME_dup(). Previously, ialt and its remaining members would be leaked when the call to sk_GENERAL_NAME_push() failed halfway through. This is only reachable via the issuer:copy x509v3.cnf(5) directive. ok jsing
2023-08-29Replace last ecdh.h and ecdsa.h occurrences with ec.htb4-16/+12
Except if backward compatibility with older LibreSSL and OpenSSL versions is explicitly needed, ecdsa.h and ecdh.h should no longer be used. They are now trivial wrappers of ec.h.
2023-08-27Move the weak SHA-1 and MD5 hashes out of EVP_DigestInit(3)schwarze4-46/+138
into a new EVP_sha1(3) manual page, and also mention EVP_md4(3) there. Using input from tb@ and jsing@, who like the general direction.
2023-08-27document the return value of EVP_PKEY_asn1_find(3) andschwarze1-4/+20
the "len" argument and the return value of EVP_PKEY_asn1_find_str(3)
2023-08-27EVP_PKEY_set_type_str(3) is now documented, so switch from .Fn to .Xrschwarze1-3/+3
2023-08-27document EVP_PKEY_set_type_str(3)schwarze1-7/+46
2023-08-26add the missing information that and how flags can be combined,schwarze1-3/+7
and add the missing link to evp(3)
2023-08-26Write documentation for EVP_CIPHER_CTX_buf_noconst(3) from scratch.schwarze1-5/+42
Put it here rather than into EVP_EncryptInit(3) because similar to EVP_CIPHER_CTX_get_cipher_data(3), application software should not use it. These functions will likely not be needed except by people implementing custom encryption algorithms.
2023-08-26write documentation for EVP_CIPHER_CTX_copy(3)schwarze1-4/+86
and EVP_CIPHER_CTX_encrypting(3) from scratch
2023-08-26transfering -> transferringjsg1-3/+3
2023-08-26Remove two unnecessary local variablestb1-9/+3
2023-08-25make the one-line description read betterschwarze1-3/+13
and be more specific below RETURN VALUES; OK tb@
2023-08-25In evp.h rev.s 1.90 and 1.97, tb@ provided EVP_CIPHER_CTX_get_cipher_data(3)schwarze3-3/+114
and EVP_CIPHER_CTX_set_cipher_data(3). Import the manual page from the OpenSSL 1.1 branch, which is still under a free licence, with several improvements by me.
2023-08-25fix eight more instances of copy & paste glitchesschwarze1-9/+9
2023-08-25KNF, no assembly changeschwarze2-19/+15
OK tb@ jsing@
2023-08-25Mention another bug for EVP_add_{cipher,digest}(3)tb1-1/+4
2023-08-25Improve EVP_add_cipher.3 a bittb1-9/+26
Fix some copy-paste errors in the prototypes, tweak the explanatory text and add some more details.
2023-08-25Add more cross referencestb2-4/+7
2023-08-25Document EVP_add_{cipher,digest} and friendstb3-3/+163
These and EVP_{add,remove}_{cipher,digest}_alias() are mostly for internal use.
2023-08-25zap a stray spacetb1-2/+2
2023-08-24cms_content_bio() is not used outside of cms_lib.ctb2-5/+3
Make it a static function and remove its prototype from the internal header.
2023-08-24Some tweaking of cms_content_bio()tb1-10/+10
More idiomatic error checking and drop an always false test for !*pos. Use a slightly closer approximation to actual English sentences in comments. ok jsing
2023-08-24Better names for the BIOs in CMS_dataInit()tb1-14/+14
Rename cmsbio into cms_bio and use {,in_}content_bio for {,i}cont. ok jsing
2023-08-24Update references from RFC 7539 to RFC 8439tb3-10/+10
RFC 7539 was superseded by RFC 8439, incorporating errata and making editorial improvements. Very little of substance changed, in particular section numbers remain the same. Prompted by a question from schwarze
2023-08-24Align the documentation of EVP_chacha20() with actual behaviortb1-6/+6
Incorrect OpenSSL documentation was moved here and inherited parts of a comment that was fixed in evp/e_chacha.c r1.13. Adjust the manual page accordingly. Discussed with schwarze