summaryrefslogtreecommitdiffstats
path: root/util
AgeCommit message (Collapse)Author
2016-11-16Remove a hack from ssl_test_oldMatt Caswell
ssl_test_old was reaching inside the SSL structure and changing the internal BIO values. This is completely unneccessary, and was causing an abort in the test when enabling TLSv1.3. I also removed the need for ssl_test_old to include ssl_locl.h. This required the addition of some missing accessors for SSL_COMP name and id fields. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit e304d3e20f45243f9e643607edfe4db49c329596)
2016-11-15Cherry-pick doc updates from PR 1554Rich Salz
Also fix version in libcrypto.num, from backporting new functions. Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1554) (cherry picked from commit ebcb536858a271e8812fb9bbafbc0b825e5ece24)
2016-11-15Check that SCT timestamps are not in the futureRob Percival
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1554) (cherry picked from commit 1fa9ffd934429f140edcfbaf76d2f32cc21e449b)
2016-11-10Small fixup of util/process_docs.plRichard Levitte
Apparently, pod2html doesn't add ".html" at the end of links, making them useless, so we need to fix that With thanks for the report to Michel <michel.sales@free.fr> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1897)
2016-11-02Add a DSO_dsobyaddr() functionMatt Caswell
This works the same way as DSO_pathbyaddr() but instead returns a ptr to the DSO that contains the provided symbol. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit b39eda7ee69a9277c722f8789736e00dc680cda6)
2016-11-02Partial revert of 3d8b2ec42 to add back DSO_pathbyaddrMatt Caswell
Commit 3d8b2ec42 removed various unused functions. However now we need to use one of them! This commit resurrects DSO_pathbyaddr(). We're not going to resurrect the Windows version though because what we need to achieve can be done a different way on Windows. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit cb6ea61c161e88aa0268c77f308469a67b2ec063)
2016-11-02Add a test for unrecognised record typesMatt Caswell
We should fail if we receive an unrecognised record type Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 1f3e70a450364e3152973380ea4d3bb6694f3980)
2016-10-13Remove automatic RPATH - adapt shlib_wrap.shRichard Levitte
Looking for something starting with '-Wl,-rpath,' isn't good enough, as someone might give something like '-Wl,--enable-new-dtags,-rpath,/PATH'. Looking for ',-rpath,' should be safe enough. We could remove the preloading stuff entirely, but just in case the user has chosen to given RPATH setting arguments at configuration, we'd better make sure testing will still work. Fair warning, there are some configuration options that do not work with preloaded OpenSSL libraries, such as the sanity checking ones. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 71d8ff1a8998da20db5ab8d4024c3d155b2f6733)
2016-09-26Test CBC mode padding.David Benjamin
This is a regression test for https://github.com/openssl/openssl/pull/1431. It tests a maximally-padded record with each possible invalid offset. This required fixing a bug in Message.pm where the client sending a fatal alert followed by close_notify was still treated as success. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 8523288e6d667f052bda092e01ab17986782fede)
2016-09-22Add OCSP_RESPID_match()Matt Caswell
Add a function for testing whether a given OCSP_RESPID matches with a certificate. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-22Add the ability to set OCSP_RESPID fieldsMatt Caswell
OCSP_RESPID was made opaque in 1.1.0, but no accessors were provided for setting the name/key value for the OCSP_RESPID. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-21VMS: add [.util]shlib_wrap.exe and its build instructionsRichard Levitte
This is a program for VMS that corresponds to util/shlib_wrap.sh. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit f3ff481f318b10a223d6157bde9645e1797487c5)
2016-09-21util/dofile.pl: report if a template couldn't be loadedRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit f6be8315cbdb4173008b5917d2b0fc80bb0bf06b)
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> (cherry picked from commit 342a1a23793cb99921abeabe882adf8652ba715d)
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>