summaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)Author
2016-02-11Remove TLS heartbeat, disable DTLS heartbeatRich Salz
To enable heartbeats for DTLS, configure with enable-heartbeats. Heartbeats for TLS have been completely removed. This addresses RT 3647 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Move to REF_DEBUG, for consistency.Rich Salz
Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT This is also RT 4181 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11GH620: second diff from rt-2275, adds error codeRich Salz
clean up and apply patches from RT-2275 Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Hide OPENSSL_INIT_SETTINGS.Rich Salz
Make OPENSSL_INIT_SETTINGS an opaque structure. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-10After renaming init, update errors.Rich Salz
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-10Make it possible to get ENGINESDIR info from OpenSSL_versionsRichard Levitte
Have apps/openssl display the result along with OPENSSLDIR As part of this, add ENGINESDIR in util/mk1mf.pl Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Attempt to log an error if init failedMatt Caswell
If init failed we'd like to set an error code to indicate that. But if init failed then when the error system tries to load its strings its going to fail again. We could get into an infinite loop. Therefore we just set a single error the first time around. After that no error is set. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10The new init functions can now fail so shouldn't be voidMatt Caswell
The new init functions can fail if the library has already been stopped. We should be able to indicate failure with a 0 return value. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Deprecate the -issuer_checks debugging optionViktor Dukhovni
This was a developer debugging feature and was never a useful public interface. Added all missing X509 error codes to the verify(1) manpage, but many still need a description beyond the associated text string. Sorted the errors in x509_txt.c by error number. Reviewed-by: Stephen Henson <steve@openssl.org>
2016-02-10The guard macro to be defined didn't match the guard macro checkedRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-10Rename INIT funtions, deprecate old ones.Rich Salz
Man, there were a lot of renamings :) Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-10clean away old VMS cruftRichard Levitte
The old building scripts get removed, they are hopelessly gone in bit rot by now. Also remove the old symbol hacks. They were needed needed to shorten some names to 31 characters, and to resolve other symbol clashes. Because we now compile with /NAMES=(AS_IS,SHORTENED), this is no longer required. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10unified build scheme: add a "unified" template for VMS descrip.mmsRichard Levitte
As part of this, change util/mkdef.pl to stop adding libraries to depend on in its output. mkdef.pl should ONLY output a symbol vector. Because symbol names can't be longer than 31 characters, we use the compiler to shorten those that are longer down to 23 characters plus an 8 character CRC. To make sure users of our header files will pick up on that automatically, add the DEC C supported extra headers files __decc_include_prologue.h and __decc_include_epilogue.h. Furthermore, we add a config.com, so VMS people can configure just as comfortably as any Unix folks, thusly: @config Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Configure et al: move the installation directory logic to MakefilesRichard Levitte
The logic to figure out the combinations of --prefix and --openssldir has stayed in Configure so far, with Unix paths as defaults. However, since we're making Configure increasingly platform agnostic, these defaults need to change and adapt to the platform, along with the logic to combine them. The easiest to provide for this is to move the logic and the defaults away from Configure and into the build files. This also means that the definition of the macros ENGINESDIR and OPENSSLDIR move away from include/openssl/opensslconf.h and into the build files. Makefile.in is adapted accordingly. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Remove store.Rich Salz
Rebased and merged by me, with Ben's approval. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Ben Laurie <ben@openssl.org>
2016-02-09Use NON_EMPTY_TRANSLATION_UNIT, consistently.Rich Salz
This also closes RT 4123 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Updates for auto init/deinit review commentsMatt Caswell
Fixes for the auto-init/deinit code based on review comments Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Provide a thread stop APIMatt Caswell
Add the OPENSSL_INIT_thread_stop() function. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Auto init/de-init libsslMatt Caswell
Building on the pervious commit to auto initialise and de-initialise libssl Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Auto init/deinit libcryptoMatt Caswell
This builds on the previous commit to auto initialise/deinitialise libcrypto. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Provide framework for auto initialise/deinitialise of the libraryMatt Caswell
This commit provides the basis and core code for an auto initialisation and deinitialisation framework for libcrypto and libssl. The intention is to remove the need (in many circumstances) to call explicit initialise and deinitialise functions. Explicit initialisation will still be an option, and if non-default initialisation is needed then it will be required. Similarly for de-initialisation (although this will be a lot easier since it will bring all de-initialisation into a single function). Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-08Suppress DANE TLSA reflection when verification failsViktor Dukhovni
As documented both SSL_get0_dane_authority() and SSL_get0_dane_tlsa() are expected to return a negative match depth and nothing else when verification fails. However, this only happened when verification failed during chain construction. Errors in verification of the constructed chain did not have the intended effect on these functions. This commit updates the functions to check for verify_result == X509_V_OK, and no longer erases any accumulated match information when chain construction fails. Sophisticated developers can, with care, use SSL_set_verify_result(ssl, X509_V_OK) to "peek" at TLSA info even when verification fail. They must of course first check and save the real error, and restore the original error as quickly as possible. Hiding by default seems to be the safer interface. Introduced X509_V_ERR_DANE_NO_MATCH code to signal failure to find matching TLSA records. Previously reported via X509_V_ERR_CERT_UNTRUSTED. This also changes the "-brief" output from s_client to include verification results and TLSA match information. Mentioned session resumption in code example in SSL_CTX_dane_enable(3). Also mentioned that depths returned are relative to the verified chain which is now available via SSL_get0_verified_chain(3). Added a few more test-cases to danetest, that exercise the new code. Resolved thread safety issue in use of static buffer in X509_verify_cert_error_string(). Fixed long-stating issue in apps/s_cb.c which always sets verify_error to either X509_V_OK or "chain to long", code elsewhere (e.g. s_time.c), seems to expect the actual error. [ The new chain construction code is expected to correctly generate "chain too long" errors, so at some point we need to drop the work-arounds, once SSL_set_verify_depth() is also fixed to propagate the depth to X509_STORE_CTX reliably. ] Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Remove ancient compatibility defines.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Only use compatibility macros for < 1.1 API.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08use new function namesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Reorganise functions.Dr. Stephen Henson
Move all PKCS12_SAFEBAG functions into new file p12_sbag.c. Move MAC functions into p12_mutl.c Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08pkcs12.h header reorganisation.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Rename PKCS12 functionDr. Stephen Henson
Rename ancient PKCS12 functions to use more logical names. Include defines from old to new name. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08pkcs12 accessorsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08New PKCS12 accessors, change macros to functions.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Make PKCS12 structures opaqueDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Deprecate undocumented SSL_cache_hit().Dr. Stephen Henson
Deprecate undocumented SSL_cache_hit(). Make SSL_session_reused() into a real function. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-08Handle SSL_shutdown while in init more appropriately #2Matt Caswell
Previous commit 7bb196a71 attempted to "fix" a problem with the way SSL_shutdown() behaved whilst in mid-handshake. The original behaviour had SSL_shutdown() return immediately having taken no action if called mid- handshake with a return value of 1 (meaning everything was shutdown successfully). In fact the shutdown has not been successful. Commit 7bb196a71 changed that to send a close_notify anyway and then return. This seems to be causing some problems for some applications so perhaps a better (much simpler) approach is revert to the previous behaviour (no attempt at a shutdown), but return -1 (meaning the shutdown was not successful). This also fixes a bug where SSL_shutdown always returns 0 when shutdown *very* early in the handshake (i.e. we are still using SSLv23_method). Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-06Add SSL_get0_verified_chain() to return verified chain of peerDr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-05Add a BIO_ADDR_clear functionMatt Caswell
Adds a new function BIO_ADDR_clear to reset a BIO_ADDR back to an unitialised state, and to set the family to AF_UNSPEC. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-05Make DTLSv1_listen a first class function and change its typeMatt Caswell
The DTLSv1_listen function exposed details of the underlying BIO abstraction and did not properly allow for IPv6. This commit changes the "peer" argument to be a BIO_ADDR and makes it a first class function (rather than a ctrl) to ensure proper type checking. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-05Long overdue cleanup of X509 policy tree verificationViktor Dukhovni
Replace all magic numbers with #defined constants except in boolean functions that return 0 for failure and 1 for success. Avoid a couple memory leaks in error recovery code paths. Code style improvements. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-02-05Add EC_KEY_priv2buf()Dr. Stephen Henson
Add new function EC_KEY_priv2buf() to allocated and encode private key octet in one call. Update and simplify ASN.1 and print routines. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-05update EC ASN1 and print routinesDr. Stephen Henson
Update EC ASN.1 and print routines to use EC_KEY_oct2priv and EC_KEY_priv2oct. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-05Add EC_KEY_oct2priv and EC_KEY_priv2octDr. Stephen Henson
New functions EC_KEY_oct2priv and EC_KEY_priv2oct. These are private key equivalents of EC_POINT_oct2point and EC_POINT_point2oct which convert between the private key octet format and EC_KEY. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-05Add ASN1_buf_print to print a buffer in ASN1_bn_print format.Dr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-04Add new DTLS-SRTP protection profiles from RFC 7714Dmitry Sobinov
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-04Use WSAGetLastError() on windowsKurt Roeckx
Windows doesn't have h_error or hstrerror() Reviewed-by: Richard Levitte <levitte@openssl.org> MR: #1848
2016-02-04update OID tablesDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-03RT2752: Add some EKU OID'sRich Salz
And some others found in the Internet. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-03Tweak opensslconf.h.in for styleRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-03make updateRichard Levitte
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-03Refactoring BIO: adapt BIO_s_connect and BIO_s_acceptRichard Levitte
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-03make updateRichard Levitte
Reviewed-by: Kurt Roeckx <kurt@openssl.org>