| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
feedback and ok tb@
|
|
|
|
| |
No change in the generated assembly
|
| |
|
| |
|
|
|
|
| |
No change in the generated assembly
|
|
|
|
|
|
| |
This function is only used by OpenLDAP and it's been a noop since
forever. It has no business to be squeezed in between a number of
other, quite unrelated functions. It's distracting.
|
| |
|
| |
|
|
|
|
|
|
| |
Test & assign and use ret instead of rv.
ok jsing
|
|
|
|
|
|
|
| |
Use better variable names, split the success from the error path and
return directly rather than using an ok variable.
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
|
|
|
| |
Use better variable names. X509_REQ_new() sets the version to the only
specified version, so there is no point to set it. Extract the subject
name, then assign to make it more obvious that we error happens if the
cert has a missing subject. Switch to X509_get0_pubkey() to avoid some
strange dance with a strangely named variable to adjust the refcount.
ok jsing
|
|
|
|
|
|
|
| |
Instead of inlining a poor version of ASN1_TYPE_unpack_sequence() with
missing error checks, just call the real thing. It's safer and simpler.
ok jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we know the two OIDs we need to look for when checking for the
extension list attribute in a certification request, we can simplify this
quite a bit. There is one change of behavior. Attribute value sets are not
supposed to be empty and it makes no sense to return an empty stack of
extensions in that case, return NULL instead, matching BoringSSL.
This removes last use of ext_nids and ext_nid_list[], so these two bits
of unprotected global mutable state can now join the party in the attic.
ok jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the global ext_nids[] array can no longer be modified by the
application, we can simplify this by returning the two possible NIDs
that we accept in the extension list attribute in PKCS#10 certification
requests.
The year is 2024. This API is entirely unused by the ecosystem. Well not
entirely! One small village of indomitable rare API use still holds out
against the cleansers. You may have guessed it: security/xca.
ok jsing
|
|
|
|
|
|
|
|
|
| |
These fiddle with unprotected global state, so aren't thread safe and
of course there was no good reason to have this API in the first place.
Nothing uses it, so it becomes a noop and will be removed in the next
major bump.
ok jsing
|
|
|
|
|
|
|
| |
We added things we probably shouldn't have, and so did BoringSSL and
OpenSSL. Terrible API is terrible.
discussed with jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cache was added because our time conversion used timegm()
and gmtime() which aren't very cheap. These calls were noticably
expensive when profiling things like rpki-client which do many
X.509 validations.
Now that we convert times using julien seconds from the unix
epoch, BoringSSL style, instead of a julien days from a
Byzantine date, we no longer use timegm() and gmtime().
Since the julien seconds calculaitons are cheap for conversion,
we don't need to bother caching this, it doesn't have a noticable
performance impact.
While we are at this correct a bug where
x509_verify_asn1_time_to_time_t was not NULL safe.
Tested for performance regressions by tb@ and job@
ok tb@ job@
|
|
|
|
|
|
|
|
|
|
|
| |
If any OBJ_dup() fails along the way, a partially copied policy stack
would remain on the params object. This makes no sense. Implement and
use an sk_ASN1_OBJECT_deep_copy(), that copies the full stack or else
returns NULL.
Remove unnecessary NULL check and streamline some other logic.
ok jsing
|
|
|
|
|
|
| |
Streamline some checks and use more idiomatic sk_push() error check
ok jsing
|
| |
|
|
|
|
|
|
| |
No need for an inconsistently named local variable and a ternary operator.
ok jsing
|
|
|
|
| |
No change in generated assembly
|
|
|
|
| |
No change in generated assembly
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The toolkit aspect bites again. Lots of invalid CRLs and CSRs are produced
because people neither read the RFCs nor does the toolkit check anything it
is fed. Reviewers apparently also aren't capable of remembering that they
have three copy-pasted versions of the same API and that adding a version
check to one of the might suggest adding one for the other two.
This requires ruby-openssl 20240326p0 to pass
ok beck job jsing
|
|
|
|
| |
quoth the muppet "yes I know this is horrible!"
|
|
|
|
| |
ok tb@
|
|
|
|
|
|
| |
Reported by David Benjamin (BoringSSL)
OK tb@
|
|
|
|
| |
looked over by jsing
|
|
|
|
|
|
|
|
| |
After peeling off enough layers, the entire wacky abstraction turns out
to be nothing but dispatching from a trust_id to a trust handler and
passing the appropriate nid and the cert.
ok beck jsing
|
|
|
|
| |
ok tb@
|
| |
|
|
|
|
|
|
|
| |
The certificates no longer need to be modified since we cache the
extensions up front.
ok beck
|
|
|
|
|
|
|
| |
This code is so ridiculously overengineered that it is an achievement even
by early OpenSSL standards.
ok beck
|
|
|
|
|
|
| |
This way the trust handlers can stop modifying the certificates.
ok beck
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When searching for a CA or CRL file in by_dir, this stat()
was used to short circuit attempting to open the file with
X509_load_cert_file(). This was a deliberate TOCTOU introduced
to avoid setting an error on the error stack, when what you
really want to say is "we couldn't find a CA" and continue
merrily on your way.
As it so happens you really do not care why the load_file failed
in any of these cases, it all boils down to "I can't find the CA
or CRL". Instead we just omit the stat call, and clear the error
stack if the load_file fails. The fact that you don't have a CA or
CRL is caught later in the callers and is what you want, mimicing
the non by_dir behaviour instead of possibly some bizzaro file
system error.
Based on a similar change in Boring.
ok tb@
|
| |
|
|
|
|
| |
ok beck
|
|
|
|
|
| |
"Yeah, arg1 is always such an imaginative name" ian
ok beck
|
|
|
|
|
|
|
| |
This used to be exposed via an accessor, but this accessor is no longer
part of the library, so nuke it.
ok beck
|
|
|
|
| |
ok jsing
|