summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-10-17s390x assembly pack: add OPENSSL_s390xcap environment variable.Patrick Steuer
The OPENSSL_s390xcap environment variable is used to set bits in the s390x capability vector to zero. This simplifies testing of different code paths. Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6813)
2018-10-17Deprecate ECDH_KDF_X9_62()Antoine Salon
Signed-off-by: Antoine Salon <asalon@vmware.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/7345)
2018-10-17EVP module documentation passAntoine Salon
Replace ECDH_KDF_X9_62() with internal ecdh_KDF_X9_63() Signed-off-by: Antoine Salon <asalon@vmware.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/7345)
2018-10-17Fix: 'openssl ca' command crashes when used with 'rand_serial' optionDr. Matthias St. Pierre
Commit ffb46830e2df introduced the 'rand_serial' option. When it is used, the 'serialfile' does not get initialized, i.e. it remains a NULL pointer. This causes a crash when the NULL pointer is passed to the rotate_serial() call. This commit fixes the crash and unifies the pointer checking before calling the rotate_serial() and save_serial() commands. Fixes #7412 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7417)
2018-10-17Build file templates: look at *all* definesRichard Levitte
When looking at configured macro definitions, we must look at both what comes from the config target AND what comes from user configuration. Fixes #7396 Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/7402)
2018-10-17Add a missing check on s->s3->tmp.pkeyMansour Ahmadi
Reviewed-by: Paul Yang <yang.yang@baishancloud.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7405)
2018-10-17print() is a function in Python 3cclauss
CLA: trivial Discovered via #7410 @ https://travis-ci.org/openssl/openssl/jobs/442003489#L440 Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/7403)
2018-10-16DRBG: fix reseeding via RAND_add()/RAND_seed() with large inputDr. Matthias St. Pierre
In pull request #4328 the seeding of the DRBG via RAND_add()/RAND_seed() was implemented by buffering the data in a random pool where it is picked up later by the rand_drbg_get_entropy() callback. This buffer was limited to the size of 4096 bytes. When a larger input was added via RAND_add() or RAND_seed() to the DRBG, the reseeding failed, but the error returned by the DRBG was ignored by the two calling functions, which both don't return an error code. As a consequence, the data provided by the application was effectively ignored. This commit fixes the problem by a more efficient implementation which does not copy the data in memory and by raising the buffer the size limit to INT32_MAX (2 gigabytes). This is less than the NIST limit of 2^35 bits but it was chosen intentionally to avoid platform dependent problems like integer sizes and/or signed/unsigned conversion. Additionally, the DRBG is now less permissive on errors: In addition to pushing a message to the openssl error stack, it enters the error state, which forces a reinstantiation on next call. Thanks go to Dr. Falko Strenzke for reporting this issue to the openssl-security mailing list. After internal discussion the issue has been categorized as not being security relevant, because the DRBG reseeds automatically and is fully functional even without additional randomness provided by the application. Fixes #7381 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7382)
2018-10-13Fix copy&paste error found in Coverity scanTomas Mraz
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7377)
2018-10-12rsa/rsa_ossl.c: fix and extend commentary [skip ci].Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/7123)
2018-10-12ssl/s3_enc.c: fix logical errors in ssl3_final_finish_mac.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7085)
2018-10-12sha/asm/keccak1600-s390x.pl: resolve -march=z900 portability issue.Andy Polyakov
Negative displacement in memory references was not originally specified, so that for maximum coverage one should abstain from it, just like with any other extension. [Unless it's guarded by run-time switch, but there is no switch in keccak1600-s390x.] Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7239)
2018-10-12Fix a typo in a macroMatt Caswell
Fixes #7385 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7385)
2018-10-11Safer memory cleanup in (crypto/rsa/rsa_lib.c)Mykola Baibuz
We don't need to use secure clean for public key. CLA: trivial Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Paul Yang <yang.yang@baishancloud.com> (Merged from https://github.com/openssl/openssl/pull/7363)
2018-10-11Fix compiling warnings in example codePaul Yang
The example code in EVP_DigestInit.pod generates warnings if users try to compile it. [skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7362)
2018-10-10crypto/rand: fix some style nit'sFdaSilvaYY
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7378)
2018-10-10rand_unix.c: fix --with-rand-seed=none buildDr. Matthias St. Pierre
Fixes a compiler warning about an unused syscall_random() and cleans up the OPENSSL_RAND_SEED preprocessor logic. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/779)
2018-10-10Fix no-engineMatt Caswell
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/7365)
2018-10-09mkdef: bsd-gcc uses solaris symbol version scriptsBenjamin Kaduk
As for linux, make bsd-gcc an alias to the solaris semantics for shared library symbol version handling. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7376)
2018-10-09Fix a nit of copyright date rangePaul Yang
Should be 2018 instead of 20018. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7364)
2018-10-08apps: allow empty attribute values with -subjBenjamin Kaduk
Historically (i.e., OpenSSL 1.0.x), the openssl applications would allow for empty subject attributes to be passed via the -subj argument, e.g., `opensl req -subj '/CN=joe/O=/OU=local' ...`. Commit db4c08f0194d58c6192f0d8311bf3f20e251cf4f applied a badly needed rewrite to the parse_name() helper function that parses these strings, but in the process dropped a check that would skip attributes with no associated value. As a result, such strings are now treated as hard errors and the operation fails. Restore the check to skip empty attribute values and restore the historical behavior. Document the behavior for empty subject attribute values in the corresponding applications' manual pages. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7349)
2018-10-08Cleanup typos and grammar in DES_random_key.podԜеѕ
CLA: trivial Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/7356)
2018-10-08Indentation fixes.Pauli
The PR #7329 left some indentation slightly off. This fixes it. Reviewed-by: Paul Yang <yang.yang@baishancloud.com> (Merged from https://github.com/openssl/openssl/pull/7360)
2018-10-08Remove useless check.Mykola Baibuz
Hash can be longer than EC group degree and it will be truncated. CLA: trivial Reviewed-by: Paul Yang <yang.yang@baishancloud.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7329)
2018-10-05/dev/crypto engine: give CIOCFSESSION the actual sess-idRichard Levitte
We passed that ioctl a pointer to the whole session_op structure, which wasn't quite right. Notified by David Legault. Fixes #7302 Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/7304)
2018-10-05test/secmemtest: test secure memory only if it is implementedDr. Matthias St. Pierre
Fixes #7322 Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/7351)
2018-10-05util/mkdef.pl: for VMS, allow generation of case insensitive symbol vectorRichard Levitte
Some modules are built with case insensitive (uppercase) symbols on VMS. This needs to be reflected in the export symbol vector. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7347)
2018-10-05Configure: use correct variable to infer the .ld file locationRichard Levitte
We didn't notice the error because it all happened in the top directory. Now that we use .ld files in subdirectories, the bug became apparent. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7347)
2018-10-05Add build file support for generic symbol exports with DSOsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7347)
2018-10-05Change the build of engines to use ordinal files for symbol exportRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7347)
2018-10-05util/mkdef.pl: Produce version scripts from unversioned symbolsRichard Levitte
This allows setting up export maps for DSOs as well in a uniform way. This also means that util/mkdef.pl no longer picks up the target version from configdata.pm, and it has to be given on the command line instead. This may be used to give modules separate versions as well, if desirable. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7347)
2018-10-04Extend the BIO callback tests to check the return value semanticsMatt Caswell
Check that different return values passed to the BIO callback are correctly handled. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7344)
2018-10-04Fix the BIO callback return code handlingMatt Caswell
The BIO callback handling incorrectly wrote over the return code passed to the callback, meaning that an incorrect result was (eventually) returned to the caller. Fixes #7343 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7344)
2018-10-04Refactor util/mknum.pl for clearer separation of functionalityRichard Levitte
Rewrite util/mknum.pl to become cleaner, and to use the separate generic C header parsing module, as well as the separate ordinals manipulation module. Adapt the build files. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7191)
2018-10-04Add code to manipulate the items in OpenSSL::OrdinalsRichard Levitte
This means adding the capability to add new items, to invalidate and revalidate all the items, and to update the file it came from, as well as the possibility to create new items from other data than a line from said file. While we're at it, we throw in a couple of useful filters. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7191)
2018-10-04A perl module to parse through C headersRichard Levitte
OpenSSL::ParseC is a module that parses through a C header file and returns a list with information on what it found. Currently, the information it returns covers function and variable declarations, macro definitions, struct declarations/definitions and typedef definitions. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7191)
2018-10-03Move ZLIB from 'platforms' to 'features'Richard Levitte
Having it as a 'platform' was conceptually wrong from from the beginning, and makes decoding more complicated than necessary. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7191)
2018-10-03Refactor util/mkdef.pl for clearer separation of functionalityRichard Levitte
Move the .num updating functionality to util/mknum.pl. Rewrite util/mkdef.pl to create .def / .map / .opt files exclusively, using the separate ordinals reading module. Adapt the build files. Adapt the symbol presence test. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7191)
2018-10-03Add a perl module that deals with ordinals filesRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7191)
2018-10-03Remove SSL_version_strRichard Levitte
I was never exported in our shared libraries and no one noticed, and we don't seem to use it ourselves, so clean it away. In all likelyhood, this is a remain from the 90's, when it was in fashion to litter library modules with these kinds of strings. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7340)
2018-10-03Fix the drbgtest with randomized orderingMatt Caswell
In drbgtest, test_set_defaults changes the default DRBGs. This works fine when tests are run in the normal order. However if OPENSSL_TEST_RAND_ORDER is defined then it may fail (dependent on the ordering). This environment variable is defined for one of the Travis tests, so this issue was causing intermittent travis test failures. [extended tests] Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7338)
2018-10-03Ignore libcrypto.ld and libssl.ldMatt Caswell
These are auto generated files that should not be checked into git Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7339)
2018-10-02Fix some Coverity warningsMatt Caswell
Check some return values on some functions. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7335)
2018-10-02Fix a mem leak in the ocsp appMatt Caswell
Free memory allocated in the parent process that is not needed in the child. We also free it in the parent. Technically this isn't really required since we end up calling exit() soon afterwards - but to prevent false positives we free it anyway. Fixes a Coverity issue. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7335)
2018-10-02Change DRBG's to DRBGsShane Lontis
Minor change to documentation of RAND_DRBG_set_defaults() Reviewed-by: Paul Yang <yang.yang@baishancloud.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7326)
2018-10-01'openssl list': add option -objects to list built in objectsRichard Levitte
Related to #6696 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6702)
2018-10-01Refactor linker script generationRichard Levitte
The generation of linker scripts was badly balanced, as all sorts of platform dependent stuff went into the top build.info, when that part should really be made as simply and generic as possible. Therefore, we move a lot of the "magic" to the build files templates, since they are the place for platform dependent things. What remains is to parametrize just enough in the build.info file to generate the linker scripts correctly for each associated library. "linker script" is a term usually reserved for certain Unix linkers. However, we only use them to say what symbols should be exported, so we use the term loosely for all platforms. The internal extension is '.ld', and is changed by the build file templates as appropriate for each target platform. Note that this adds extra meaning to the value of the shared_target attribute. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7333)
2018-09-30Clean out aliases in include/openssl/symhacks.hRichard Levitte
Only a few clashing ones remain Reviewed-by: Paul Yang <yang.yang@baishancloud.com> (Merged from https://github.com/openssl/openssl/pull/7331)
2018-09-30Small cleanup (util/mkdef.pl, crypto/bio/bss_log.c, include/openssl/ocsp.h)Richard Levitte
BIO_s_log() is declared for everyone, so should return NULL when not actually implemented. Also, it had explicit platform limitations in util/mkdef.pl that didn't correspond to what was actually in code. While at it, a few other hard coded things that have lost their relevance were removed. include/openssl/ocsp.h had a few duplicate declarations. Reviewed-by: Paul Yang <yang.yang@baishancloud.com> (Merged from https://github.com/openssl/openssl/pull/7331)
2018-09-28Added DRBG_HMAC & DRBG_HASH + Added defaults for setting DRBG for ↵Shane Lontis
master/public/private + renamed generate_counter back to reseed_counter + generated new cavs data tests Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/6779)