summaryrefslogtreecommitdiff
path: root/lib/libcrypto
AgeCommit message (Collapse)Author
2015-12-03Fix for OpenSSL CVE-2015-3194Bob Beck
ok krw@
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-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-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-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
2015-10-08Spelling in commentBob Beck
2015-10-06prefer limits.h over sys/limits.hBrent Cook
ok deraadt@
2015-10-05Make sure dot is not set after tz - fixes incorrect handling, which allowsJoel Sing
20151005171301+1.09Z to be treated as a valid time. ok beck@
2015-10-04Apply some style(9), tweak a few things for readability and add someJoel Sing
additional bounds checks. ok beck@
2015-10-02Flense the greasy black guts of unreadble string parsing code out of three areasBob Beck
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@
2015-09-30Place all of the ASN1 M_ macros under #ifndef LIBRESSL_INTERNAL.Joel Sing
2015-09-30Expand M_i2d_ASN1_OCTET_STRING macros - no change in generated assembly,Joel Sing
aside from line numbers.
2015-09-30s/M_ASN1_ENUMERATED_free/ASN1_ENUMERATED_free/Joel Sing
2015-09-30Replace M_ASN1_ENUMERATED_(free|new) with ASN1_ENUMERATED_(free|new).Joel Sing
2015-09-30Replace M_ASN1_OCTET_STRING_(free|new) with ASN1_OCTET_STRING_(free|new).Joel Sing
2015-09-30Replace M_ASN1_UTCTIME_(new|free) with ASN1_UTCTIME_(new|free).Joel Sing
2015-09-30Replace M_ASN1_IA5STRING_(new|free) with ASN1_IA5STRING_(new|free). SameJoel Sing
with one s/M_ASN1_VISIBLESTRING_new/ASN1_VISIBLESTRING_new/.
2015-09-30Replace M_ASN1_GENERALIZEDTIME_(new|free) withJoel Sing
ASN1_GENERALIZEDTIME_(new|free).
2015-09-30s/M_ASN1_TIME_free/ASN1_TIME_free/Joel Sing
2015-09-30Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this isJoel Sing
different from the macro expansion, but the result is the same. Also replace some ASN1_STRING_dup() with ASN1_INTEGER_dup(). ok beck@ doug@