summaryrefslogtreecommitdiffstats
path: root/crypto
AgeCommit message (Collapse)Author
2017-01-25Fix some extra or missing whitespaces...FdaSilvaYY
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1618)
2017-01-24Cleanup EVP_CIPH/EP_CTRL duplicate definesTodd Short
Remove duplicate defines from EVP source files. Most of them were in evp.h, which is always included. Add new ones evp_int.h EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK is now always defined in evp.h, so remove conditionals on it Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2201)
2017-01-24Fix error handling in compute_key, BN_CTX_get can return NULLBernd Edlinger
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2132)
2017-01-24Add support for Poly1305 in EVP_PKEYTodd Short
Add Poly1305 as a "signed" digest. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2128)
2017-01-24Add missing flags for EVP_chacha20()Kazuki Yamaguchi
ChaCha20 code uses its own custom cipher_data. Add EVP_CIPH_CUSTOM_IV and EVP_CIPH_ALWAYS_CALL_INIT so that the key and the iv can be set by different calls of EVP_CipherInit_ex(). Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2156)
2017-01-24RAND_egd_bytes: No need to check RAND_status on connection error.ganesh
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1886)
2017-01-24Fixed the return code for RAND_egd_bytes.ganesh
According to the documentation, the return code should be -1 when RAND_status does not return 1. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1886)
2017-01-24Fixed the return code of RAND_query_egd_bytes when connect fails.ganesh
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1886)
2017-01-21poly1305/poly1305_base2_44.c: clarify shift boundary condition.Andy Polyakov
Reviewed-by: Matt Caswell <matt@openssl.org>
2017-01-21ec/asm/ecp_nistz256-ppc64.pl: minor POWER8-specific optimization.Andy Polyakov
Up to 4% depending on benchmark. Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-01-20Fix DSA parameter generation control errorRichard Levitte
When setting the digest parameter for DSA parameter generation, the signature MD was set instead of the parameter generation one. Fortunately, that's also the one that was used for parameter generation, but it ultimately meant the parameter generator MD and the signature MD would always be the same. Fixes github issue #2016 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2250)
2017-01-18Defines and strings for special salt length values, add testsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2236)
2017-01-18Add support for -1, -2 salt lengths for PSS only keys.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2236)
2017-01-18Clean one unused variable, plus an useless one.FdaSilvaYY
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1906)
2017-01-16Add missing braces.Kurt Roeckx
Reviewed-by: Richard Levitte <levitte@openssl.org> GH: #2234
2017-01-15Fix undefined behaviour when printing the X509 and CRL versionKurt Roeckx
Found by oss-fuzz Reviewed-by: Andy Polyakov <appro@openssl.org> GH: #2231
2017-01-15Fix VC warnings about unary minus to an unsigned type.Kurt Roeckx
Reviewed-by: Andy Polyakov <appro@openssl.org> GH: #2230
2017-01-15Fix undefined behaviour when printing the X509 serialKurt Roeckx
Found by afl Reviewed-by: Andy Polyakov <appro@openssl.org> GH: #2230
2017-01-13Fix "failure rate" bugsRich Salz
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2228)
2017-01-13Fix no-ocspRichard Levitte
The use of EXFLAG_SET requires the inclusion of openssl/x509v3.h. openssl/ocsp.h does that, except when OCSP is disabled. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2227)
2017-01-13UI: Use RUN_ONCE differentlyRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2222)
2017-01-13UI: Ensure there will be no race condition when getting the UI_METHOD ex_dataRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2222)
2017-01-12Make X509_Digest,others publicRich Salz
Also, if want SHA1 then use the pre-computed value if there. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2223)
2017-01-12Add "random malloc failure" toolingRich Salz
Still needs to be documented, somehow/somewhere. The env var OPENSSL_MALLOC_FAILURES controls how often malloc/realloc should fail. It's a set of fields separated by semicolons. Each field is a count and optional percentage (separated by @) which defaults to 100. If count is zero then it lasts "forever." For example: 100;@25 means the first 100 allocations pass, then the rest have a 25% chance of failing until the program exits or crashes. If env var OPENSSL_MALLOC_FD parses as a positive integer, a record of all malloc "shouldfail" tests is written to that file descriptor. If a malloc will fail, and OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE is not set (platform specific), then a backtrace will be written to the descriptor when a malloc fails. This can be useful because a malloc may fail but not be checked, and problems will only occur later. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1252)
2017-01-12GH2176: Add X509_VERIFY_PARAM_get_timeRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2208)
2017-01-11Add a UI utility function with which to wrap pem_callback_cb in a UI_METHODRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2204)
2017-01-11Add an application data field in the UI_METHODRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2204)
2017-01-11Constify the input parameter to UI_method_get_*Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2204)
2017-01-10Print the X509 version signed, and convert to unsigned for the hex version.Kurt Roeckx
Found by tis-interpreter Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1754
2017-01-10Only enable CRYPTO_3DES_ECB if that name is an existing macroRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2203)
2017-01-10Small fixes of cryptodev engineRichard Levitte
- guard CRYPTO_3DES_CBC - add a missing cast Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2203)
2017-01-10use EVP_CIPHER_CTX_ functions instead of accessing EVP_CIPHER_CTX internalsIaroslav Gridin
by levitte Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-10fix for BSD cryptodevIaroslav Gridin
by levitte Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-10Remove commented-out HMAC codeIaroslav Gridin
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-10Style the codeIaroslav Gridin
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-10Remove unused ret variableIaroslav Gridin
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-10Remove non-functional CRYPTO_AES_CTR ifdef disabling AES-CTR in cryptodevIaroslav Gridin
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-10Add AES-ECB and 3DES-ECB to cryptodevIaroslav Gridin
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-10cryptodev: allow copying EVP contextsNikos Mavrogiannopoulos
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-10cryptodev: Fix issue with signature generationNikos Mavrogiannopoulos
That patch also enables support for SHA2 hashes, and removes support for hashes that were never supported by cryptodev. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1784)
2017-01-09Fix a memory leak in RSA_padding_add_PKCS1_OAEP_mgf1Bernd Edlinger
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> GH: #2140
2017-01-08fix a few more style issuesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08Remove unnecessary frees and style fixes.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08Use more desciptive macro name rsa_pss_restricted()Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08style issuesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08free str on errorDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08clarify commentDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08fix various style issuesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08make errorsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08add parameter errorDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)