| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Unindent, use correct type for idx (int rather than size_t) and make
this mess a bit more pleasant on the eyes.
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
|
| |
It's only used in x509_lu.c, so move it there. X509_OBJECT is not
itself refcounted. This API bumps the refcount of its cert or CRL
member. This isn't really useful outside of the library.
ok jsing
|
|
|
|
|
|
|
|
|
|
| |
Nothing uses this anymore. M2Crypto has been patched and a fix for
opensc has been upstreamed.
ok jsing
This is the start of a major bump. Don't build the tree until I have
synced sets in about 20 commits.
|
|
|
|
|
|
|
|
| |
This makes it clear for those fluent in OpenSSL API gibberish that nothing
needs to be freed here. This is because it returns something hanging off a
hash entry owned by cnf.
ok jsing
|
|
|
|
|
|
|
|
| |
Historically, X509V3_section_free() could be customized by the conf db
method to release memory allocated by X509V3_get_section(). This is no
longer supported, so it is always a noop and can be removed.
ok jsing
|
|
|
|
| |
ok jsing
|
| |
|
|
|
|
|
|
|
| |
As far as I can tell this has never been used since the beginning of git
history with SSLeay 0.8.1b, so we can simplify the x509_cb() a little.
ok jsing miod
|
|
|
|
|
|
| |
internal_verify() (now x509_vfy_internal_verify()) used to cache the
validity of the signature of a cert in this field. This is no longer
the case since x509_vfy.c 1.57 (2017).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issuer cache holds a pair of SHA-512 of parent and child cert plus
the result of the signature verification. Since CRLs also have a cached
hash of their DER, we can easily add them to the same cache. This way we
also avoid the cost of repeated signature verification for CRLs.
For ordinary workloads the cache is larger than necessary and it won't
currently take up more space than ~8M anyway, so the cost of doing this
is negligible.
For applications like rpki-client where the same (CA, CRL) pair is used
to verify multiple EE certs, the gain is significant. In fact, the current
worst case is a single pair being used for > 50k EE certs, responsible for
about 20-25% of the total runtime of an ordinary rpki-client run if a
hw-accelerated version of SHA-2 is available and even more if it isn't.
In both cases the cost of processing of this pair is reduced by more than
an order of magnitude.
The implementation is a translation of x509_verify_parent_signature() to
the case of CRLs and is entirely trivial thanks to the cache's design.
Found while investigating a performance bottleneck found by job
tested by job
ok beck
|
|
|
|
|
|
|
| |
The parent certificate outlives the signature check, so we don't have
to take a refcount of its pubkey and then release it again.
ok beck
|
|
|
|
|
|
|
|
| |
If a signature mismatch is cached, the same error should be passed to the
verify callback as if the mismatch was detected by doing the calculation,
rather than falling back to the "unable to find the issuer cert locally".
ok beck
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This splits the horrid spaghetti into a few relatively straightforward
helpers which do one thing at a time. There are still some spectacular
dances around ASN1_GENERALSTRING, but let's blame that one on X.500.
In brief, X509_NAME_ENTRY_oneline() iterates over the name entries, and
writes out a line /name1=value1,/name2=value2,... which you may have seen
variations of in issuer or subject output.
The name is the short name or the long name or the textual representation
of the OID (truncated to 79 characters) and the value is a string where
printable ASCII characters are represented as themselves and otherwise as
hexadecimal digits preceded by \x. Except for GENERALSTRING, where the four
octet representation is shortened to single-octet representation if none of
the top three octets in the entire string is populated.
It's the mother of all pretty things. But, hey, you could do worse and try
to parse this garbage...
ok jsing
|
| |
|
| |
|
|
|
|
|
| |
Now that it lives in a .c file, there's no need to point out that it is
non-public...
|
|
|
|
|
|
|
|
|
| |
forgotten in rev. 1.3 on July 13 this year.
No library bump and no ABI change because libcrypto.so.55.0 did not
export the symbol because it wasn't in Symbols.list.
Found in a partial code audit focusing on X509V3_EXT_METHOD objects.
|
|
|
|
|
|
|
|
| |
Unclear why this ever had to be made public since it's only used in a
single file. Anyway, nothing uses this, so remove it.
This went through a full bulk
pointed out by/ok schwarze
|
|
|
|
|
|
|
|
| |
These were used in x509_bitst.c and x509_ia5.c for populating tables that
have been expanded a long time ago. Nothing uses them, so remove them.
This went through a full bulk
pointed out by/ok schwarze
|
|
|
|
|
| |
Only security/xca uses it for no good rean. It can use BIT_STRING_BITNAME
if it really needs to.
|
|
|
|
|
|
|
|
|
|
| |
LibreSSL has removed support for dynamically allocated custom extension
methods. The mysterious CTX_DEP define was part of an experimental code
dump and that part of the experimental code was never shown hence never
reviewed.
This went through a full amd64 bulk
noticed by/ok schwarze
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the internal subroutine X509V3_add_value(), which could result
in silently losing part of the input data on memory exhaustion.
I independently rediscovered this bug while writing the documentation,
then noticed after fixing it that Zhou Qingyang <zhou1615 at umn dot edu>
fixed it in essentially the same way in OpenSSL 3 (commit bcd5645b
on Apr 11 02:05:19 2022 +0800), but it wasn't backported to the
OpenSSL 1.1.1 branch.
OK tb@
|
|
|
|
| |
I'm so tired of this.
|
|
|
|
|
|
| |
This matches the other members of X509 and is what's used everywhere else.
ok miod
|
| |
|
|
|
|
| |
discussed with jsing
|
| |
|
|
|
|
| |
Clean up the other includes while there.
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
|
| |
To compensate for all the removals, a single, small, constructive piece
of this bump: expose X509_get_signature_info() so that libssl's security
level API can handle RSA-PSS certificates correctly.
ok beck jsing
|
|
|
|
|
|
|
|
| |
The only consumer, yara, has been adjusted. It will be some more work
to remove this idiocy internally, but at least we will no longer have
to care about external consumers.
ok beck jsing
|
|
|
|
|
|
| |
I ranted enough about this recently. PKCS#12. Microsoft. 'nuff said.
ok beck jsing
|
|
|
|
|
|
|
|
|
| |
Another bunch of const correctness fixes for global tables. These are
used to map ns cert types, key usage types and CRL reasons to strings
and vice versa. By the looks of it, nobody ever figured out how to use
this (need I mention that it's convoluted?).
ok beck jsing
|
|
|
|
|
|
|
| |
With this another family of global tables becomes const as it should
always have been.
ok beck jsing
|
|
|
|
|
|
|
|
| |
LibreSSL no longer supports non-standard OIDs for use in the extensions
attribute of CSRs. The API that enabled that (and nobody used of course)
can now go.
ok beck jsing
|
|
|
|
|
|
|
| |
Nothing needs to reach into this structure, which is part of
certificates. So hide its innards.
ok beck jsing
|
|
|
|
|
|
|
|
|
| |
Someone thought it would be a good idea to append non-standard trust
information to the certs in the trust store. This API is used to
inspect that depending on the intended purpose of the cert. Only
M2Crypto thought it necessary to expose this. It was adjusted.
ok beck jsing
|
|
|
|
|
|
| |
No longer used, never really needed.
ok beck jsing
|
|
|
|
|
|
|
| |
These have always been unused, but the db_meth abstraction hid that
very well. Bye.
ok beck jsing
|
|
|
|
|
|
|
| |
This internalizes a particularly scary layer of conf used for X.509
extensions. Again unused public API...
ok beck jsing
|
|
|
|
|
|
|
|
| |
Thankfully sthen removed the out-of-support PHP versions 7.4 and 8.0,
which were the last users of this API, which in turn permitted much of
this conf rampage. Now the stub can join its guts in the attic.
ok beck jsing
|
|
|
|
|
|
|
|
| |
Fortunately all projects who want to configure their extensions using
a dangerous string DSL/API figured out the fact that one was supposed to
be using the nconf version of these (the hint is the 'n', as in new).
ok beck jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
imodules are called imodules because they contain Information about
modules that have been Initialized. Which one of these two I it is
is anyone's best guess. Why anything outside of libcrypto would ever
possibly care will also remain a mystery.
Remove the old way of adding a conf module, user data, stop allowing
to set a method (it's opaque now, remember?) and drop a couple bits
more from the public api interface.
ok beck jsing
|
|
|
|
|
|
|
| |
Much of conf is designed in such a way that you really have to reach into
its structs. This one piece can be hidden. It might even be removed soon.
ok beck jsing
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nothing touches db_meth in ports. Thus only way a db_meth can be set is
now as a side effect X509V3_set_conf() in which case the db is an NCONF
database and the db_meth will be a thin wrapper of NCONF_get_section().
Make that explicit in the implementation, remove the guts of the unused
X509V3_get_string() and X509V3_string_free(), turn X509V3_section_free()
into a noop and replace several checks for ctx->db, ctx->db->meth, ...
with a simple ctx->db != NULL check.
ok beck jsing
|
|
|
|
| |
functions for removal
|
|
|
|
|
|
| |
Another legacy turd that was only used by PHP 7.4 and 8.0.
ok beck jsing
|