| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
| |
Use the same variable names throughout these functions and unify them
some more.
ok jsing
|
|
|
|
|
|
|
| |
such that `man X509_STORE_CTX_check_issued_fn` works.
While here, add a Copyright notice for Job Snijders because
he added a significant amount of text to this file in March 2023.
OK job@
|
|
|
|
|
|
|
| |
This brings these two messy functions into more usual shape. There is a
lot more that can be done in here. It is a step in the right direction.
ok jsing
|
|
|
|
|
|
|
|
| |
rsa_param_encode() allocates the PSS parameters in an ASN1_STRING which
is leaked if any error occurs later in rsa_pub_encode(). Convert the rest
of the code to follow our ordinary idioms more closely.
ok jsing
|
|
|
|
|
| |
X509_STORE_CTX_get1_certs(3) and X509_STORE_CTX_get1_crls(3).
Document them and mark their aliases as deprecated.
|
|
|
|
| |
No functional change.
|
|
|
|
| |
No change to generated assembly.
|
| |
|
|
|
|
| |
No functional change.
|
|
|
|
|
|
|
|
| |
Copy the update, transform and final functions from md32_common.h, manually
expanding the macros for MD5. This will allow for further clean up to
occur.
No change in generated assembly.
|
| |
|
|
|
|
|
|
|
| |
MD32_XARRAY was added as a workaround for a broken HP C compiler (circa
1999). Clean it up to simplify the code.
No change in generated assembly.
|
|
|
|
| |
Discussed with tb@
|
|
|
|
|
|
|
|
|
| |
Inline the WL and WR defines, which only add yet another layer of
abstraction and make the code harder to follow.
No change to generated assembly.
Discussed with tb@
|
|
|
|
|
|
|
|
| |
Inline the SL and SR defines, which only makes the code harder to follow.
No change to generated assembly.
Discussed with tb@
|
|
|
|
| |
No change in generated assembly.
|
|
|
|
|
|
|
|
|
|
| |
Avoid creating an ASN1_STRING with negative length, set type, data
and length via ASN1_STRING_type_new() and ASN1_STRING_set0() instead
of doing this manually. Check return value for i2d_ASN1_INTEGER()
and use an intermediate ASN1_OBJECT instead of nested function calls.
Finally, clear sensitive data with freezero().
ok jsing
|
|
|
|
|
|
| |
Change the code to use safer idioms and avoid nested function calls.
ok jsing
|
|
|
|
|
|
| |
Replace a pile of byte order handling mess with htobe*() and be*toh().
ok tb@
|
|
|
|
|
|
|
|
|
| |
This is a hack that is only enabled on a handful of 64 bit platforms, as
a workaround for poor compiler optimisation. If you're running an archiac
compiler on an archiac architecture, then you can deal with slightly lower
performance.
ok tb@
|
|
|
|
| |
and fix a typo: s/content objects/content octets/.
|
|
|
|
|
| |
OBJ_get0_data(3) and OBJ_length(3). Document them.
Feedback and OK tb@.
|
|
|
|
|
|
|
|
|
|
| |
Instead of CRYPTO_THREADID, which passes pthread_via through unsigned long,
we can use pthread_self() and pthread_equal() directly. This commit keeps
using the awkward 'local' nomenclature as that is used throughout the rsa
code. This will be changed after the blinding code will have been fully
merged into rsa_blinding.c.
ok jsing
|
|
|
|
|
| |
Most of these are one line wrappers around methods implemented in rsa_eay.c
by default.
|
| |
|
| |
|
|
|
|
| |
discussed with jsing
|
|
|
|
| |
Also, make mod const.
|
| |
|
|
|
|
|
|
|
| |
Only call BN_BLINDING_setup() from BN_BLINDING_update(). This allows
another simplification of the counter logic.
ok jsing
|
|
|
|
|
|
|
| |
If we generate a non-invertible blinding, we have accidentally factored
the modulus. This won't happen, so get rid of this ugly complication.
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
| |
If the blinding is non-NULL, Ai is set on it, so no need to check for
that. Also, we can get away with a single call to BN_mod_mul().
ok jsing
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
| |
Both the function return type and the function name are so long
that for displaying the function prototype,
a line break is needed after the function return type.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass e and mod into BN_BLINDING_new() for now and unconditionally allocate
A and Ai. This way non-NULL blindings always have these four members set.
This allows removing several unnecessary checks in the update, convert and
parameter creation code paths.
Fix exit BN_BLINDING_create_param() so as to signal errors to the caller
if a non-NULL blinding was passed. This fixes a long standing bug.
ok jsing
|
|
|
|
|
|
|
| |
Make this look a bit more like other code we cleaned up avoiding nesting
and unnecessary else branches.
ok jsing
|
|
|
|
|
|
|
|
|
|
|
| |
This was a workaround due to the historically non-constant time scalar
multiplication in the EC code. Since Brumley and Tuveri implemented the
Montgomery ladder, this is no longer useful and should have been removed
a long time ago, as it now does more harm than good.
Keep the preallocations as they still help hiding some timing info.
ok jsing
|
|
|
|
|
|
|
|
|
|
|
|
| |
tb@ removed the following macros from the public API:
_DECLARE_OBJ_BSEARCH_CMP_FN
DECLARE_OBJ_BSEARCH_CMP_FN DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN
IMPLEMENT_OBJ_BSEARCH_CMP_FN IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN
OBJ_bsearch OBJ_bsearch_ex
In objects.h rev. 1.20 (Nov 11, 2022), jsing@ unifdef'ed USE_OBJ_MAC.
Stop marking these names as intentionally undocumented.
|
|
|
|
|
|
|
|
| |
In bn.h rev. 1.75 (July 31, 2023), tb@ removed it from the public API.
While here, stop marking BN_prime_checks as obsolete.
In BN_generate_prime.3 rev. 1.23 (May 11, 2023), tb@ documented
the constant BN_prime_checks in that manual page.
|
|
|
|
|
| |
In bio.h rev. 1.59 (July 28, 2023), tb@ removed the last four functions
that took function pointers of this type from the public API.
|
|
|
|
|
| |
In asn1.h rev. 1.80 (July 28, 2023), tb@ removed the last three
functions that were using this data type from the public API.
|
|
|
|
| |
fixed in bio_lib.c r1.47 as confirmed by ASAN.
|
|
|
|
|
|
|
|
| |
If CRYPTO_dup_ex_data() fails, the new_bio is leaked. If an error occurs
after the first iteration, all members of the new chain except the head
are leaked.
ok jsing
|
| |
|