summaryrefslogtreecommitdiff
path: root/src/lib/libssl (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert five more manuals from POD to mdoc.schwarze2015-11-115-458/+0
| | | | | I found drafts of these in my tree, probably originally from Max Fillinger, that just needed minor polishing.
* Convert and enable CMS manuals.schwarze2015-11-1116-1234/+0
| | | | Already some time ago, bcook@ said these can be installed.
* SSL_CTX_sess_set_remove mlink should be SSL_CTX_sess_set_remove_cb;jmc2015-11-101-2/+2
|
* Fix gcc version preprocessor checks to cope with gcc 5.x and beyond;miod2015-11-061-2/+2
| | | | reported by Ruslan Babayev.
* Cast Td4[] values (which are uint8_t) to uint32_t before shifting them left bymiod2015-11-051-5/+5
| | | | | | | | | 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.
* Mention ROTL() is always invoked with a proper shift value, due to the way themiod2015-11-051-1/+2
| | | | | CAST_KEY is constructed. This is expected to reduce blood pressure in auditors.
* bump to 2.3.2, format LIBRESSL_VERSION_NUMBER like OPENSSL_VERSION_NUMBER.bcook2015-11-031-3/+3
| | | | | | Suggested by WubTheCaptain so the same comparison code can be used with LibreSSL. https://www.openssl.org/docs/manmaster/crypto/OPENSSL_VERSION_NUMBER.html
* Fix typo in comment of previous commit: "that that".reyk2015-11-021-3/+3
|
* bump minors after adding EVP_aead_chacha20_poly1305_ietf()reyk2015-11-022-2/+2
| | | | OK jsing@
* Add EVP_aead_chacha20_poly1305_ietf() - The informational RFC 7539,reyk2015-11-022-19/+113
| | | | | | | | | "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@
* Pull in <sys/types.h> to get ssize_t or <stdint.h> to get uint32_t, instead ofmiod2015-10-301-1/+2
| | | | | relying upon previously included headers to do this, to enhance portability; from Pascal Cuoq, libressl github pull request #52
* Sort the obsolete flags.doug2015-10-252-12/+12
|
* Mark SSL_OP_NO_{COMPRESSION,SSLv2,SSLv3} as obsolete.doug2015-10-252-10/+8
| | | | | | For backward compatibility, the flags are redefined as 0. ok jsing@
* Remove last vestige of SSL_OP_NO_SSLv3 support.doug2015-10-252-8/+2
| | | | | | No part of LibreSSL checks for this flag any longer. ok jsing@
* Simplify ssl23_get_client_hello error handling.doug2015-10-252-52/+52
| | | | | | | | | | 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@
* Another change that is needed to restore the previous behaviour ofjsing2015-10-221-5/+3
| | | | | | | ASN1_{GENERALIZED,UTC}TIME_set_string(), which allows it to be called with a NULL pointer. ok beck@
* Restore previous behaviour and allowjsing2015-10-221-2/+7
| | | | | | | | ASN1_{GENERALIZED,UTC,}TIME_set_string() to be called with a NULL pointer. Found the hard way by @kinichiro on github. ok beck@
* Reject too small bits value in BN_generate_prime_ex(), so that it does not riskmiod2015-10-213-4/+22
| | | | | | | | 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@
* In the case where len is not a multiple of sizeof(RC4_CHUNK) the RC4 codejsing2015-10-211-63/+1
| | | | | | | | | | | | | | 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@
* Lob a style(9) grenade in here.jsing2015-10-203-172/+185
|
* free rbio before wbiobeck2015-10-192-14/+14
| | | | ok jsing@
* Stop supporing "legcay" time formats that OpenSSL supports. Rewrite thebeck2015-10-197-609/+348
| | | | | | utctime and gentime wrappers accordingly. Along with some other cleanup. this also removes the need for timegm. ok bcook@ sthen@ jsing@
* Remove pointless externs - the structs are declared in the same files ajsing2015-10-163-8/+3
| | | | few lines above.
* Expand DECLARE_ASN1_ALLOC_FUNCTIONS and DECLARE_ASN1_FUNCTIONS_constjsing2015-10-163-11/+34
| | | | macros. The only change in the generated assembly is due to line numbering.
* Remove pointless uses of DECLARE_ASN1_ENCODE_FUNCTIONS_const.jsing2015-10-163-8/+5
| | | | | DECLARE_ASN1_FUNCTIONS_const already includes this macro so using both means we end up with duplicate function prototypes and externs.
* Fix use of pointer value after BIO_free, and remove senseless NULL checks.beck2015-10-162-14/+16
| | | | ok bcook@
* actually include the prerequisite dependency for BIO instead of doing nastynessbeck2015-10-161-5/+2
|
* better fix for overrun reported by Qualys Security.tedu2015-10-141-4/+1
| | | | | | 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
* Bail out early if we have no buf_lenbeck2015-10-141-1/+5
| | | | ok miod@
* fix a memory leak reported by Qualys Security.tedu2015-10-141-3/+4
| | | | | | move the bndec variable in tighter since it's not used elsewhere in the loop, then always free it after use. ok bcook miod
* Ensure we don't write a 0 byte past end of the buffer in the error case.beck2015-10-141-3/+3
| | | | ok bcook@ deraadt@
* Add EVP_AEAD_CTX_init(3) manpage to document the new(ish) AEAD API.reyk2015-10-141-0/+4
| | | | | | | | | | | | 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@
* Put ASN1_dup() under #ifndef LIBRESSL_INTERNAL.jsing2015-10-131-5/+5
|
* Convert ECParameters_dup() from a macro that uses ASN1_dup_of() into anjsing2015-10-133-5/+20
| | | | | | actual function. This removes the last ASN1_dup_of usage from the tree. Feedback from doug@ and miod@
* Convert a number of the old ASN1_{d2i,i2d}_{bio,fp}_of() macros tojsing2015-10-131-19/+19
| | | | | | ASN1_item_{d2i,i2d}_{bio,fp}() function calls. ok beck@ doug@
* Group d2i/i2d function prototypes by type and add missing externs for thejsing2015-10-131-7/+12
| | | | DSAPublicKey, DSAPrivateKey and DSAparams ASN1_ITEMs.
* unifdef EVP_CHECK_DES_KEY: Ben Kaduk noticed it has a syntax error; thatguenther2015-10-122-20/+2
| | | | | | | | 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@
* Rip the guts out of another gibbering horror of a time comparison function, andbeck2015-10-082-37/+24
| | | | | mark it as #ifndef LIBRESSL_INTERNAL at least we don't use this. ok jsing@
* revert previous accidental commitbeck2015-10-082-23/+36
|
* Spelling in commentbeck2015-10-083-39/+25
|
* include <sys/time.h> for gettimeofday(2)bcook2015-10-072-2/+4
|
* prefer limits.h over sys/limits.hbcook2015-10-061-3/+3
| | | | ok deraadt@
* Make sure dot is not set after tz - fixes incorrect handling, which allowsjsing2015-10-051-2/+2
| | | | | | 20151005171301+1.09Z to be treated as a valid time. ok beck@
* Apply some style(9), tweak a few things for readability and add somejsing2015-10-041-36/+40
| | | | | | additional bounds checks. ok beck@
* SSL_new(): fix ref counting and memory leak in error path.doug2015-10-032-16/+6
| | | | | | | | | | Rather than a half-hearted attempt to free up resources and fix ref counting at the SSL_CTX level, let SSL_free() do its job. This diff got lost in the shuffle somewhere. It's from last year. Ref counting error reported by Parakleta in github ticket #51. Thanks! ok jsing@, beck@
* Flense the greasy black guts of unreadble string parsing code out of three areasbeck2015-10-027-271/+332
| | | | | | | | | 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@
* s/ssl3_client_kex/ssl3_send_client_kex/ for consistency with the caller.jsing2015-10-022-18/+22
|
* Place all of the ASN1 M_ macros under #ifndef LIBRESSL_INTERNAL.jsing2015-09-301-30/+37
|
* Expand M_i2d_ASN1_OCTET_STRING macros - no change in generated assembly,jsing2015-09-301-3/+5
| | | | aside from line numbers.
* s/M_ASN1_ENUMERATED_free/ASN1_ENUMERATED_free/jsing2015-09-301-2/+2
|