summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-12decipher comment. ok bcook@Michael McConville
2015-12-12move initialization of buf up to quell warnings and make it obvious the err ↵Bob Beck
case is ok. ok bcook@
2015-12-12prevent possibly use of uninitialized variableBob Beck
ok bcook@
2015-12-12make the counter a size_t as well, which quells a warning on visual studio 2015Bob Beck
ok bcook@
2015-12-09bump the major for libcrypto/ssl/tls for a CRYPTO_chacha_20 ABI changeBrent Cook
ok jsing@, deraadt@, beck@
2015-12-09Change the counter argument for CRYPTO_chacha_20 to be 64-bits on all platforms.Brent Cook
The recently-added EVP_aead_chacha20_poly1305_ietf() function, which implements informational RFC 7539, "ChaCha20 and Poly1305 for IETF Protocols", needs a 64-bit counter to avoid truncation on 32-bit platforms. The existing TLS ChaCha20-Poly1305 ciphersuite is not impacted by this, but making this change requires an ABI bump. ok jsing@, "Looks sane" beck@
2015-12-07Remove SHA0 check, as we did in v1.21 of sha.h.Brent Cook
This enables ENGINE_get_digest to work again with SHA1. noted by NARUSE, Yui, @nurse from github
2015-12-04Fix for OpenSSL CVE-2015-3195Bob Beck
ok djm@ jsing@
2015-12-03Fix for OpenSSL CVE-2015-3194Bob Beck
ok krw@
2015-11-15fix references to lhash(3);Jason McIntyre
2015-11-14mutli -> multiMiod Vallat
2015-11-14Various *syncron* -> *synchron* typos.Miod Vallat
2015-11-12update cross references after deleting the imaginary MLINKSIngo Schwarze
bn_internal(3) and lhash(3)
2015-11-11add missing functions to NAME, or otherwise correct the mlinkJason McIntyre
entry for them; feedback/ok schwarze
2015-11-06Fix gcc version preprocessor checks to cope with gcc 5.x and beyond;Miod Vallat
reported by Ruslan Babayev.
2015-11-05Cast Td4[] values (which are uint8_t) to uint32_t before shifting them left byMiod Vallat
24 bits; if we don't, Td4[] gets cast to signed int, and according to C>=99 6.5.7, signed int shifted by enough bits to cause a the sign bit to be set is an UB. Reported by Pascal Cuoq on behalf of the trust-in-soft.com mafia I am {partial,slightly related} to.
2015-11-05Mention ROTL() is always invoked with a proper shift value, due to the way theMiod Vallat
CAST_KEY is constructed. This is expected to reduce blood pressure in auditors.
2015-11-03bump to 2.3.2, format LIBRESSL_VERSION_NUMBER like OPENSSL_VERSION_NUMBER.Brent Cook
Suggested by WubTheCaptain so the same comparison code can be used with LibreSSL. https://www.openssl.org/docs/manmaster/crypto/OPENSSL_VERSION_NUMBER.html
2015-11-02Fix typo in comment of previous commit: "that that".Reyk Floeter
2015-11-02bump minors after adding EVP_aead_chacha20_poly1305_ietf()Reyk Floeter
OK jsing@
2015-11-02Add EVP_aead_chacha20_poly1305_ietf() - The informational RFC 7539,Reyk Floeter
"ChaCha20 and Poly1305 for IETF Protocols", introduced a modified AEAD construction that is incompatible with the common style that has been already used in TLS with EVP_aead_chacha20_poly1305(). The IETF version also adds a constant (salt) that is prepended to the nonce. OK mikeb@ jsing@
2015-10-30Pull in <sys/types.h> to get ssize_t or <stdint.h> to get uint32_t, instead ofMiod Vallat
relying upon previously included headers to do this, to enhance portability; from Pascal Cuoq, libressl github pull request #52
2015-10-25Sort the obsolete flags.Doug Hogan
2015-10-25Mark SSL_OP_NO_{COMPRESSION,SSLv2,SSLv3} as obsolete.Doug Hogan
For backward compatibility, the flags are redefined as 0. ok jsing@
2015-10-25Remove last vestige of SSL_OP_NO_SSLv3 support.Doug Hogan
No part of LibreSSL checks for this flag any longer. ok jsing@
2015-10-25Simplify ssl23_get_client_hello error handling.Doug Hogan
ssl23_get_client_hello sets type=1 on error and continues processing. It should return an error immediately to simplify things. This also allows us to start removing the last of SSL_OP_NO_SSL*. Added extra paranoia for s->version to make sure it is set properly. ok jsing@
2015-10-22Another change that is needed to restore the previous behaviour ofJoel Sing
ASN1_{GENERALIZED,UTC}TIME_set_string(), which allows it to be called with a NULL pointer. ok beck@
2015-10-22Restore previous behaviour and allowJoel Sing
ASN1_{GENERALIZED,UTC,}TIME_set_string() to be called with a NULL pointer. Found the hard way by @kinichiro on github. ok beck@
2015-10-21Reject too small bits value in BN_generate_prime_ex(), so that it does not riskMiod Vallat
becoming negative in probable_prime_dh_safe(). Reported by Franck Denis who noticed `openssl gendh 0' would segfault. Fix adapted from OpenSSL RT#2701. ok beck@ jsing@
2015-10-21In the case where len is not a multiple of sizeof(RC4_CHUNK) the RC4 codeJoel Sing
will end up doing a read and write of up to 7 bytes beyond the specified length. This is effectively a non-issue since we read and write back the same data and due to alignment it is within a page boundary. Regardless, avoid this by removing the "special" handling for the remaining length and allow the standard (non-chunk) code to process the remaining bytes, which does not result in overrun. Reported by Pascal Cuoq <cuoq at trust-in-soft.com> - thanks! ok beck@ miod@
2015-10-20Lob a style(9) grenade in here.Joel Sing
2015-10-19free rbio before wbioBob Beck
ok jsing@
2015-10-19Stop supporing "legcay" time formats that OpenSSL supports. Rewrite theBob Beck
utctime and gentime wrappers accordingly. Along with some other cleanup. this also removes the need for timegm. ok bcook@ sthen@ jsing@
2015-10-16Remove pointless externs - the structs are declared in the same files aJoel Sing
few lines above.
2015-10-16Expand DECLARE_ASN1_ALLOC_FUNCTIONS and DECLARE_ASN1_FUNCTIONS_constJoel Sing
macros. The only change in the generated assembly is due to line numbering.
2015-10-16Remove pointless uses of DECLARE_ASN1_ENCODE_FUNCTIONS_const.Joel Sing
DECLARE_ASN1_FUNCTIONS_const already includes this macro so using both means we end up with duplicate function prototypes and externs.
2015-10-16Fix use of pointer value after BIO_free, and remove senseless NULL checks.Bob Beck
ok bcook@
2015-10-16actually include the prerequisite dependency for BIO instead of doing nastynessBob Beck
2015-10-14better fix for overrun reported by Qualys Security.Ted Unangst
buf is at all times kept nul terminated, so there is no need to enforce this again upon exit. (no need to move buf around after we exahust space.) ok beck miod
2015-10-14Bail out early if we have no buf_lenBob Beck
ok miod@
2015-10-14fix a memory leak reported by Qualys Security.Ted Unangst
move the bndec variable in tighter since it's not used elsewhere in the loop, then always free it after use. ok bcook miod
2015-10-14Ensure we don't write a 0 byte past end of the buffer in the error case.Bob Beck
ok bcook@ deraadt@
2015-10-14Add EVP_AEAD_CTX_init(3) manpage to document the new(ish) AEAD API.Reyk Floeter
The "authenticated encryption with additional data" API is used for ciphers like AES-GCM or ChaCha20-Poly1305. The manpage is a beginning and certainly needs more work, especially improvements in the EXAMPLES section. Based on agl's source code comments. Converted from pod to mandoc by schwarze@ OK schwarze@ jsing@
2015-10-13Put ASN1_dup() under #ifndef LIBRESSL_INTERNAL.Joel Sing
2015-10-13Convert ECParameters_dup() from a macro that uses ASN1_dup_of() into anJoel Sing
actual function. This removes the last ASN1_dup_of usage from the tree. Feedback from doug@ and miod@
2015-10-13Convert a number of the old ASN1_{d2i,i2d}_{bio,fp}_of() macros toJoel Sing
ASN1_item_{d2i,i2d}_{bio,fp}() function calls. ok beck@ doug@
2015-10-13Group d2i/i2d function prototypes by type and add missing externs for theJoel Sing
DSAPublicKey, DSAPrivateKey and DSAparams ASN1_ITEMs.
2015-10-12unifdef EVP_CHECK_DES_KEY: Ben Kaduk noticed it has a syntax error; thatPhilip Guenther
error was present in the original 2004 commit, so it hasn't been used in over 11 years, thus exceeding our deprecation requirements by over a decade. OpenSSL has chosen to *fix it*; we'll gladly watch it burn ok jsing@
2015-10-08Rip the guts out of another gibbering horror of a time comparison function, andBob Beck
mark it as #ifndef LIBRESSL_INTERNAL at least we don't use this. ok jsing@
2015-10-08revert previous accidental commitBob Beck