Felix Laurie von Massenbach [Tue, 27 May 2014 13:48:21 +0000 (14:48 +0100)]
Add a test to check we're really generating probable primes.
Felix Laurie von Massenbach [Tue, 27 May 2014 12:43:36 +0000 (13:43 +0100)]
Remove unused BIGNUMs.
Felix Laurie von Massenbach [Tue, 27 May 2014 12:38:59 +0000 (13:38 +0100)]
Only count successful generations.
Felix Laurie von Massenbach [Tue, 27 May 2014 12:23:21 +0000 (13:23 +0100)]
Refactor the first prime index.
Felix Laurie von Massenbach [Tue, 27 May 2014 11:55:20 +0000 (12:55 +0100)]
Try skipping over the adding and just picking a new random number.
Generates a number coprime to 2, 3, 5, 7, 11.
Speed:
Trial div (add) : trial div (retry) : coprime
1 : 0.42 : 0.84
Felix Laurie von Massenbach [Tue, 27 May 2014 11:41:20 +0000 (12:41 +0100)]
Remove editor barf on updating copyright.
Felix Laurie von Massenbach [Tue, 27 May 2014 01:13:33 +0000 (02:13 +0100)]
Add python script to generate the bits needed for the prime generator.
Felix Laurie von Massenbach [Tue, 27 May 2014 01:12:59 +0000 (02:12 +0100)]
Generate safe primes not divisible by 3, 5 or 7.
~2% speed improvement on trial division.
Felix Laurie von Massenbach [Mon, 26 May 2014 23:37:03 +0000 (00:37 +0100)]
Add a method to generate a prime that is guaranteed not to be divisible by 3 or 5.
Possibly some reduction in bias, but no speed gains.
Felix Laurie von Massenbach [Mon, 26 May 2014 23:33:42 +0000 (00:33 +0100)]
Run the prime speed tests for 10 seconds.
Felix Laurie von Massenbach [Mon, 26 May 2014 20:58:55 +0000 (21:58 +0100)]
Tidy up speed.c a little.
Felix Laurie von Massenbach [Mon, 26 May 2014 20:57:25 +0000 (21:57 +0100)]
Add speed test for prime trial division.
Felix Laurie von Massenbach [Mon, 26 May 2014 18:16:52 +0000 (19:16 +0100)]
Remove static from probable_prime_dh.
Felix Laurie von Massenbach [Mon, 26 May 2014 18:09:18 +0000 (19:09 +0100)]
Remove indentation from the goto targets.
Felix Laurie von Massenbach [Mon, 26 May 2014 16:19:28 +0000 (17:19 +0100)]
Strip trailing whitespace from Configure.
Felix Laurie von Massenbach [Mon, 26 May 2014 16:19:06 +0000 (17:19 +0100)]
Add a new target to Configure for me.
Dr. Stephen Henson [Sun, 1 Jun 2014 14:03:00 +0000 (15:03 +0100)]
Set default global mask to UTF8 only.
David Ramos [Sun, 1 Jun 2014 13:23:51 +0000 (14:23 +0100)]
Allocate extra space when NETSCAPE_HANG_BUG defined.
Make sure there is an extra 4 bytes for server done message when
NETSCAPE_HANG_BUG is defined.
PR#3361
David Ramos [Sun, 1 Jun 2014 12:03:05 +0000 (13:03 +0100)]
Initialise alg.
PR#3313
Dr. Stephen Henson [Fri, 30 May 2014 12:21:43 +0000 (13:21 +0100)]
Use correct digest when exporting keying material.
PR#3319
Dr. Stephen Henson [Fri, 30 May 2014 12:10:08 +0000 (13:10 +0100)]
Don't compile heartbeat test code on Windows (for now).
Hubert Kario [Thu, 12 Sep 2013 09:37:12 +0000 (11:37 +0200)]
add description of -attime to man page
the verify app man page didn't describe the usage of attime option
even though it was listed as a valid option in the -help message.
This patch fixes this omission.
Hubert Kario [Tue, 10 Sep 2013 13:59:13 +0000 (15:59 +0200)]
add description of -no_ecdhe option to s_server man page
While the -help message references this option, the man page
doesn't mention the -no_ecdhe option.
This patch fixes this omission.
Andy Polyakov [Thu, 29 May 2014 20:45:35 +0000 (22:45 +0200)]
aesv8-armx.pl: add CTR implementation.
Submitted by: Ard Biesheuvel.
Dr. Stephen Henson [Thu, 29 May 2014 13:07:49 +0000 (14:07 +0100)]
Set version number correctly.
PR#3249
František Bořánek [Thu, 29 May 2014 12:49:10 +0000 (13:49 +0100)]
Fix memory leak.
PR#3278
Martin Kaiser [Wed, 28 May 2014 09:16:06 +0000 (11:16 +0200)]
remove duplicate 0x for default RSASSA-PSS salt len
Andy Polyakov [Thu, 29 May 2014 13:10:12 +0000 (15:10 +0200)]
aesp8-ppc.pl: optimize CBC decrypt even further.
10-19% improvement depending on key length and endianness.
Peter Mosmans [Tue, 27 May 2014 22:26:11 +0000 (23:26 +0100)]
Fix for test_bn regular expression to work on Windows using MSYS. PR#3346
Matt Caswell [Mon, 26 May 2014 22:22:08 +0000 (23:22 +0100)]
Changed -strictpem to use PEM_read_bio
Matt Caswell [Mon, 26 May 2014 16:16:43 +0000 (17:16 +0100)]
Added -strictpem parameter to enable processing of PEM files with data prior to the BEGIN marker
Juli Mallett [Mon, 21 Apr 2014 21:30:09 +0000 (14:30 -0700)]
Fix cast of boolean where cast of LHS intended.
Closes #74.
Matt Caswell [Sun, 25 May 2014 22:37:53 +0000 (23:37 +0100)]
Fixed error in args for SSL_set_msg_callback and SSL_set_msg_callback_arg
Ben Laurie [Sun, 25 May 2014 16:25:56 +0000 (17:25 +0100)]
Make it build.
Closes #31.
Christian Heimes [Wed, 13 Nov 2013 00:46:42 +0000 (01:46 +0100)]
add test case to makefiles
Christian Heimes [Wed, 13 Nov 2013 00:42:48 +0000 (01:42 +0100)]
Implement tests for PKCS#5 PBKDF2 HMAC
Dr. Stephen Henson [Sat, 24 May 2014 22:55:19 +0000 (23:55 +0100)]
Don't use expired certificates if possible.
When looking for the issuer of a certificate, if current candidate is
expired, continue looking. Only return an expired certificate if no valid
certificates are found.
PR#3359
Dr. Stephen Henson [Sat, 24 May 2014 22:48:29 +0000 (23:48 +0100)]
Rename vpm_int.h to x509_lcl.h
Matt Caswell [Sat, 24 May 2014 22:55:27 +0000 (23:55 +0100)]
Fix for non compilation with TLS_DEBUG defined
Ben Laurie [Sat, 24 May 2014 14:42:18 +0000 (15:42 +0100)]
Only copy opensslconf.h at init time.
Martin Kaiser [Fri, 23 May 2014 23:04:25 +0000 (00:04 +0100)]
Modify the description of -noout to match the manpage. PR#3364
Martin Kaiser [Fri, 23 May 2014 23:02:24 +0000 (00:02 +0100)]
Add an NSS output format to sess_id to export to export the session id and the master key in NSS keylog format. PR#3352
Luiz Angelo Daros de Luca [Fri, 23 May 2014 22:05:38 +0000 (23:05 +0100)]
OpenSSL is able to generate a certificate with name constraints with any possible
subjectAltName field. The Name Contraint example in x509v3_config(5) even use IP
as an example:
nameConstraints=permitted;IP:192.168.0.0/255.255.0.0
However, until now, the verify code for IP name contraints did not exist. Any
check with a IP Address Name Constraint results in a "unsupported name constraint
type" error.
This patch implements support for IP Address Name Constraint (v4 and v6). This code
validaded correcly certificates with multiple IPv4/IPv6 address checking against
a CA certificate with these constraints:
permitted;IP.1=10.9.0.0/255.255.0.0
permitted;IP.2=10.48.0.0/255.255.0.0
permitted;IP.3=10.148.0.0/255.255.0.0
permitted;IP.4=fdc8:123f:e31f::/ffff:ffff:ffff::
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Andy Polyakov [Fri, 23 May 2014 18:15:06 +0000 (20:15 +0200)]
aesp8-ppc.pl: add optimized CBC decrypt.
Andy Polyakov [Fri, 23 May 2014 18:14:38 +0000 (20:14 +0200)]
vpaes-ppc.pl: comply with ABI.
Ben Laurie [Thu, 22 May 2014 21:00:17 +0000 (22:00 +0100)]
Merge branch 'heartbeat-test' of git://github.com/mbland/openssl
Mike Bland [Thu, 22 May 2014 18:41:47 +0000 (14:41 -0400)]
Fix heartbeat_test for -DOPENSSL_NO_HEARTBEATS
Replaces the entire test with a trivial implementation when
OPENSSL_NO_HEARTBEATS is defined.
Ben Laurie [Thu, 22 May 2014 09:11:40 +0000 (10:11 +0100)]
Check length first in BUF_strnlen().
Matt Caswell [Wed, 21 May 2014 23:07:35 +0000 (00:07 +0100)]
Fixed minor copy&paste error, and stray space causing rendering problem
Matt Caswell [Wed, 21 May 2014 23:00:23 +0000 (00:00 +0100)]
Fixed unterminated B tag, causing build to fail with newer pod2man versions
Ben Laurie [Wed, 21 May 2014 11:03:02 +0000 (12:03 +0100)]
Remove redundant test.
Ben Laurie [Wed, 21 May 2014 10:54:54 +0000 (11:54 +0100)]
Implement BUF_strnlen() and use it instead of strlen().
Viktor Dukhovni [Wed, 21 May 2014 09:57:44 +0000 (10:57 +0100)]
Fixes to host checking.
Fixes to host checking wild card support and add support for
setting host checking flags when verifying a certificate
chain.
Dr. Stephen Henson [Wed, 21 May 2014 09:50:19 +0000 (10:50 +0100)]
Fix for PKCS12_create if no-rc2 specified.
Use triple DES for certificate encryption if no-rc2 is
specified.
PR#3357
Dr. Stephen Henson [Wed, 21 May 2014 09:39:11 +0000 (10:39 +0100)]
Change default cipher in smime app to des3.
PR#3357
Andy Polyakov [Tue, 20 May 2014 21:32:12 +0000 (23:32 +0200)]
aesv8-armx.pl: fix typo.
Andy Polyakov [Tue, 20 May 2014 20:50:28 +0000 (22:50 +0200)]
aesv8-armx.pl: optimize by adding 128-bit code paths.
Ben Laurie [Tue, 20 May 2014 12:52:31 +0000 (13:52 +0100)]
Don't allocate more than is needed in BUF_strndup().
Dr. Stephen Henson [Tue, 20 May 2014 10:18:30 +0000 (11:18 +0100)]
For portability use BUF_strndup instead of strndup.
Dr. Stephen Henson [Tue, 20 May 2014 00:48:51 +0000 (01:48 +0100)]
Adding padding extension to trace code.
Dr. Stephen Henson [Tue, 20 May 2014 00:45:50 +0000 (01:45 +0100)]
Fix bug in signature algorithm copy.
Janpopan [Sun, 4 May 2014 16:13:43 +0000 (18:13 +0200)]
Fix a wrong parameter count ERR_add_error_data
Ben Laurie [Mon, 19 May 2014 16:40:52 +0000 (17:40 +0100)]
Merge branch 'mbland-heartbeat-test'
Ben Laurie [Mon, 19 May 2014 16:38:56 +0000 (17:38 +0100)]
Fixup for ancient compilers.
Mike Bland [Thu, 1 May 2014 14:10:14 +0000 (10:10 -0400)]
Zero-initialize heartbeat test write buffer
The previous calls to memset() were added to tear_down() when I noticed the
test spuriously failing in opt mode, with different results each time. This
appeared to be because the allocator zeros out memory in debug mode, but not
in opt mode. Since the heartbeat functions silently drop the request on error
without modifying the contents of the write buffer, whatever random contents
were in memory before being reallocated to the write buffer used in the test
would cause nondeterministic test failures in the Heartbleed regression cases.
Adding these calls allowed the test to pass in both debug and opt modes.
Ben Laurie notified me offline that the test was aborting in
debug-ben-debug-64-clang mode, configured with GitConfigure and built with
GitMake. Looking into this, I realized the first memset() call was zeroing out
a reference count used by SSL_free() that was checked in
debug-ben-debug-64-clang mode but not in the normal debug mode.
Removing the memset() calls from tear_down() and adding a memset() for the
write buffer in set_up() addresses the issue and allows the test to
successfully execute in debug, opt, and debug-ben-debug-64-clang modes.
Mike Bland [Thu, 1 May 2014 14:08:18 +0000 (10:08 -0400)]
More through error checks in set_up
Checks the return values of ssl_init_wbio_buffer() and ssl3_setup_buffers().
Ben Laurie [Tue, 29 Apr 2014 17:36:39 +0000 (18:36 +0100)]
Make it build/run.
Mike Bland [Wed, 16 Apr 2014 11:21:26 +0000 (07:21 -0400)]
Unit/regression test for TLS heartbeats.
Regression test against CVE-2014-0160 (Heartbleed).
More info: http://mike-bland.com/tags/heartbleed.html
Andy Polyakov [Mon, 19 May 2014 06:46:44 +0000 (08:46 +0200)]
Add "teaser" AES module for ARMv8.
"Teaser" means that it's initial proof-of-concept to build EVP module
upon.
Matt Caswell [Thu, 15 May 2014 20:13:38 +0000 (21:13 +0100)]
Moved note about lack of support for AEAD modes out of BUGS section to SUPPORTED CIPHERS section (bug has been fixed, but still no support for AEAD)
Dr. Stephen Henson [Thu, 15 May 2014 13:05:47 +0000 (14:05 +0100)]
Enc doesn't support AEAD ciphers.
(cherry picked from commit
09184dddead165901700b31eb39d540ba30f93c5)
Jeffrey Walton [Wed, 14 May 2014 21:49:30 +0000 (22:49 +0100)]
Fix grammar error in verify pod. PR#3355
Jeffrey Walton [Wed, 14 May 2014 21:48:26 +0000 (22:48 +0100)]
Add information to BUGS section of enc documentation. PR#3354
Michal Bozon [Wed, 14 May 2014 20:07:51 +0000 (21:07 +0100)]
Corrected POD syntax errors. PR#3353
Mike Frysinger [Mon, 12 May 2014 22:31:51 +0000 (23:31 +0100)]
Have the .pc files depend on each other rather than duplicating the
various link settings. PR#3332
Kurt Roeckx [Mon, 12 May 2014 16:19:14 +0000 (18:19 +0200)]
Check sk_SSL_CIPHER_num() after assigning sk.
Jean-Paul Calderone [Thu, 3 Apr 2014 00:47:38 +0000 (20:47 -0400)]
Correct the return type on the signature for X509_STORE_CTX_get_ex_data given in the pod file.
Serguei E. Leontiev [Sun, 11 May 2014 18:46:42 +0000 (19:46 +0100)]
Replace manual ASN1 decoder with ASN1_get_object
Replace manual ASN.1 decoder with ASN1_get object. This
will decode the tag and length properly and check against
it does not exceed the supplied buffer length.
PR#3335
Dr. Stephen Henson [Sat, 10 May 2014 01:04:23 +0000 (02:04 +0100)]
Correct example.
Andy Polyakov [Mon, 12 May 2014 08:35:29 +0000 (10:35 +0200)]
Add "teaser" AES module for PowerISA 2.07.
"Teaser" means that it's not integrated yet and purpose of this
commit is primarily informational, to exhibit design choices,
such as how to handle alignment and endianness. In other words
it's proof-of-concept code that EVP module will build upon.
Matt Caswell [Sun, 11 May 2014 23:38:37 +0000 (00:38 +0100)]
Fixed NULL pointer dereference. See PR#3321
Kurt Roeckx [Thu, 1 May 2014 11:10:01 +0000 (13:10 +0200)]
Set authkey to NULL and check malloc return value.
Martin Brejcha [Thu, 1 May 2014 10:07:09 +0000 (12:07 +0200)]
dgram_sctp_ctrl: authkey memory leak
PR: 3327
Günther Noack [Thu, 1 May 2014 11:33:11 +0000 (13:33 +0200)]
Avoid out-of-bounds write in SSL_get_shared_ciphers
PR: 3317
Viktor Dukhovni [Sun, 11 May 2014 19:28:56 +0000 (20:28 +0100)]
Fix infinite loop. PR#3347
Matt Caswell [Sun, 11 May 2014 10:27:26 +0000 (11:27 +0100)]
Move length check earlier to ensure we don't go beyond the end of the user's buffer. PR#3320
Tim Hudson [Sat, 26 Apr 2014 15:55:47 +0000 (01:55 +1000)]
safety check to ensure we dont send out beyond the users buffer
Matt Caswell [Sat, 10 May 2014 00:19:50 +0000 (01:19 +0100)]
Fixed CRLF in file
Dr. Stephen Henson [Thu, 8 May 2014 12:10:56 +0000 (13:10 +0100)]
Return an error if no recipient type matches.
If the key type does not match any CMS recipient type return
an error instead of using a random key (MMA mitigation). This
does not leak any useful information to an attacker.
PR#3348
Geoff Thorpe [Sat, 26 Apr 2014 05:22:54 +0000 (01:22 -0400)]
s_client/s_server: support unix domain sockets
The "-unix <path>" argument allows s_server and s_client to use a unix
domain socket in the filesystem instead of IPv4 ("-connect", "-port",
"-accept", etc). If s_server exits gracefully, such as when "-naccept"
is used and the requested number of SSL/TLS connections have occurred,
then the domain socket file is removed. On ctrl-C, it is likely that
the stale socket file will be left over, such that s_server would
normally fail to restart with the same arguments. For this reason,
s_server also supports an "-unlink" option, which will clean up any
stale socket file before starting.
If you have any reason to want encrypted IPC within an O/S instance,
this concept might come in handy. Otherwise it just demonstrates that
there is nothing about SSL/TLS that limits it to TCP/IP in any way.
(There might also be benchmarking and profiling use in this path, as
unix domain sockets are much lower overhead than connecting over local
IP addresses).
Signed-off-by: Geoff Thorpe <geoff@openssl.org>
Tim Hudson [Mon, 5 May 2014 00:53:39 +0000 (10:53 +1000)]
coverity 966576 - close socket in error path
Tim Hudson [Mon, 5 May 2014 00:39:30 +0000 (10:39 +1000)]
PR#3342 fix resource leak coverity issue 966577
Tim Hudson [Sun, 4 May 2014 22:22:42 +0000 (08:22 +1000)]
fix coverity issue 966597 - error line is not always initialised
Matt Caswell [Wed, 7 May 2014 22:21:02 +0000 (23:21 +0100)]
Fixed NULL pointer dereference in PKCS7_dataDecode reported by David Ramos in PR#3339
Geoff Thorpe [Sun, 4 May 2014 22:44:14 +0000 (18:44 -0400)]
evp: prevent underflow in base64 decoding
This patch resolves RT ticket #2608.
Thanks to Robert Dugal for originally spotting this, and to David
Ramos for noticing that the ball had been dropped.
Signed-off-by: Geoff Thorpe <geoff@openssl.org>
Geoff Thorpe [Sun, 4 May 2014 20:19:22 +0000 (16:19 -0400)]
bignum: allow concurrent BN_MONT_CTX_set_locked()
The lazy-initialisation of BN_MONT_CTX was serialising all threads, as
noted by Daniel Sands and co at Sandia. This was to handle the case that
2 or more threads race to lazy-init the same context, but stunted all
scalability in the case where 2 or more threads are doing unrelated
things! We favour the latter case by punishing the former. The init work
gets done by each thread that finds the context to be uninitialised, and
we then lock the "set" logic after that work is done - the winning
thread's work gets used, the losing threads throw away what they've done.
Signed-off-by: Geoff Thorpe <geoff@openssl.org>
Dr. Stephen Henson [Tue, 6 May 2014 13:07:37 +0000 (14:07 +0100)]
Initialize num properly.
PR#3289
PR#3345
Dr. Stephen Henson [Mon, 5 May 2014 22:56:43 +0000 (23:56 +0100)]
Set Enveloped data version to 2 if ktri version not zero.
Tim Hudson [Sun, 4 May 2014 20:41:22 +0000 (06:41 +1000)]
- fix coverity issues 966593-966596
Geoff Thorpe [Sun, 4 May 2014 22:46:42 +0000 (18:46 -0400)]
apps/s_server: document '-naccept' cmd-line argument
Signed-off-by: Geoff Thorpe <geoff@openssl.org>