summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Reduce instances of `` '' in manuals.bentley2014-11-151-5/+5
| | | | | | | | | | | | troff displays these as typographic quotes, but nroff implementations almost always print them literally, which rarely has the intended effect with modern fonts, even in stock xterm. These uses of `` '' can be replaced either with more semantic alternatives or with Dq, which prints typographic quotes in a UTF-8 locale (but will automatically fall back to `` '' in an ASCII locale). improvements and ok schwarze@
* Add many missing error checks (probably not exhaustive, but a good start):miod2014-11-1312-574/+976
| | | | | | | | | | | | - make VKO_compute_key() no longer void so that it can return failure. - fix unchecked allocations in too many routines to mention /-: - fix unchecked BN operations in gost2001_do_sign(), gost2001_do_verify(), VKO_compute_key(). - fix the gost2001_do_sign() interface violation by having its sole caller free the BIGNUM it passes to that function by itself, instead of having the callee do this. Reviewed (except for the last item) by Dmitry Eremin-Solenikov.
* Sacrifice this code to the KNF deities.miod2014-11-1318-804/+802
|
* Fix GOST TC26-B curve description.miod2014-11-122-4/+4
|
* f{read,write} take a number of items and an item size as arguments, andmiod2014-11-114-28/+14
| | | | | | | | | | | | | | | | | | | | | return the number of items read of written. When you intend to return the number of bytes actually processed, it is wise to pass 1 as the item size and the size as the number of items. But in *some* places, the OpenSSL does the opposite, and has extra logic to change a successful return of 1 (item processed) into the real size. And, guess why it does that? Because of old VMS, for they (used to) have a substandard stdio implementation. Note that this change causes the return values of BIO_dump_fp() and BIO_dump_indent_fp() to no longer be useless (actual number of callback calls), but actual bytes output. Given the irrelevance of the return value before, it is unlikely that anything depends upon it (and if something does, it probably has other problems in need for a fix...) ok tedu@ beck@ jsing@
* correct the failure case for getentropy on win32bcook2014-11-112-6/+6
| | | | | | CryptAcquireContext and CryptGenRandom returns zero (FALSE) if fails. From: Dongsheng Song <dongsheng.song@gmail.com>
* Don't free garbage in ec_wNAF_mul() if wNAF could be allocated butguenther2014-11-112-10/+22
| | | | | | | other allocations in the same block couldn't. problem pointed out by David Ramos on the openssl-dev list ok miod@ doug@
* delete extra word in Ndderaadt2014-11-111-3/+3
|
* KNF (when not conflicting with other cleanup changes in progress)miod2014-11-0928-746/+1014
|
* GOST tests, not connected to the build yet.miod2014-11-092-0/+1464
|
* Remove DEBUG_SIGN code. Make sure gost_key_unwrap_crypto_pro() returns failuremiod2014-11-094-38/+8
| | | | instead of a printf and a success return, when the operation fails.
* Rename internal yet public key_{un,}wrap_crypto_pro symbols by prepending amiod2014-11-096-60/+64
| | | | | `gost_' prefix to them, so that we do not pollute the global namespace too much.
* Replace RAND_bytes() usage with arc4random_buf().miod2014-11-096-20/+6
|
* GOST crypto algorithms (well, most of them), ported from the removed GOSTmiod2014-11-0975-31/+13110
| | | | | | | | | | | | engine to regular EVP citizens, contributed by Dmitry Eremin-Solenikov; libcrypto bits only for now. This is a verbatim import of Dmitry's work, and does not compile in this state; the forthcoming commits will address these issues. None of the GOST code is enabled in libcrypto yet, for it still gets compiled with OPENSSL_NO_GOST defined. However, the public header gost.h will be installed.
* Introduce EVP_MD_CTX_ctrl(), to allow for fine control of a given digest.miod2014-11-094-4/+52
| | | | | | | | | This functionality was already available (and optional), and used in the bowels of the ASN.1 code. This exposes it as a public interface, which will be used by the upcoming GOST code. Crank libcrypto minor version. From Dmitry Eremin-Solenikov.
* Allow digest routines to provide their own HASH_FINAL routine; will bemiod2014-11-092-6/+10
| | | | | | necessary for upcoming GOST code. From Dmitry Eremin-Solenikov
* Clean up more SSLv2 remnants.jsing2014-11-086-58/+30
|
* More OPENSSL_NO_TLSEXT clean up.jsing2014-11-073-11/+11
|
* missing outlen in tls_write decltedu2014-11-071-3/+3
|
* Document the -servername option for openssl(1) s_client.jsing2014-11-071-2/+7
| | | | Based on a diff from Rusty (rustyl at outband dot net) and OpenSSL.
* TLS is pretty boring without TLS extensions... unifdef OPENSSL_NO_TLSEXT,jsing2014-11-062-76/+2
| | | | which was already done for libssl some time back.
* ssl_sock_init() does nothing, so remove it...jsing2014-11-061-17/+1
|
* edns0 is not currently supported: confirmed by sthen and ericjmc2014-11-051-7/+7
| | | | | diff From: Mike Burns (though my fix differs a bit)
* simple select() to poll() conversion; reviewed by millert and dougderaadt2014-11-041-9/+9
|
* only call SRTP (whatever that is) functions when the connection type istedu2014-11-032-10/+10
| | | | DTLS (whatever that is) instead of for TLS too. ok jsing.
* minor cleanup of zlib code. DSO is gone. ok jsing.tedu2014-11-0310-434/+14
|
* Add hooks to override native arc4random_buf on FreeBSD.bcook2014-11-034-0/+298
| | | | | | | | | | | | | | | | The FreeBSD-native arc4random_buf implementation falls back to weak sources of entropy if the sysctl fails. Remove these dangerous fallbacks by overriding locally. Unfortunately, pthread_atfork() is also broken on FreeBSD (at least 9 and 10) if a program does not link to -lthr. Callbacks registered with pthread_atfork() simply fail silently. So, it is not always possible to detect a PID wraparound. I wish we could do better. This improves arc4random_buf's safety compared to the native FreeBSD implementation. Tested on FreeBSD 9 and 10.
* Add a tls_connect_fds() function that allows a secure connection to bejsing2014-11-023-6/+34
| | | | | | | | | | established using a pair of existing file descriptors. Based on a diff/request from Jan Klemkow. Rides previous libtls rename/library bump. Discussed with tedu@.
* Remove remnants from RC2 and SEED - there are no longer any cipher suitesjsing2014-11-024-106/+46
| | | | | | | that use these algorithms (and SEED was removed from libcrypto some time ago). ok doug@
* Initial regress for libtls hostname verification.jsing2014-11-013-2/+247
|
* Remove ephemeral RSA key handling.jsing2014-10-311-43/+4
|
* Use automatic DH ephemeral parameters instead of fixed 512 bit.jsing2014-10-311-38/+23
| | | | Based on OpenSSL.
* Remove an outdated comment re EDH vs DHE - DHE is now used consistently andjsing2014-10-312-16/+2
| | | | there are backwards compatible names/aliases for EDH.
* Update comments for TLS ExtensionType values - many of the referencedjsing2014-10-312-76/+92
| | | | | drafts are now RFCs. Also add the TLS extension type for ALPN and be consistent with RFC reference formatting.
* Crank libssl major due to recent additions, removals and changes.jsing2014-10-312-4/+4
|
* Remove now unused remnants from public structs.jsing2014-10-314-14/+4
|
* Add support for automatic DH ephemeral keys.jsing2014-10-3112-44/+194
| | | | | | | This allows an SSL server to enable DHE ciphers with a single setting, which results in an DH key being generated based on the server key length. Partly based on OpenSSL.
* Remove support for ephemeral/temporary RSA private keys.jsing2014-10-3114-474/+88
| | | | | | | | | The only use for these is via SSL_OP_EPHEMERAL_RSA (which is effectively a standards violation) and for RSA sign-only, should only be possible if you are using an export cipher and have an RSA private key that is more than 512 bits in size (however we no longer support export ciphers). ok bcook@ miod@
* Update regress for the libressl to libtls rename.jsing2014-10-314-0/+288
|
* Rename libressl to libtls to avoid confusion and to make it easier tojsing2014-10-3113-451/+422
| | | | | | distinguish between LibreSSL (the project) and libressl (the library). Discussed with many.
* clean up verbiage around the calculations; ok ingo jmc ottoderaadt2014-10-301-5/+5
|
* Don't mention old systems where realloc(NULL, n) didn't work as wemillert2014-10-301-11/+7
| | | | | don't want to give people the idea that this is non-portable (it has been present since C89). OK deraadt@ schwarze@
* my mistake. we already did increase buffers to 16k; increasing to 64ktedu2014-10-301-2/+2
| | | | would be the next stage of embiggening. restore 16k.
* rework the poll loop to poll in both directions so it doesn't get stucktedu2014-10-301-47/+211
| | | | | if one pipe stalls out. from a diff by Arne Becker. (buffer size left alone for now)
* deregister; no binary changejsg2014-10-28100-460/+460
| | | | ok jsing@ miod@
* Check the result of sk_*_push() operations for failure.miod2014-10-2818-88/+170
| | | | ok doug@ jsing@
* POLLIN is not guaranteed to be set in revents for EOF so check formillert2014-10-261-3/+3
| | | | POLLHUP too. OK deraadt@
* Remove unnecessary include: netinet/in_systm.h is not needed by theselteo2014-10-241-2/+1
| | | | | | programs. ok deraadt@ millert@
* Save space in man page: err() -> errc() and combine vars.doug2014-10-231-18/+11
| | | | | | Suggested by millert@ and schwarze@. OK schwarze@, millert@
* In PKCS12_setup_mac(), do not assign p12->mac->salt->length until the allocationmiod2014-10-222-16/+18
| | | | | of p12->mac->salt->data has actually succeeded. In one of my trees for a long time already...