| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
original commit:
CVSROOT: /cvs
Module name: src
Changes by: jsing@cvs.openbsd.org 2020/05/31 11:23:39
Modified files:
lib/libcrypto/x509: x509_vfy.c
Log message:
When building a chain look for non-expired certificates first.
Currently, when building a certificate chain we look up an issuer and if
it is the only issuer certificate available we still use it even if it has
expired. When X509_V_FLAG_TRUSTED_FIRST is not in use, untrusted
certificates are processed first and if one of these happens to be expired
it will be used to build the chain, even if there is another non-expired
option in the trusted store.
Rework this code so that we first look for a non-expired untrusted
certificate. If one does not exist then we take a look in the trusted
store to see if we would be able to build the chain and only if there is
not, do we then look for an expired untrusted certificate.
This makes certificate validation possible for various sites that are
serving expired AddTrust certificates.
Issue reported by Christian Heimes via GitHub.
ok beck@ tb@
|
|
|
|
| |
From Holger Mikolon
|
|
|
|
|
|
| |
CID #118791
ok jsing mestre
|
|
|
|
|
| |
this to be "overridden" by the user supplied callback.
ok jsing@
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tighten up checks for various X509_VERIFY_PARAM functions, and
allow for the verify param to be poisoned (preculding future
successful cert validation) if the setting of host, ip, or email
for certificate validation fails. (since many callers do not
check the return code in the wild and blunder along anyway)
Inspired by some discussions with Adam Langley.
ok jsing@
|
| |
|
|
|
|
| |
X509_STORE_CTX_set0_{trusted_stack,untrusted}().
|
|
|
|
|
| |
can get at it, so libtls can also deal with notafter's past the
realm of 32 bit time in portable
|
|
|
|
|
|
| |
This will only be used in portable. As noted, necessary to
make us conformant to RFC 5280 4.1.2.5.
ok jsing@ bcook@
|
|
|
|
|
|
|
| |
error code, since this breaks the documented API. Under certain circumstances
this will result in incorrect successful certiticate verification (where
a user supplied callback always returns 1, and later code checks the error
code to potentially abort post verification)
|
| |
|
| |
|
|
|
|
| |
ok jsing@
|
|
|
|
|
|
| |
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@
|
|
|
|
| |
ok jsing@
|
|
|
|
|
|
| |
with the caveat that we force V_OK when a user provided callback has
us returning success.
ok inoguchi@ jsing@
|
|
|
|
|
| |
towards cleaning up the V_OK stuff.
ok kinichiro@
|
|
|
|
| |
(slightly) more readable.
|
|
|
|
|
|
|
| |
returning ok == 1, with ctx->error not being X509_V_OK. Hopefully we can
restore this behaviour once these are ironed out.
Discussed with beck@
|
|
|
|
|
|
|
| |
and X509_verify_cert - We at least make it so an an init'ed ctx is not
"valid" until X509_verify_cert has actually been called, And we make it
impossible to return success without having the error set to ERR_V_OK.
ok jsing@
|
|
|
|
|
|
| |
when we went to alternate cert chains. this correctly does not clobber
the ctx->error when using an alt chain.
ok jsing@
|
|
|
|
|
| |
via boringssl.
ok jsing@ miod@
|
|
|
|
|
|
| |
functions.. document with a man page.
bump majors on libtls, libssl, libcrypto
ok jsing@ guenther@
|
|
|
|
|
|
|
|
|
| |
parsed so that a malformed GeneralizedTime field is recognized as an error
instead of potentially being interpreted as if it was a valid UTCTime.
Reported by Theofilos Petsios (theofilos (at) cs.columbia.edu)
ok beck@ tedu@ jsing@
|
|
|
|
| |
ok doug@
|
|
|
|
| |
ok guenther@
|
|
|
|
|
|
| |
utctime and gentime wrappers accordingly. Along with some other cleanup.
this also removes the need for timegm.
ok bcook@ sthen@ jsing@
|
|
|
|
|
|
|
|
|
| |
in asn1 and x509 code, all dealing with an ASN1_TIME. This brings the parsing
together in one function that converts into a struct tm. While we are at it this
also brings us into conformance with RFC 5280 for times allowed in an X509 cert,
as OpenSSL is very liberal with what it allows.
input and fixes from deraadt@ jsing@ guethther@ and others.
ok krw@, guenther@, jsing@
|
|
|
|
|
|
| |
Loosely based on changes in OpenSSL.
ok beck@
|
|
|
|
|
| |
fails, check its return value and correctly mop up after ourselves.
ok beck@ doug@
|
|
|
|
|
|
|
| |
The current version is not safe with stack variables because it may
return prematurely with a partially constructed object on error.
ok miod@ a while back
|
|
|
|
|
|
|
|
|
|
| |
length checks.
Diff based on changes in OpenSSL.
Fixes CVE-2015-1789.
ok doug@
|
|
|
|
|
|
|
|
|
| |
getenv()'s wrapped by issetugid() are safe, but issetugid() is correct
difficult to impliment on many operating systems. By accident, a grand
experiment was run over the last year, where issetugid() returned 1 (the
safe value) on a few operating systems. Noone noticed & complained that
certain environment variables were not working.......
ok doug beck jsing, discussion with others
|
|
|
|
| |
Spotted by beck@
|
|
|
|
|
| |
noops around 15 years ago. Remove multiple occurances of both that still
exist in the code today.
|
|
|
|
|
|
|
|
|
| |
X509_STORE_CTX_init(): do not free the X509_STORE_CTX * parameter upon
failure, for we did not allocate it and it might not come from the heap,
such as in check_crl_path() in this very same file where X509_STORE_CTX_init()
gets invoked with a stack address.
ok bcook@
|
|
|
|
|
|
|
|
| |
leaks.
From miod@
OK from miod@ and guenther@
|
|
|
|
|
|
|
| |
instances. This one for OPENSSL_ALLOW_PROXY_CERTS gets turned off first,
especially since it had this special comment:
/* A hack to keep people who don't want to modify their software happy */
ok beck jsing
|
|
|
|
|
| |
X509_STORE_CTX_free() accept NULL pointers as input without dereferencing them,
like all the other well-behaved *_CTX_free() functions do.
|
|
|
|
|
|
|
| |
expired or not valid yet, continue looking; only return an expired certificate
if no valid certificates have been found.
OpenSSL PR #3359 via OpenSSL trunk.
|
|
|
|
|
|
|
|
| |
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.
ok beck@ miod@
|
|
|
|
|
|
|
|
|
| |
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.
This also includes some miscellaneous sorting/tidying of headers.
|
|
|
|
|
|
| |
are needed in the source files that actually require them.
ok beck@ miod@
|
|
|
|
|
|
| |
Also remove unused des_ver.h, which exports some of these strings, but is not installed.
ok miod@ tedu@
|
|
|
|
|
| |
setuid applications from being fooled.
ok miod
|
| |
|
| |
|
| |
|
| |
|
| |
|