| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
It is possible to do this by abusing the EVP_CTRL_INIT API.
Pointed out by jsing.
ok inoguchi jsing (as part of a larger diff)
|
|
|
|
|
|
|
|
|
|
|
| |
EVP_AEAD_CTX_{open,seal}, as this leaks the authentication key.
Issue reported and fix tested by Guido Vranken.
ok beck, jsing
This commit adds a constant to a public header despite library lock,
as discussed with deraadt and sthen.
|
|
|
|
|
|
|
| |
Referred to this OpenSSL commit and adopted to the codebase.
b785504a10310cb2872270eb409b70971be5e76e
suggest and ok tb@
|
|
|
|
|
|
|
|
|
|
| |
Fix the problem that long unbroken line of base64 text is not decoded.
Referred to this OpenSSL commit and adapted to the codebase.
3cdd1e94b1d71f2ce3002738f9506da91fe2af45
Reported by john.a.passaro <at> gmail.com to the LibreSSL ML.
ok tb@
|
| |
|
|
|
|
|
|
| |
behavior.
ok jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new IV is 128 bit long and is actually the 64 bit counter followed
by 64 the bit initialization vector. This is needed by an upcoming
change in OpenSSH and is a breaking change for all current callers.
There are language bindings for Node.js, Rust and Erlang, but none of
our ports use them.
Note that EVP_chacha20() was first introduced in LibreSSL on May 1, 2014
while the entirely incompatible version in OpenSSL was committed on
Dec 9, 2015.
Initial diff from djm and myself, further refinements by djm.
Ports grepping by sthen
ok jsing
|
|
|
|
| |
ok jsing@ tb@
|
|
|
|
| |
ok tb@
|
|
|
|
|
|
|
|
|
|
|
|
| |
This handles controls with a message digest by name, looks up the message
digest and then proxies the control through with the EVP_MD *.
This is internal only for now and will be used in upcoming RSA related
changes.
Based on OpenSSL 1.1.1d.
ok inoguchi@ tb@
|
|
|
|
| |
ok tb@
|
|
|
|
|
|
|
|
| |
EVP_PKEY_CTRL_GET_MD control for DSA, EC and RSA.
This is used by the upcoming RSA CMS code.
ok inoguchi@ tb@
|
| |
|
|
|
|
|
| |
Issue found by Guido Vranken <guidovranken@gmail.com>
ok tedu@ tb@
|
|
|
|
|
|
|
|
|
| |
assigned from aesni_ccm_init_key() via CRYPTO_ccm128_init(), so it needs
to be copied over...
Pointed out by Guido Vranken.
ok jsing
|
|
|
|
|
|
|
|
|
| |
aesni_gcm_init_key() via CRYPTO_gcm128_init(), so it needs to be
copied over...
Fixes cryptofuzz issue #14352 and likely also #14374.
ok beck jsing
|
|
|
|
|
|
| |
Found by Guido Vranken when fuzzing and trying to use GOST with HMAC.
Fix confirmed by Guido; ok tb@
|
|
|
|
| |
ok tb@
|
|
|
|
|
|
|
|
| |
This reverts part of OpenSSL c2fd5d79, which added the same code to AES
CCM, GCM and XTS. In the case of CCM and GCM nothing assigns {ccm,gcm}.key
so there is never going to be anything to update (unlike XTS).
ok tb@
|
|
|
|
|
|
| |
Avoids use of uninitialised memory.
ok tb@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In the case of a cipher with a custom copy control, if that control fails
we may still have pointers that we do not own in the previously copied
cipher data. Avoid potential double-frees by zeroing and freeing the
copied cipher data in this case.
Issue reported by Guido Vranken.
ok tb@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The plen variable can be NO_PAYLOAD_LENGTH == (size_t)-1, so doing
tls_aad[plen-4] is no good. Also check that the length of the AAD
set via the control interface is equal to 13 since the whole file
is written with that case in mind.
Note that we no longer use this code in LibreSSL/OpenBSD. We
eliminated the use of these control interfaces and stitched cipher
modes in libssl a while ago.
Problem found by Guido Vranken with his cryptofuzz - thanks!
input & ok beck, jsing
|
|
|
|
|
|
| |
Reported by oss-fuzz, really fixes issue #13805.
ok beck@ tb@
|
|
|
|
|
|
| |
Reported by oss-fuzz, fixes issue #13805.
ok beck@ tb@
|
|
|
|
| |
No binary change.
|
|
|
|
|
|
| |
freely licensed.
From jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implementation based on the one in OpenSSL 1.0.2r which is
still freely licensed.
The functions are undocumented in OpenSSL. To use them, one
needs to set the undocumented EVP_CIPHER_CTX_FLAG_WRAP_ALLOW
flag on the EVP_CIPHER_CTX.
resolves #505
ok jsing
|
|
|
|
|
|
|
|
| |
This is an ISC licensed version based on the sources by Ribose Inc
that were ported to OpenSSL in 2017.
Patch from Daniel Wyatt with minor tweaks.
ok inoguchi, jsing
|
|
|
|
|
|
|
| |
xchacha is a chacha stream that allows for an extended nonce, which
in turn makes it feasible to use random nonces.
ok tb@
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
| |
Omission reported by reyk and Alice Wonder.
ok bcook jsing
|
| |
|
|
|
|
| |
ok beck inoguchi
|
|
|
|
|
|
|
|
|
| |
tweaks from jsing and myself. The SM2/SM3/SM4 algorithms are mandatory
for legal use of cryptography within China and [are] widely applied in
the country, covering identification/financial cards, contactless,
TPM 2.0 and PKI.
ok beck inoguchi jsing
|
|
|
|
|
|
| |
RSA_meth_get_finish() RSA_meth_set1_name() EVP_CIPHER_CTX_(get|set)_iv()
feedback and ok jsing@ tb@
|
|
|
|
|
| |
tested in a bulk by sthen
ok jsing
|
|
|
|
|
|
|
|
|
| |
Requires adding a const to the priv_decode() member of
EVP_PKEY_ASN1_METHOD and adjusting all *_priv_decode()
functions. All this is already documented this way.
tested in a bulk build by sthen
ok jsing
|
|
|
|
|
|
|
|
| |
we can add const to PKCS8_pkey_get0(). In order for this to work,
we need to sprinkle a few consts here and there.
tested in a bulk by sthen
ok jsing
|
|
|
|
|
|
|
|
|
|
|
| |
Provide PKCS8_pkey_add1_attr_by_NID() and PKCS8_pkey_get0_attrs().
Remove the whole broken code and simplify pkcs8_priv_key_info_st
accordingly. Based on OpenSSL commit
54dbf42398e23349b59f258a3dd60387bbc5ba13 plus some const that was
added later.
tested in a bulk build by sthen
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
|
|
| |
checking. Matches our documented behavior.
Based on OpenSSL commit c5ebfcab713a82a1d46a51c8c2668c419425b387
tested in a bulk by sthen
ok jsing
|
|
|
|
|
| |
tested in a bulk by sthen
ok jsing
|
|
|
|
|
| |
tested in a bulk by sthen
ok jsing
|
|
|
|
| |
Prompted by a remark by jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the terminating NUL. EVP_read_pw_string_min() got this wrong, leading to
a one-byte buffer overrun in all callers of EVP_read_pw_string().
Found by mestre running 'openssl passwd' with MALLOC_OPTIONS including C.
Fix this by doing some basic sanity checking in EVP_read_pw_string_min().
Cap the len argument at BUFSIZ and ensure that min < len as well as
0 <= min and 1 <= len. The last two checks are important as these
numbers may end up in reallocarray().
ok bcook (on previous version), jsing, mestre
|
|
|
|
|
|
| |
EVP_Verify*.
ok tb@
|
|
|
|
|
| |
tested in a bulk build by sthen
ok jsing
|
|
|
|
|
|
|
|
| |
EVP_PKEY_get_attr_by_OBJ(3), X509at_get_attr_by_OBJ(3),
X509at_get0_data_by_OBJ(3), X509_REQ_get_attr_by_OBJ(3)
tested in a bulk by sthen
ok beck (as part of a larger diff)
|
|
|
|
|
| |
tested in a bulk build by sthen
ok beck (as part of a larger diff)
|