summaryrefslogtreecommitdiffstats
path: root/util
AgeCommit message (Collapse)Author
2016-09-07Allow asan, msan and ubsan to be configured with shared librariesRichard Levitte
The background story is that util/shlib_wrap.sh was setting LD_PRELOAD or similar platform dependent variables, just in case the shared libraries were built with -rpath. Unfortunately, this doesn't work too well with asan, msan or ubsan. So, the solution is to forbid the combination of shared libraries, -rpath and any of the sanity analyzers we can configure. This changes util/shlib_wrap.sh so it only contains the code that sets LD_PRELOAD when -rpath has been used when configuring. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-24Un-delete still documented X509_STORE_CTX_set_verifyViktor Dukhovni
It should not have been removed. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-23Removes {i2o,o2i}_SCT_signature from the CT public APIRob Percival
They may return if an SCT_signature struct is added in the future that allows them to be refactored to conform to the i2d/d2i function signature conventions. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-23Internalizes SCT_verify and removes SCT_verify_v1Rob Percival
SCT_verify is impossible to call through the public API (SCT_CTX_new() is not part of the public API), so rename it to SCT_CTX_verify and move it out of the public API. SCT_verify_v1 is redundant, since SCT_validate does the same verification (by calling SCT_verify) and more. The API is less confusing with a single verification function (SCT_validate). Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-22Expose alloc functions for EC{PK,}PARAMETERSKazuki Yamaguchi
Declare EC{PK,}PARAMETERS_{new,free} functions in public headers. The free functions are necessary because EC_GROUP_get_ec{pk,}parameters() was made public by commit 60b350a3ef96 ("RT3676: Expose ECgroup i2d functions"). Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-22crypto/pkcs12: add UTF8 support.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-21update ordinalsDr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-08-19Add BIO_get_new_index()Rich Salz
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-08-19make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-19rename ordinalsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-19make updateDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-19make updateDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-18Simplify indentation of DECLARE_ and IMPLEMENT_ linesRichard Levitte
There's no reason we should enumerate every type of IMPLEMENT_ and DECLARE_ line (and forget the ones we add a little now and then). They all start with the same first word, let's just take'm all. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-18Indent ssl/Emilia Kasper
Run util/openssl-format-source on ssl/ Some comments and hand-formatted tables were fixed up manually by disabling auto-formatting. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-17make updateDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-17Add missing session id and tlsext_status accessorsRemi Gacogne
* SSL_SESSION_set1_id() * SSL_SESSION_get0_id_context() * SSL_CTX_get_tlsext_status_cb() * SSL_CTX_get_tlsext_status_arg() Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-16make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-16Remove duplicate ordinalsRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-15Add some SSLv2 ClientHello testsMatt Caswell
Test that we handle a TLS ClientHello in an SSLv2 record correctly. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-08-15Replaces CT_POLICY_EVAL_CTX_set0 entries with new setters in libcrypto.numRob Percival
Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1408)
2016-08-15Improves CTLOG_STORE settersRob Percival
Changes them to have clearer ownership semantics, as suggested in https://github.com/openssl/openssl/pull/1372#discussion_r73232196. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1408)
2016-08-13make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-12GH1446: Add SSL_SESSION_get0_cipherRich Salz
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1451)
2016-08-05Mkae CT_log_new_from_base64 always return 0 on failureRob Percival
In one failure case, it used to return -1. That failure case (CTLOG_new() returning NULL) was not usefully distinct from all of the other failure cases. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1407)
2016-08-05openssl-format-source: A few more (DECLARE|IMPLEMENT) variants to care forRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-05make updateRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-05util/mkdef.pl: mark certain PEM function declarations with STDIORichard Levitte
The macros that produce PEM_write_FOO() andd PEM_read_FOO() only do so unless 'no-stdio' has been configured. mkdef.pl should mimic that by marking those functions with the "STDIO" algo. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-05Make update, etc.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-05indent: add a couple of types we use in appsRichard Levitte
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-08-05openssl-format-source: no dash marker on *INDENT-(ON|OFF)* commentsRichard Levitte
We mark small comments with a dash immediately following the starting /*. However, *INDENT-(ON|OFF)* comments shouldn't be treated that way, or indent will ignore them if we do. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-04Remove "lockit" from internal error-hash functionRich Salz
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1389)
2016-08-01make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-29Simplify and rename SSL_set_rbio() and SSL_set_wbio()Matt Caswell
SSL_set_rbio() and SSL_set_wbio() are new functions in 1.1.0 and really should be called SSL_set0_rbio() and SSL_set0_wbio(). The old implementation was not consistent with what "set0" means though as there were special cases around what happens if the rbio and wbio are the same. We were only ever taking one reference on the BIO, and checking everywhere whether the rbio and wbio are the same so as not to double free. A better approach is to rename the functions to SSL_set0_rbio() and SSL_set0_wbio(). If an existing BIO is present it is *always* freed regardless of whether the rbio and wbio are the same or not. It is therefore the callers responsibility to ensure that a reference is taken for *each* usage, i.e. one for the rbio and one for the wbio. The legacy function SSL_set_bio() takes both the rbio and wbio in one go and sets them both. We can wrap up the old behaviour in the implementation of that function, i.e. previously if the rbio and wbio are the same in the call to this function then the caller only needed to ensure one reference was passed. This behaviour is retained by internally upping the ref count. This commit was inspired by BoringSSL commit f715c423224. RT#4572 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-25Discard BIO_set(BIO* bio) methodFdaSilvaYY
Simplify BIO init using OPENSSL_zalloc(). Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1261)
2016-07-25Make it possible for external code to set the certiciate proxy path lengthRichard Levitte
This adds the functions X509_set_proxy_pathlen(), which sets the internal pc path length cache for a given X509 structure, along with X509_get_proxy_pathlen(), which retrieves it. Along with the previously added X509_set_proxy_flag(), this provides the tools needed to manipulate all the information cached on proxy certificates, allowing external code to do what's necessary to have them verified correctly by the libcrypto code. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-25Add X509_STORE lock and unlock functionsRichard Levitte
Since there are a number of function pointers in X509_STORE that might lead to user code, it makes sense for them to be able to lock the store while they do their work. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-25make updateRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-25Add getters / setters for the X509_STORE_CTX and X509_STORE functionsRichard Levitte
We only add setters for X509_STORE function pointers except for the verify callback function. The thought is that the function pointers in X509_STORE_CTX are a cache for the X509_STORE functions. Therefore, it's preferable if the user makes the changes in X509_STORE before X509_STORE_CTX_init is called, and otherwise use the verify callback to override any results from OpenSSL's internal calculations. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-24Add EVP_ENCODE_CTX_copyJakub Zelenka
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1344)
2016-07-24Add missing X509_set_proxy_flag numJakub Zelenka
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1343)
2016-07-20Check for errors allocating the error strings.Kurt Roeckx
Reviewed-by: Richard Levitte <levitte@openssl.org> GH: #1330
2016-07-19RT4593: Add space after comma (doc nits)Rich Salz
Update find-doc-nits to find errors in SYNOPSIS (the most common place where they were missing). Reviewed-by: Matt Caswell <matt@openssl.org>
2016-07-13make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-12Make updateViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-11make updateDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-07-08Update ordinalsRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-07-08GH1278: Removed error code for alertsRich Salz
Commit aea145e removed some error codes that are generated algorithmically: mapping alerts to error texts. Found by Andreas Karlsson. This restores them, and adds two missing ones. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-07-08Replace all #define's in pod pages.Rich Salz
Function-like macros are replaced with prototypes and a note that they are implemented as macros. Constants are just referenced in-line in the text. Tweak BIO_TYPE_... documentation. Also fix RT4592. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-07-08include/openssl: don't include <windows.h> in public headers.Andy Polyakov
If application uses any of Windows-specific interfaces, make it application developer's respondibility to include <windows.h>. Rationale is that <windows.h> is quite "toxic" and is sensitive to inclusion order (most notably in relation to <winsock2.h>). It's only natural to give complete control to the application developer. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-07-05make updateRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>