summaryrefslogtreecommitdiffstats
path: root/util
AgeCommit message (Collapse)Author
2015-09-01make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-31make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-28Fix 4c42ebd; forgot to inutil util/libeay.numRich Salz
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-26Remove _locked memory functions.Rich Salz
Undocumented, unused, unnecessary (replaced by secure arena). Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-26Add NewSessionTicket test suiteMatt Caswell
Add a set of tests for checking that NewSessionTicket messages are behaving as expected. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-26Fix TLSProxy end of test detectionMatt Caswell
Previously TLSProxy would detect a successful handshake once it saw the server Finished message. This causes problems with abbreviated handshakes, or if the client fails to process a message from the last server flight. This change additionally sends some application data and finishes when the client sends a CloseNotify. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-17Add new types to indent.proRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-13for test_sslvertol, add a value to display SSL version < 3 in debugRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-13Fixups in libssl test harnessRichard Levitte
- select an actual file handle for devnull - do not declare $msgdata twice - SKE records sometimes seem to come without sig - in SKE parsing, use and use $pub_key_len when parsing $pub_key Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-11Use dynamic engine for libssl test harnessRichard Levitte
Use a dynamic engine for ossltest engine so that we can build it without subsequently deploying it during install. We do not want people accidentally using this engine. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-11Extend TLSProxy capabilitiesMatt Caswell
Add ServerHello parsing to TLSProxy. Also add some (very) limited ServerKeyExchange parsing. Add the capability to set client and server cipher lists Fix a bug with fragment lengths Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-11Add a libssl test harnessMatt Caswell
This commit provides a set of perl modules that support the testing of libssl. The test harness operates as a man-in-the-middle proxy between s_server and s_client. Both s_server and s_client must be started using the "-testmode" option which loads the new OSSLTEST engine. The test harness enables scripts to be written that can examine the packets sent during a handshake, as well as (potentially) modifying them so that otherwise illegal handshake messages can be sent. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-10Find the right indent on *BSD.Ben Laurie
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-01GH336: Return an exit code if report failsDirk Wetter
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-07-20Rewrite crypto/ex_dataRich Salz
Removed ability to set ex_data impl at runtime. This removed these three functions: const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void); int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i); int CRYPTO_ex_data_new_class(void); It is no longer possible to change the ex_data implementation at runtime. (Luckily those functions were never documented :) Also removed the ability to add new exdata "classes." We don't believe this received much (if any) use, since you can't add it to OpenSSL objects, and there are probably better (native) methods for developers to add their own extensible data, if they really need that. Replaced the internal hash table (of per-"class" stacks) with a simple indexed array. Reserved an index for "app" application. Each API used to take the lock twice; now it only locks once. Use local stack storage for function pointers, rather than malloc, if possible (i.e., number of ex_data items is under a dozen). Make CRYPTO_EX_DATA_FUNCS opaque/internal. Also fixes RT3710; index zero is reserved. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-07-16Remove obsolete key formats.Rich Salz
Remove support for RSA_NET and Netscape key format (-keyform n). Also removed documentation of SGC. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-07-15GH322: Fix typo in generated comment.Ernie Hershey
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-07-14Conversion to UTF-8 where neededRichard Levitte
This leaves behind files with names ending with '.iso-8859-1'. These should be safe to remove. If something went wrong when re-encoding, there will be some files with names ending with '.utf8' left behind. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-14Small script to re-encode files that need it to UTF-8Richard Levitte
This requires 'iconv' and that 'file' can take the options '-b' and '-i'. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-09Sort @sstacklst correctly.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-09Apply some missing updates from previous commitsMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2015-06-29make updateDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-23More secure storage of key material.Rich Salz
Add secure heap for storage of private keys (when possible). Add BIO_s_secmem(), CBIGNUM, etc. Add BIO_CTX_secure_new so all BIGNUM's in the context are secure. Contributed by Akamai Technologies under the Corporate CLA. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-09Properly check certificate in case of export ciphers.Kurt Roeckx
Reviewed-by: Matt Caswell <matt@openssl.org> MR #588
2015-06-03make update.Dr. Stephen Henson
Make update with manual edit so EVP_PKEY_asn1_set_item uses the same ordinal as 1.0.2. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-28Change return type of the new accessorsMatt Caswell
The new accessors SSL_get_client_random, SSL_get_server_random and SSL_SESSION_get_master_key should return a size_t to match the type of the |outlen| parameter. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-26make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-22Remove support for OPENSSL_NO_TLSEXTMatt Caswell
Given the pervasive nature of TLS extensions it is inadvisable to run OpenSSL without support for them. It also means that maintaining the OPENSSL_NO_TLSEXT option within the code is very invasive (and probably not well tested). Therefore it is being removed. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-21make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-20make updateDr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2015-05-20GitHub284: Fix typo in xx-32.pl scripts.StudioEtrange
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-17Add types to indent.proDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-16Client side version negotiation rewriteMatt Caswell
Continuing from the previous commit this changes the way we do client side version negotiation. Similarly all of the s23* "up front" state machine code has been avoided and again things now work much the same way as they already did for DTLS, i.e. we just do most of the work in the ssl3_get_server_hello() function. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-05-16Server side version negotiation rewriteMatt Caswell
This commit changes the way that we do server side protocol version negotiation. Previously we had a whole set of code that had an "up front" state machine dedicated to the negotiating the protocol version. This adds significant complexity to the state machine. Historically the justification for doing this was the support of SSLv2 which works quite differently to SSLv3+. However, we have now removed support for SSLv2 so there is little reason to maintain this complexity. The one slight difficulty is that, although we no longer support SSLv2, we do still support an SSLv3+ ClientHello in an SSLv2 backward compatible ClientHello format. This is generally only used by legacy clients. This commit adds support within the SSLv3 code for these legacy format ClientHellos. Server side version negotiation now works in much the same was as DTLS, i.e. we introduce the concept of TLS_ANY_VERSION. If s->version is set to that then when a ClientHello is received it will work out the most appropriate version to respond with. Also, SSLv23_method and SSLv23_server_method have been replaced with TLS_method and TLS_server_method respectively. The old SSLv23* names still exist as macros pointing at the new name, although they are deprecated. Subsequent commits will look at client side version negotiation, as well of removal of the old s23* code. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-05-14Update mkdef for moved header file.Rich Salz
crypto/cryptlib.h moved to crypto/include/internal; update the script. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-14Adjust unixly mk1mf after introduction of tkeyRichard Levitte
Added depencies on the public variants of some keys in test to Makefile. Added the newly introduced key files from test/ in the list of files to copy in util/pl/unix.pl. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14Identify and move OpenSSL internal header filesRichard Levitte
There are header files in crypto/ that are used by the rest of OpenSSL. Move those to include/internal and adapt the affected source code, Makefiles and scripts. The header files that got moved are: crypto/constant_time_locl.h crypto/o_dir.h crypto/o_str.h Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-13util/incore update.Andy Polyakov
Support cross-compile platforms that don't support FINGERPRINT_premain, e.g. VxWorks. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-13Remove remaining Kerberos referencesMatt Caswell
Following on from the removal of libcrypto and libssl support for Kerberos this commit removes all remaining references to Kerberos. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-13Remove Kerberos support from libsslMatt Caswell
Remove RFC2712 Kerberos support from libssl. This code and the associated standard is no longer considered fit-for-purpose. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-12Make COMP_CTX and COMP_METHOD opaqueRich Salz
Since COMP_METHOD is now defined in comp_lcl.h, it is no longer possible to create new TLS compression methods without using the OpenSSL source. Only ZLIB is supported by default. Also, since the types are opaque, #ifdef guards to use "char *" instead of the real type aren't necessary. The changes are actually minor. Adding missing copyright to some files makes the diff misleadingly big. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-08Add SSL_use_certificate_chain_file functionDr. Stephen Henson
Add SSL_use_certiicate_chain file functions: this is works the same way as SSL_CTX_use_certificate_chain_file but for an SSL structure. Update SSL_CONF code to use the new function. Update docs. Update ordinals. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-05make updateRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-04-30free cleanup almost the finaleRich Salz
Add OPENSSL_clear_free which merges cleanse and free. (Names was picked to be similar to BN_clear_free, etc.) Removed OPENSSL_freeFunc macro. Fixed the small simple ones that are left: CRYPTO_free CRYPTO_free_locked OPENSSL_free_locked Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-28ERR_ cleanupRich Salz
Remove ERR_[gs]et_implementation as they were not undocumented and useless (the data structure was opaque). Halve the number of lock/unlock calls in almost all ERR_ functions by letting the caller of get_hash or int_thread_set able to lock. Very useful when looping, such as adding errors, or when getting the hash and immediately doing a lookup on it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-28Allow for types with leading underscore when checking error macros.Richard Levitte
We have an increasing number of function declarations starting with '__owur'. Unfortunately, util/ck_errf.pl fails to detect them. A simple change fixes that issue. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2015-04-27Fix the check of test apps in util/mk1mf.plRichard Levitte
The previous check assumed that the variables for each test app, ending with TEST would be indication enough. Experience showed that this isn't the best way. Instead, simply look for the EXE variable in test/Makefile. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-04-27Small fixes after the Big apps cleanupRichard Levitte
This fixes util/mk1mf.pl, which was looking for old variable names from apps/Makefile. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-04-24Big apps cleanup (option-parsing, etc)Rich Salz
This is merges the old "rsalz-monolith" branch over to master. The biggest change is that option parsing switch from cascasding 'else if strcmp("-foo")' to a utility routine and somethin akin to getopt. Also, an error in the command line no longer prints the full summary; use -help (or --help :) for that. There have been many other changes and code-cleanup, see bullet list below. Special thanks to Matt for the long and detailed code review. TEMPORARY: For now, comment out CRYPTO_mem_leaks() at end of main Tickets closed: RT3515: Use 3DES in pkcs12 if built with no-rc2 RT1766: s_client -reconnect and -starttls broke RT2932: Catch write errors RT2604: port should be 'unsigned short' RT2983: total_bytes undeclared #ifdef RENEG RT1523: Add -nocert to fix output in x509 app RT3508: Remove unused variable introduced by b09eb24 RT3511: doc fix; req default serial is random RT1325,2973: Add more extensions to c_rehash RT2119,3407: Updated to dgst.pod RT2379: Additional typo fix RT2693: Extra include of string.h RT2880: HFS is case-insensitive filenames RT3246: req command prints version number wrong Other changes; incompatibilities marked with *: Add SCSV support Add -misalign to speed command Make dhparam, dsaparam, ecparam, x509 output C in proper style Make some internal ocsp.c functions void Only display cert usages with -help in verify Use global bio_err, remove "BIO*err" parameter from functions For filenames, - always means stdin (or stdout as appropriate) Add aliases for -des/aes "wrap" ciphers. *Remove support for IISSGC (server gated crypto) *The undocumented OCSP -header flag is now "-header name=value" *Documented the OCSP -header flag Reviewed-by: Matt Caswell <matt@openssl.org>
2015-04-08Have mkerr.pl treat already existing multiline string defs properlyRichard Levitte
Since source reformat, we ended up with some error reason string definitions that spanned two lines. That in itself is fine, but we sometimes edited them to provide better strings than what could be automatically determined from the reason macro, for example: {ERR_REASON(SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER), "Peer haven't sent GOST certificate, required for selected ciphersuite"}, However, mkerr.pl didn't treat those two-line definitions right, and they ended up being retranslated to whatever the macro name would indicate, for example: {ERR_REASON(SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER), "No gost certificate sent by peer"}, Clearly not what we wanted. This change fixes this problem. Reviewed-by: Matt Caswell <matt@openssl.org>