summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove assert from extract_min_max()tb2021-12-241-3/+1
| | | | | | All callers ensure that aor != NULL, so this isn't necessary. ok jsing
* Fix indent of a comment.tb2021-12-241-2/+2
|
* Remove asserts from addr_validate_path_internal()tb2021-12-241-9/+19
| | | | | | | | | | This is reachable from x509_verify(), but all asserts are previously checked in the caller. Turn them into error checks and make sure the error is set on the X509_STORE_CTX if present. Change some stack == NULL || sk_num(stack) == 0 checks into sk_num(stack) <= 0 which is equivalent but simpler. ok jsing
* Turn assert in X509v3_addr_canonize() into an error check.tb2021-12-241-3/+5
| | | | | | | All internal callers check the return value and future external callers will be happy not to hit an assert from the library. ok jsing
* Fully check the second strtoul() call in v2i_IPAddrBlocks()tb2021-12-231-3/+34
| | | | | | | | | This can read a value in an arbitrary base from a string that is supposed to be followed by whitespace or a colon, so it cannot be switched to strtonum(). The current checks don't allow a read past the end, but let's use the standard idiom instead. ok jsing
* Fix an arbitrary out-of-bounds stack read in v2i_IPAddrBlocks()tb2021-12-231-3/+7
| | | | | | | | | | | | | | | | | | | | | | | Switch an insufficiently checked strtoul() to strtonum(). This can be used to trigger a read of a user-controlled size from the stack. $ openssl req -new -addext 'sbgp-ipAddrBlock = IPv4:192.0.2.0/12341234' Segmentation fault (core dumped) The bogus prefix length 12341234 is fed into X509v3_addr_add_prefix() and used to read (prefixlen + 7) / 8 bytes from the stack variable 'min[16]' that ends up as 'data' in the memmove in ASN1_STRING_set(). The full fix will add length checks to X509v3_addr_add_prefix() and make_addressPrefix() and will be dealt with later. The entire X509v3_{addr,asid}_* API will need a thorough review before it can be exposed. This code is only enabled in -current and can only be reached from openssl.cnf files that contain sbgp-ipAddrBlock or from the openssl(1) command line. ok jsing
* fix typo: boolean true should decode to 1, not 0tb2021-12-231-2/+2
|
* Route templated implementations of {d2i,i2d}_ASN1_BOOLEAN() throughtb2021-12-231-3/+5
| | | | | | | | ASN1_item_ex_{d2i,i2d}() instead of ASN1_item_{d2i,i2d}(). Fixes test failure on sparc64, and hopefully all other architectures. reported by tobhe with/ok jsing
* document BN_MONT_CTX_set_locked(3)schwarze2021-12-211-5/+72
|
* Always allocate a new stack in o2i_SCT_LIST().jsing2021-12-201-19/+14
| | | | | | | | If we're given a pointer to an existing stack, free it and allocate a new one rather than poping and freeing all of the existing entries so we can reuse it. While here rename some arguments and variables. ok inoguchi@ tb@
* Convert SCT_new_from_base64() to use CBS for o2i_SCT_signature().jsing2021-12-203-33/+16
| | | | | | | Remove the existing o2i_SCT_signature() function and rename o2i_SCT_signature_internal() to replace it. ok inoguchi@ tb@
* Add regress coverage for the crazy SCT_new_from_base64() API.jsing2021-12-201-1/+57
|
* document BN_mod_add_quick(3), BN_mod_sub_quick(3), BN_mod_lshift(3),schwarze2021-12-201-3/+115
| | | | BN_mod_lshift_quick(3), BN_mod_lshift1(3), and BN_mod_lshift1_quick(3)
* document BN_consttime_swap(3); this will probably require more work,schwarze2021-12-191-7/+80
| | | | but what i have so far is already better than nothing
* document BN_uadd(3) and BN_usub(3)schwarze2021-12-191-7/+78
|
* document BN_zero_ex(3)schwarze2021-12-191-6/+38
|
* Put CTLOG and SCT stacks definitions in the right place.jsing2021-12-191-47/+49
| | | | No functional change.
* Document BN_abs_is_word(3).schwarze2021-12-181-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | While here, add the missing "const" qualifier to the second parameter of BN_is_word(3) - even though i doubt that marking an integral type parameter as "const" serves any significant purpose... Note that the OpenSSL documentation for this function that Billy Brumley committed on August 4, 2021 is actually wrong. Essentially, it says "BN_abs_is_word() test[s] if a equals ... |w|." Now pray tell me, what exactly is the point of taking the absolute value of an unsigned integer number? To compensate for the obvious absurdity of his patch, Billy made a point of getting *three* OKs from rather notable people: Pauli Dale, Nicola Tuveri, and Dmitry Belyavskiy. I believe this is a striking example of the cavalier attitude some projects put on display when it comes to documentation, and also a striking example of how bad documentation can occasionally be worse than no documentation at all, because the OpenSSL manual page will now thoroughly confuse anyone reading it. SCNR pointing out this (hopefully unintentional) hilarity - or is this an attempt at trolling the readers of their documentation? If it is, they certainly got me.
* support processing <openssl/bn.h>schwarze2021-12-181-3/+24
|
* add the missing .Nm BN_get_rfc3526_prime_1536,schwarze2021-12-181-2/+3
| | | | fixing a minibug found with check_complete.pl
* new manual page OBJ_add_sigid(3)schwarze2021-12-189-19/+155
|
* KNF two commentstb2021-12-181-16/+16
|
* Reinstate the licenses that were replaced with a license stubtb2021-12-182-12/+108
| | | | in OpenSSL commit d2e9e320.
* Revert license stubs to full licenses in the remaining files.tb2021-12-183-21/+164
|
* Reinstate the license stubs to their original licenses in most of thetb2021-12-1810-57/+537
| | | | | | files in libcrypto/ct. This reverts OpenSSL commit d2e9e320 discussed with jsing
* Convert o2i_SCT* functions to CBS.jsing2021-12-182-151/+149
| | | | | | This provides cleaner and safer code. ok inoguchi@ tb@
* Rename argument to SCT_LIST_free()jsing2021-12-181-3/+3
|
* new manual page OBJ_NAME_add(3)schwarze2021-12-175-9/+363
|
* mention lh_strhash(3) in the NAME, SYNOPSIS, and HISTORY sections;schwarze2021-12-171-10/+20
| | | | while here, repair a typo in the lh_retrieve(3) synopsis
* alphabetical order is hard, tb...tb2021-12-171-2/+2
|
* fix indenttb2021-12-171-2/+2
|
* document obj_cleanup_defer(3) and check_defer(3)schwarze2021-12-162-8/+72
|
* To ease maintenance, structure the lists of intentionally undocumentedschwarze2021-12-161-55/+109
| | | | | | symbols according to the reason (internal, obsolete, postponed) and according to the header file (asn1, objects, x509, ...). Also, add some minor tweaks needed for <openssl/objects.h>.
* unifdef TLS13_USE_LEGACY_CLIENT_AUTHtb2021-12-161-9/+1
| | | | | | | | | | | | Before the TLSv1.3 stack grew client certificate support, it fell back to the legacy stack. Proper client certificate support was added in a2k20 with a TLS13_USE_LEGACY_CLIENT_AUTH knob to provide an easy fallback in case the new code should have a problem. This was never needed. As ifdefed code is wont to do, this bitrotted a few months later when the client and server methods were merged. discussed with jsing
* document OBJ_new_nid(3), OBJ_add_object(3), and OBJ_create_objects(3);schwarze2021-12-151-9/+91
| | | | mark OBJ_create_and_add_object() as intentionally undocumented
* Move OBJ_create(3) into its own manual pageschwarze2021-12-155-63/+157
| | | | | because OBJ_nid2obj(3) is already long and more functions related to OBJ_create(3) have to be documented.
* Rename asn1_lib.c to asn1_old_lib.cjsing2021-12-152-3/+3
| | | | | | | This will allow us to add a new asn1_lib.c while replacing the code that is in currently in asn1_old_lib.c. Discussed with tb@
* Sync bytestring with libssl.jsing2021-12-154-4/+151
|
* Consolidate various ASN.1 code.jsing2021-12-159-650/+465
| | | | | | | | | Rather than having multiple files per type (with minimal code per file), use one file per type (a_<type>.c). No functional change. Discussed with tb@
* Use CBS_get_last_u8() to find the content type in TLSv1.3 records.jsing2021-12-151-11/+12
| | | | ok tb@
* unifdef -U CRYPTO_MDEBUG -m tasn_new.cjsing2021-12-151-33/+1
|
* Add coverage for CBS additions.jsing2021-12-151-2/+50
|
* Provide various CBS_peek_* functions.jsing2021-12-152-2/+109
| | | | | | These will be used in libcrypto. With input from and ok tb@
* Provide CBS_get_u64().jsing2021-12-152-2/+25
| | | | | | This will be used in the libcrypto certificate transparency code. ok tb@
* Provide CBS_get_last_u8().jsing2021-12-152-2/+19
| | | | | | | | This will be used in the TLSv1.3 record layer. From BoringSSL. ok tb@
* Some more ASN.1 struct types that are postponed (because they areschwarze2021-12-151-2/+5
| | | | | | related to templating macros) or intentionally undocumented. Apart from NETSCAPE, PCTX, and low-level templating stuff, all ASN.1 functions, types, and macros are now documented.
* Document i2c_ASN1_INTEGER(3).schwarze2021-12-151-7/+46
| | | | | | | | | | | | | While it was probably a mistake that steve@ made some i2c_*() and c2i_*() functions public back in 2000 and while we would like to delete them from the API, it may not be possible to delete this particular function because in contrast to the others (which are already marked as intentionally undocumented), this one is used by various real-world software, so for now, explain what it does, just in case people find it in existing code. While here, use the familiar term "byte" that we generally use throughout all our manual pages, even though the ASN.1 standard uses the term "octet" instead, which is more precise only in theory.
* tweak for the generated sourcetb2021-12-141-2/+2
|
* more symbols that are postponed or intentionally undocumented andschwarze2021-12-141-6/+55
| | | | some regexp tweaks; the relevant parts of asn1.h are nearing completion
* forgotten .Dv macros in -column listsschwarze2021-12-142-19/+19
|