summaryrefslogtreecommitdiff
path: root/src/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve bn_montgomery_multiply_words()jsing2023-04-221-9/+16
| | | | | | | | | Pull a number of invariants into variables, which avoids repeated loading from memory on architectures where sufficient registers are available. Also keep track of the per-iteration carry in a variable, rather than unnecessarily reading from and writing to memory. This gives a reasonable performance gain on some architectures (e.g. armv7)
* cms_io: sort includestb2023-04-211-3/+4
|
* cms_io: reverse polarity of an if statement to unindenttb2023-04-211-10/+12
|
* cms_io: Remove a stupid else branchtb2023-04-211-4/+2
| | | | | If you can initialize with functions, you can also initialize with constants...
* Rewrap some lines. No binary changetb2023-04-211-10/+10
|
* Unwrap a linetb2023-04-211-3/+2
|
* s2i_ASN1_INTEGER: make error conditions more explicit, a few more tweakstb2023-04-211-10/+18
|
* s2i_ASN1_INTEGER.3: minor fixestb2023-04-211-4/+8
| | | | | Fix botched Xr and be more precise about errors by being less precise. Add a BUGS section.
* Uncomment and document X.509 verifier error codestb2023-04-211-10/+20
| | | | | | | | These are in actual use, so their meaning should be documented. The remaining commented codes are unused outside of x509_txt.c except for X509_V_ERR_INVALID_NON_CA which looks used at first glance, but it is actually in an unreachable path of the legacy verifier.
* Remove some (soon to be) outdated documentationtb2023-04-211-48/+3
| | | | | | | | | | The documentation of the BN_MOD_CTX has been out of sync with reality for decades. The structure is now opaque, so its members should not be documented this way. They internals aren't important for the rest of the page. BN_MOD_CTX_init() will soon be removed. It's useless unless you like leaks.
* remove duplicate includejsg2023-04-211-2/+1
| | | | ok otto@
* Remove the now unused x509_enum.ctb2023-04-212-65/+1
|
* Move the CRL reason method into x509_bitst.ctb2023-04-212-33/+33
| | | | | | | The CRL extension handler is completely misplaced in x509_enum.c. Move it to x509_bitst.c until we find a better home for it. This way it is next to the other two extension methods that have the extra usr_data contortion.
* Move i2s_ASN1_ENUMERATED_TABLE() next to i2s_ASN1_ENUMERATED()tb2023-04-212-17/+18
| | | | | These functions probably belong into asn1/ but they definitely don't belong into separate files.
* Tweak whitespace gone wrongtb2023-04-211-5/+4
|
* Stop using ENUMERATED_NAMEStb2023-04-211-3/+5
| | | | | | This is a public alias for the also public BIT_STRING_BITNAME. The ENUMERATED_NAMES type is used exactly twice, namely on two lines in this file. This is silly.
* Fix Dt and Xrtb2023-04-201-3/+3
|
* Flip the default of explicitText to UTF8Stringtb2023-04-201-2/+2
| | | | | | | | | | | While it may have been reasonable to use VisibleString back when this code was written, it's an anachronism nowadays. In particular, configuring BoringSSL reports that they have seen malformed certificates with exactly the issue caused by this unfortuante default. Reported by Alex Gaynor in OpenSSL issue 20772 ok jsing
* Link s2i_ASN1_INTEGER.3 to buildtb2023-04-201-1/+2
|
* Add documentation for s2i_ASN1_INTEGER and related functionstb2023-04-201-0/+195
| | | | | | | | | | | | | | | | These functions convert strings to internal objects and vice versa. This is a best effort, probably with a lot of room for improvement, which can happen in tree if anyone cares. It's better than nothing. Nothing in turn would be significantly better than the utter garbage a related project has managed to land as part of their efforts towards significant documentation improvements in a recent major relase. This leaves a dangling reference to the misnamed X509V3_METHOD_get_nid(3) which I may or may not fill in the future. I am unsure about the HISTORY section's precision, but that's what I got from cvs history. All these functions are about a quarter century old (and it shows), so I don't think it matters very much.
* Fix botched line wraptb2023-04-191-4/+3
|
* remove duplicate includesjsg2023-04-191-2/+1
| | | | ok tb@
* Rename Hex array to hex_digits.jsing2023-04-191-5/+5
| | | | ok tb@
* Move the BN_bn2bin()/BN_bin2bn() family to bn_convert.cjsing2023-04-192-182/+183
|
* Reorder functions.jsing2023-04-191-102/+102
| | | | No functional change.
* Move BN_options() from bn_convert.c to bn_lib.cjsing2023-04-192-21/+21
|
* unifdef BN_RECURSIONjsing2023-04-195-594/+5
| | | | | | | | | | | | This removes a bunch of incomplete and scary code, which potentially leaks secrets and is not constant time. A performance gain is achieved on arm64 for sizes that we care about, while a minimal decrease in performance is noted for larger sizes on some other platforms. While we will potentially reimplement Karatsuba (or Toom-Cook) at a later date, it will be easier and safer to do it from a clean slate. ok tb@
* Use NULL, not 0 for pointers and use an explicit comparison against NULL.tb2023-04-181-3/+3
|
* Remove prototypes under OPENSSL_NO_EC_NISTP_64_GCC_128tb2023-04-181-18/+1
| | | | | | | The code was deleted a while back, the prototypes remained. We had OPENSSL_NO_EC_NISTP_64_GCC_128 in opensslfeatures.h since forever. discussed with jsing
* Move x509.h inclusion into alphabetical ordertb2023-04-181-3/+2
|
* Bring includes into canonical ordertb2023-04-186-37/+35
| | | | Requested by jsing
* Sigh cvs... Also drop OPENSSL_NO_DEPRECATED from ec.htb2023-04-181-3/+1
|
* Move some includes out of OPENSSL_NO_DEPRECATEDtb2023-04-189-27/+9
| | | | | | | | | | | | | Some headers were included conditionally on OPENSSL_NO_DEPRECATED in hopes that eventually the mess of everything includes everything will magically resolve itself. Of course everyone would end up building openssl with OPENSSL_NO_DEPRECATED over time... Right. Surprisingly, the ecosystem has come to rely on these implicit inclusions, so about two dozen ports would fail to build because of this. Patching this would be easy but really not worth the effort. ok jsing
* Drop two useless READMEstb2023-04-172-18/+0
| | | | "go ahead" jsing
* c_zlib.c needs bio_local.h with -DZLIB.tb2023-04-171-1/+2
| | | | | Apparently nobody tried to compile libcrypto with ZLI since Jan 2022. Maybe this means that we can unifdef -U ZLIB or maybe not...
* Tweak indent and use named registers.jsing2023-04-171-13/+13
| | | | No functional change.
* Hook sha3 up to build.jsing2023-04-171-1/+3
| | | | ok tb@
* Move BN_bn2mpi()/BN_mpi2bn() into bn_convert.cjsing2023-04-173-138/+74
|
* Use C99 initializers for the default_pctx and mark it static consttb2023-04-171-8/+3
|
* Add missing const qualifiers to the v3_* externstb2023-04-171-11/+11
| | | | ok jsing
* Fix whitespace in DHparam_print_fp()tb2023-04-171-2/+4
|
* Remove now unused dh_prn.ctb2023-04-171-64/+0
|
* Drop dh_prn.ctb2023-04-171-2/+1
|
* Move DHparam_print_fp() next to DHparam_print()tb2023-04-172-17/+18
| | | | | As usual with the fp suffix, the former wraps the latter with a file BIO. There is no reason for this function to be in a separate file.
* remove bad Pp;jmc2023-04-171-3/+2
| | | | (sorry, otto, for not spotting in the updated diff)
* Fix previous: add a missing andtb2023-04-161-2/+3
|
* Dump (leak) info using utrace(2) and compile the code always inotto2023-04-162-148/+199
| | | | | except for bootblocks. This way we have built-in leak detecction always (if enable by malloc flags). See man pages for details.
* Garbage collect the now unused obfuscating macro string_stack_free()tb2023-04-161-4/+1
|
* Inline the three uses of string_stack_free()tb2023-04-161-4/+4
| | | | | | | sk_OPENSSL_STRING_pop_free() is much more explicit and isn't that much more complicated. x509_util.c can also use it directly... No binary change
* Remove the now unused vpm_int.htb2023-04-161-64/+0
|