summaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)Author
2016-06-04RT3895: Remove fprintf's from SSL library.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-04Change inclusion of sys/types.h to stdlib.h in include/openssl/ebcdic.hRichard Levitte
Needed to get size_t on Windows Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-04Add inclusion of stdlib.h in include/openssl/mdc2.hRichard Levitte
Needed to get size_t Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-04Add inclusion of openssl/x509.h in include/openssl/tls1.hRichard Levitte
Needed to get the needed declarations for STACK_OF(X509) Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-03Handle a memory allocation failure in ssl3_init_finished_mac()Matt Caswell
The ssl3_init_finished_mac() function can fail, in which case we need to propagate the error up through the stack. RT#3198 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-31Add an SSL_SESSION accessor for obtaining the protocol version number, withTJ Saunders
accompanying documentation. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1135)
2016-05-29add removed functions back as deprecatedJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29get rid of now empty #ifJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29cherry pick pr-512 changesJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29cherry pick pr-512 changesJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-28Remove internal functions OPENSSL_strcasecmp and OPENSSL_strncasecmpRichard Levitte
Their only reason to exist was that they didn't exist in VMS before version 7.0. We do not support such old versions any more. However, for the benefit of systems that don't get strings.h included by string.h, we include the former in e_os.h. RT#4458 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-05-27include/openssl/e_os2.h: fix 'noreturn' pre-processor logic.Andy Polyakov
Newer gcc still recognizes e.g. -std=c9x in which case it wouldn't have used 'noreturn' at all with original logic. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-23Add error return for OPENSSL_INIT_set_config_filename()Matt Caswell
The OPENSSL_INIT_set_config_filename() function can fail so ensure that it provides a suitable error code. GitHub Issue #920 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Remove unused error/function codes.Rich Salz
Add script to find unused err/reason codes Remove unused reason codes. Remove entries for unused functions Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Support for traditional format private keys.Dr. Stephen Henson
Add new function PEM_write_bio_PrivateKey_traditional() to enforce the use of legacy "traditional" private key format. Add -traditional option to pkcs8 and pkey utilities. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-21Constify stack and lhash macros.Dr. Stephen Henson
RT#4471 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-05-20Fix Windows 64 bit crashesMatt Caswell
The function InitOnceExceuteOnce is the best way to support the implementation of CRYPTO_THREAD_run_once() on Windows. Unfortunately WinXP doesn't have it. To get around that we had two different implementations: one for WinXP and one for later versions. Which one was used was based on the value of _WIN32_WINNT. This approach was starting to cause problems though because other parts of OpenSSL assume _WIN32_WINNT is going to be 0x0501 and crashes were occurring dependant on include file ordering. In addition a conditional based on _WIN32_WINNT had made its way into a public header file through commit 5c4328f. This is problematic because the value of this macro can vary between OpenSSL build time and application build time. The simplest solution to this mess is just to always use the WinXP version of CRYPTO_THREAD_run_once(). Its perhaps slightly sub-optimal but probably not noticably. GitHub Issue #1086 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-20Rename lh_xxx,sk_xxx tp OPENSSL_{LH,SK}_xxxRich Salz
Rename sk_xxx to OPENSSL_sk_xxx and _STACK to OPENSSL_STACK Rename lh_xxx API to OPENSSL_LH_xxx and LHASH_NODE to OPENSSL_LH_NODE Make lhash stuff opaque. Use typedefs for function pointers; makes the code simpler. Remove CHECKED_xxx macros. Add documentation; remove old X509-oriented doc. Add API-compat names for entire old API Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-05-19When strict SCT fails record verification failureViktor Dukhovni
Since with SSL_VERIFY_NONE, the connection may continue and the session may even be cached, we should save some evidence that the chain was not sufficiently verified and would have been rejected with SSL_VERIFY_PEER. To that end when a CT callback returs failure we set the verify result to X509_V_ERR_NO_VALID_SCTS. Note: We only run the CT callback in the first place if the verify result is still X509_V_OK prior to start of the callback. RT #4502 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-05-19make updateViktor Dukhovni
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-05-18Fixes non __GNUC__ compilationMat
adds missing check for defined(__GNUC__) Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1094)
2016-05-18Ensure verify error is set when X509_verify_cert() failsViktor Dukhovni
Set ctx->error = X509_V_ERR_OUT_OF_MEM when verificaiton cannot continue due to malloc failure. Also, when X509_verify_cert() returns <= 0 make sure that the verification status does not remain X509_V_OK, as a last resort set it it to X509_V_ERR_UNSPECIFIED, just in case some code path returns an error without setting an appropriate value of ctx->error. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-18Make OPENSSL_die as noreturnhesiod
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/526)
2016-05-18Make it possible to have RFC2254 escapes with ASN1_STRING_print_ex()Richard Levitte
Also adds 'esc_2254' to the possible command line name options RT#1466 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-18OID code tidy up.Dr. Stephen Henson
Tidy up and simplify OBJ_dup() and OBJ_create(). Sanity check added OIDs: don't allow duplicates. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-18Add some error messages for malloc failsMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Manual fixes after copyright consolidationRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17X509_STORE_CTX accessors.Rich Salz
Add some functions that were missing when a number of X509 objects became opaque (thanks, Roumen!) Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 03/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16const correctness: make HMAC_size() take a const *Steffan Karger
CLA: none; trivial Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1070
2016-05-16Fold threads.h into crypto.h making API publicViktor Dukhovni
Document thread-safe lock creation Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16Do not access SSL struct directly in TLS1_get_version and ↵Alessandro Ghedini
TLS1_get_client_version macros Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-16Add SSL_client_version() getter functionAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-16Propagate tlsext_status_type from SSL_CTX to SSLjfigus
To allow OCSP stapling to work with libcurl. Github PR #200 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-16Unify <TYPE>_up_ref methods signature and behaviour.FdaSilvaYY
Add a status return value instead of void. Add some sanity checks on reference counter value. Update the docs. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-13Fix stack constification definitions.Dr. Stephen Henson
RT#4471 Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-12Appease ubsanEmilia Kasper
ERR_LIB_USER has value 128, and shifting into the sign bit upsets the shift sanitizer. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-10crypto/des: remove obsolete functions.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-10Restore the ERR_remove_thread_state() API and make it a no-opRichard Levitte
The ERR_remove_thread_state() API is restored to take a pointer argument, but does nothing more. ERR_remove_state() is also made into a no-op. Both functions are deprecated and users are recommended to use OPENSSL_thread_stop() instead. Documentation is changed to reflect this. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-09fix tab-space mixed indentationFdaSilvaYY
No code change Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-09few missing allocation failure checks and releases on error pathsJ Mohan Rao Arisankala
- Missing checks for allocation failure. - releasing memory in few missing error paths Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-06Constify PKCS12_newpass()Dr. Stephen Henson
PR#4449 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-05Handle no async jobs in libsslMatt Caswell
If the application has limited the size of the async pool using ASYNC_init_thread() then we could run out of jobs while trying to start a libssl io operation. However libssl was failing to handle this and treating it like a fatal error. It should not be fatal...we just need to retry when there are jobs available again. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-04DEFINE_STACK_OF(ASN1_UTF8STRING) moved from ts_lcl.h to asn1.hMarek Klein
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1020)
2016-05-02Secure memory fixesTodd Short
Fix some of the variables to be (s)size_t, so that more than 1GB of secure memory can be allocated. The arena has to be a power of 2, and 2GB fails because it ends up being a negative 32-bit signed number. The |too_late| flag is not strictly necessary; it is easy to figure out if something is secure memory by looking at the arena. As before, secure memory allocations will not fail, but now they can be freed correctly. Once initialized, secure memory can still be used, even if allocations occured before initialization. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-29Fix some X509_STORE macrosMatt Caswell
Some X509_STORE macros do not work since the type was made opaque. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-04-29Add checks to X509_NAME_oneline()Dr. Stephen Henson
Sanity check field lengths and sums to avoid potential overflows and reject excessively large X509_NAME structures. Issue reported by Guido Vranken. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-29Remove BIO_dummy, it's old cruftRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-29Change 'struct bio_st' in all public header where applicableRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-29Add asn1_macRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>