aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
Commit message (Collapse)AuthorAgeFilesLines
* Remove pointless free loop in X509_TRUST_cleanup()Kurt Cancemi2016-06-201-3/+0
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1194)
* Remove pointless free loop in X509_PURPOSE_cleanup()Kurt Cancemi2016-06-201-3/+0
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1194)
* crypto/evp/e_aes_cbc_hmac_sha256.c: Remove spurious memsetKurt Cancemi2016-06-201-4/+3
| | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1231)
* Make DSA_SIG and ECDSA_SIG getters const.Emilia Kasper2016-06-205-23/+22
| | | | | | | | | | Reorder arguments to follow convention. Also allow r/s to be NULL in DSA_SIG_get0, similarly to ECDSA_SIG_get0. This complements GH1193 which adds non-const setters. Reviewed-by: Rich Salz <rsalz@openssl.org>
* rand/randfile.c: remove obsolete commentary.Andy Polyakov2016-06-201-5/+0
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* aes/asm/bsaes-armv7.pl: omit redundant stores in XTS subroutines.Andy Polyakov2016-06-201-20/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* aes/asm/bsaes-armv7.pl: fix XTS decrypt test failure.Andy Polyakov2016-06-201-1/+1
| | | | | | RT#4578 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Change default directory for the .rnd file on Windows and VMSRichard Levitte2016-06-201-5/+3
| | | | | | | | | | The previous change for Windows wasn't quite right. Corrected to use %HOME%, %USERPROFILE% and %SYSTEMPROFILE%, in that order. Also adding the default home for VMS, SYS$LOGIN: Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>
* Useless header include of openssl/rand.hFdaSilvaYY2016-06-1826-26/+0
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1168)
* Useless includesFdaSilvaYY2016-06-182-4/+0
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1168)
* Missing NULL check on OBJ_dup result in x509_name_canonFdaSilvaYY2016-06-181-0/+2
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1168)
* Fix an MSVC warning.FdaSilvaYY2016-06-181-0/+1
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1168)
* Improve const correctness for stacks of EVP_MDMatt Caswell2016-06-181-3/+3
| | | | | | | | | EVP_MDs are always const, so stacks of them should be too. This silences a warning about type punning on OpenBSD. RT4378 Reviewed-by: Richard Levitte <levitte@openssl.org>
* constify SRPMatt Caswell2016-06-182-26/+28
| | | | | | | | | | Add const qualifiers to lots of SRP stuff. This started out as an effort to silence some "type-punning" warnings on OpenBSD...but the fix was to have proper const correctness in SRP. RT4378 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Avoid type punning warnings in b_addr.cMatt Caswell2016-06-181-4/+4
| | | | | | RT4378 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Change default directory for storing the .rnd file on WindowsMatt Caswell2016-06-171-0/+14
| | | | | | | | | | | | Previously we would try %RANDFILE%, then %HOME% and finally "C:". Unfortunately this often ends up being "C:" which the user may not have write permission for. Now we try %RANDFILE% first, and then the same set of environment vars as GetTempFile() uses, i.e. %TMP%, then %TEMP%, %USERPROFILE% and %SYSTEMROOT%. If all else fails we fall back to %HOME% and only then "C:". Reviewed-by: Rich Salz <rsalz@openssl.org>
* Spelling fixesFdaSilvaYY2016-06-161-2/+2
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1219)
* Fix build break.Rich Salz2016-06-161-2/+8
| | | | | | Aggregate local initializers are rarely portable (: Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add EVP_PKEY_get0_hmac() functionNathaniel McCallum2016-06-162-0/+14
| | | | | | | | Before the addition of this function, it was impossible to read the symmetric key from an EVP_PKEY_HMAC type EVP_PKEY. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1217)
* Fix the build and tests following constification of DH, DSA, RSAMatt Caswell2016-06-163-12/+12
| | | | | | | Misc fixes following the constification of the DH, DSA and RSA getters. Reviewed-by: Stephen Henson <steve@openssl.org>
* Change the return type of EVP_EncodeUpdateMatt Caswell2016-06-163-8/+12
| | | | | | | | Previously EVP_EncodeUpdate returned a void. However there are a couple of error conditions that can occur. Therefore the return type has been changed to an int, with 0 indicating error and 1 indicating success. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Deal with the consequences of constifying gettersRichard Levitte2016-06-151-5/+7
| | | | | Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Constify the parameter getters for RSA, DSA and DHRichard Levitte2016-06-153-44/+32
| | | | | | | Including documentation changes Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Constify input buffers of some X509V3 and X509_PURPOSE -related methodsFdaSilvaYY2016-06-157-19/+19
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Constify X509_TRUST_add method.FdaSilvaYY2016-06-151-4/+4
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Constify asn1/asn_mime.cFdaSilvaYY2016-06-151-16/+16
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Constify some input buffers in asn1FdaSilvaYY2016-06-153-7/+8
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Constify CMS_get0_type inputFdaSilvaYY2016-06-151-1/+1
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Constify UIFdaSilvaYY2016-06-151-1/+1
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Constify PKCS12_create, PKCS12_add_key, PKCS12_add_safe.FdaSilvaYY2016-06-151-3/+3
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Constify some conf_mod.c internal methodsFdaSilvaYY2016-06-151-9/+11
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Change (!seqtt) to (seqtt == NULL)Richard Levitte2016-06-151-3/+3
| | | | | Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Always check that the value returned by asn1_do_adb() is non-NULLRichard Levitte2016-06-151-0/+2
| | | | | Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
* perlasm/x86*.pl: add endbranch instruction.Andy Polyakov2016-06-142-0/+9
| | | | | | | For further information see "Control-flow Enforcement Technology Preview" by Intel. Reviewed-by: Rich Salz <rsalz@openssl.org>
* modes/asm/ghashp8-ppc.pl: improve performance by 2.7x.Andy Polyakov2016-06-141-20/+449
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* aes/asm/aesp8-ppc.pl: implement "tweak chaining".Andy Polyakov2016-06-141-54/+126
| | | | | | | This is useful in Linux kernel context, in cases data happens to be fragmented and processing can take multiple calls. Reviewed-by: Rich Salz <rsalz@openssl.org>
* evp/e_aes.c: wire hardware-assisted XTS subroutines.Andy Polyakov2016-06-141-0/+14
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* aes/asm/aesp8-ppc.pl: add XTS subroutines.Andy Polyakov2016-06-141-0/+1784
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* perlasm/x86_64-xlate.pl: add commentary.Andy Polyakov2016-06-141-1/+7
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* perlasm/x86_64-xlate.pl: refactor argument parsing loop.Andy Polyakov2016-06-141-11/+12
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Make x86_64-xlate.pl 'use strict' clean.David Benjamin2016-06-141-114/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use strict would have caught a number of historical bugs in the perlasm code, some in the repository and some found during review. It even found a fresh masm-only bug (see below). This required some tweaks. The "single instance is enough" globals got switched to proper blessed objects rather than relying on symbolic refs. A few types need $opcode passed in as a result. The $$line thing is a little bit of a nuisance. There may be a clearer pattern to use instead. This even a bug in the masm code. 9b634c9b37afc482a8dc8868e367bdd1b650e507 added logic to make labels global or function-global based on whether something starts with a $, seemingly intended to capture the $decor setting of '$L$'. However, it references $ret which is not defined in label::out. label::out is always called after label::re, so $ret was always the label itself, so the line always ran. I've removed the regular expression so as not to change the behavior of the script. A number of the assembly files now routinely jump across functions, so this seems to be the desired behavior now. GH#1165 Signed-off-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix omitted selector handling.Dr. Stephen Henson2016-06-141-1/+1
| | | | | | | | The selector field could be omitted because it has a DEFAULT value. In this case *sfld == NULL (sfld can never be NULL). This was not noticed because this was never used in existing ASN.1 modules. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove an unused variable assignmentMatt Caswell2016-06-141-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT4562: Fix misleading doc on OPENSSL_configRich Salz2016-06-143-18/+18
| | | | | | Also changed the code to use "appname" not "filename" Reviewed-by: Matt Caswell <matt@openssl.org>
* Free memory on an error pathMatt Caswell2016-06-141-0/+3
| | | | | | | The function a2i_ASN1_STRING can encounter an error after already allocating a buffer. It wasn't always freeing that buffer on error. Reviewed-by: Richard Levitte <levitte@openssl.org>
* GH1141: Different fix, preferred by Richard.Rich Salz2016-06-131-2/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Missed some copyright mergeRich Salz2016-06-132-102/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Ensure that NULL r and s parameters cannot be set on DSA_SIG/ECDSA_SIGs.TJ Saunders2016-06-132-0/+4
| | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1193)
* Reorder the setter arguments to more consistently match that of other APIs,TJ Saunders2016-06-132-2/+2
| | | | | | | | per review comments. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1193)
* Implement DSA_SIG_set0() and ECDSA_SIG_set0(), for setting signature values.TJ Saunders2016-06-132-0/+18
| | | | | | | | | | | | | | | SSH2 implementations which use DSA_do_verify() and ECDSA_do_verify() are given the R and S values, and the data to be signed, by the client. Thus in order to validate these signatures, SSH2 implementations will digest and sign the data -- and then pass in properly provisioned DSA_SIG and ECDSA_SIG objects. Unfortunately, the existing OpenSSL-1.1.0 APIs do not allow for directly setting those R and S values in these objects, which makes using OpenSSL for such SSH2 implementations much more difficult. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1193)