Dr. Stephen Henson
c2fd5d79ff
Fix copy for CCM, GCM and XTS.
...
Internal pointers in CCM, GCM and XTS contexts should either be
NULL or set to point to the appropriate key schedule. This needs
to be adjusted when copying contexts.
2014-06-30 12:57:29 +01:00
ZNV
370bf1d708
Make EVP_CIPHER_CTX_copy work in GCM mode.
...
PR#3272
2014-06-29 22:01:28 +01:00
Ben Laurie
8892ce7714
Constification - mostly originally from Chromium.
2014-06-29 21:05:23 +01:00
Dr. Stephen Henson
0e7bda79a1
Handle BER length encoding.
...
Tolerate BER length encoding which may include leading zeroes.
PR#2746
2014-06-29 00:07:08 +01:00
Andy Polyakov
a356e488ad
x86_64 assembly pack: refine clang detection.
2014-06-28 17:23:21 +02:00
Andreas Westfeld
d1d4382dcb
Fix typo in ideatest.c
2014-06-28 00:06:13 +01:00
Dr. Stephen Henson
59deb33cbe
Fix for EVP_PBE_alg_add().
...
In EVP_PBE_alg_add don't use the underlying NID for the cipher
as it may have a non-standard key size.
PR#3206
2014-06-27 23:19:39 +01:00
Andy Polyakov
406d4af050
bn/asm/rsaz-avx2.pl: fix occasional failures.
2014-06-27 22:41:58 +02:00
Dr. Stephen Henson
11da66f8b1
Tolerate critical AKID in CRLs.
...
PR#3014
2014-06-27 18:49:32 +01:00
Tom Greenslade
b36f35cda9
Handle IPv6 addresses in OCSP_parse_url.
...
PR#2783
2014-06-27 17:30:59 +01:00
Dr. Stephen Henson
abac8e0e08
Rebuild OID table.
2014-06-27 14:35:07 +01:00
Dr. Stephen Henson
95791bf941
Fix OID encoding for one component.
...
OIDs with one component don't have an encoding.
PR#2556 (Bug#1)
2014-06-27 14:35:07 +01:00
Dr. Stephen Henson
d2aea03829
Memory leak and NULL dereference fixes.
...
PR#3403
2014-06-27 14:35:07 +01:00
Huzaifa Sidhpurwala
3b3b69ab25
Make sure BN_sqr can never return a negative value.
...
PR#3410
2014-06-26 23:56:34 +01:00
Dr. Stephen Henson
7be6b27aaf
Remove ancient obsolete files under pkcs7.
2014-06-26 23:56:34 +01:00
Andy Polyakov
f3f620e1e0
bn_exp.c: move check for AD*X to rsaz-avx2.pl.
...
This ensures high performance is situations when assembler supports
AVX2, but not AD*X.
2014-06-27 00:07:15 +02:00
Andy Polyakov
052ecf91d2
aesp8-ppc.pl: rigid input verification in key setup.
2014-06-25 22:13:17 +02:00
Andy Polyakov
7b8c8c4d79
aesv8-armx.pl: rigid input verification in key setup.
2014-06-25 22:10:45 +02:00
Andy Polyakov
7eb0488280
x86_64 assembly pack: addendum to last clang commit.
2014-06-24 08:37:05 +02:00
Andy Polyakov
ac171925ab
x86_64 assembly pack: allow clang to compile AVX code.
2014-06-24 08:24:25 +02:00
Andy Polyakov
015364baf3
aesv8-armx.pl: inclrease interleave factor.
...
This is to compensate for higher aes* instruction latency on Cortex-A57.
2014-06-24 08:08:58 +02:00
Andy Polyakov
0f777aeb50
ARMv8 assembly pack: add Cortex performance numbers.
2014-06-24 08:06:05 +02:00
Viktor Dukhovni
eef1827f89
One more typo when changing !result to result <= 0
2014-06-23 16:26:34 +01:00
Viktor Dukhovni
90b70a6a6b
Fix typo in last commit
2014-06-22 20:39:52 -04:00
Viktor Dukhovni
8abffa4a73
Multiple verifier reference identities.
...
Implemented as STACK_OF(OPENSSL_STRING).
2014-06-22 20:32:35 -04:00
Viktor Dukhovni
66d884f067
Implement sk_deep_copy.
2014-06-22 20:24:18 -04:00
Viktor Dukhovni
29edebe95c
More complete input validation of X509_check_mumble
2014-06-22 20:18:53 -04:00
Viktor Dukhovni
a48fb0400c
X509_check_mumble() failure is <= 0, not just 0
2014-06-22 20:14:53 -04:00
Viktor Dukhovni
b3012c698a
Drop hostlen from X509_VERIFY_PARAM_ID.
...
Just store NUL-terminated strings. This works better when we add
support for multiple hostnames.
2014-06-22 19:52:44 -04:00
Felix Laurie von Massenbach
50cc4f7b3d
Fix signed/unsigned comparisons.
2014-06-17 17:41:46 +01:00
Felix Laurie von Massenbach
1f61d8b5b1
Fix shadow declaration.
2014-06-17 17:41:46 +01:00
Andy Polyakov
9024b84b7c
aesni-sha[1|256]-x86_64.pl: fix logical error and MacOS X build.
2014-06-16 10:11:45 +02:00
Andy Polyakov
764fe518da
aesp8-ppc.pl: add CTR mode.
2014-06-16 08:05:19 +02:00
Viktor Dukhovni
7241a4c7fd
Enforce _X509_CHECK_FLAG_DOT_SUBDOMAINS internal-only
2014-06-14 22:31:29 +01:00
Andy Polyakov
ce00c64df9
evp/e_aes_cbc_sha[1|256].c: fix -DPEDANTIC build.
2014-06-14 23:15:39 +02:00
Andy Polyakov
91a6bf80f8
aesni-sha256-x86_64.pl: add missing rex in shaext.
...
PR: 3405
2014-06-14 16:03:06 +02:00
Andy Polyakov
c9cf29cca2
sha1-x86_64.pl: add missing rex prefix in shaext.
...
PR: 3405
2014-06-14 15:27:54 +02:00
Viktor Dukhovni
a09e4d24ad
Client-side namecheck wildcards.
...
A client reference identity of ".example.com" matches a server
certificate presented identity that is any sub-domain of "example.com"
(e.g. "www.sub.example.com).
With the X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS flag, it matches
only direct child sub-domains (e.g. "www.sub.example.com").
2014-06-12 23:19:25 +01:00
Andy Polyakov
977f32e852
Facilitate back-porting of AESNI and SHA modules.
...
Fix SEH and stack handling in Win64 build.
2014-06-12 21:45:41 +02:00
Andy Polyakov
1cf8f57b43
ghash-x86_64.pl: optimize for upcoming Atom.
2014-06-11 11:34:18 +02:00
Andy Polyakov
619b94667c
Add support for Intel SHA extension.
2014-06-11 10:27:45 +02:00
Rob Stradling
fd2309aa29
Separate the SCT List parser from the SCT List viewer
2014-06-10 23:44:13 +01:00
Andy Polyakov
e2eabed110
aesni-mb-x86_64.pl: add Win64 SEH.
2014-06-10 23:08:06 +02:00
Dr. Stephen Henson
7a9d59c148
Fix null pointer errors.
...
PR#3394
2014-06-10 14:47:29 +01:00
Jakub Wilk
7be1d8764d
Create ~/.rnd with mode 0600 instead of 0666
...
Because of a missing include <fcntl.h> we don't have O_CREATE and don't create
the file with open() using mode 0600 but fall back to using fopen() with the
default umask followed by a chmod().
Problem found by Jakub Wilk <jwilk@debian.org>.
2014-06-08 21:15:48 +01:00
Andy Polyakov
5dcf70a1c5
ARM assembly pack: get ARMv7 instruction endianness right.
...
Pointer out and suggested by: Ard Biesheuvel.
2014-06-06 21:27:18 +02:00
Andy Polyakov
cd91fd7c32
sha[1|512]-armv8.pl: get instruction endianness right.
...
Submitted by: Ard Biesheuvel.
2014-06-06 20:50:43 +02:00
Andy Polyakov
82741e9c89
Engage GHASH for ARMv8.
2014-06-06 20:48:35 +02:00
Andy Polyakov
2d5a799d27
Add GHASH for ARMv8 Crypto Extension.
...
Result of joint effort with Ard Biesheuvel.
2014-06-06 20:43:02 +02:00
Andy Polyakov
65cad34b10
aesv8-armx.pl update:
...
- fix 32-bit build (submitted by Ard Biesheuvel);
- fix performance issue in CTR;
2014-06-06 12:18:51 +02:00
Andy Polyakov
d86689e1d9
aesp8-ppc.pl: fix typos.
2014-06-04 08:34:18 +02:00
Andy Polyakov
53a224bb0a
evp/e_aes.c: add erroneously omitted break;
2014-06-04 08:33:06 +02:00
Libor Krystek
8e3231642b
Corrected OPENSSL_NO_EC_NISTP_64_GCC_128 usage in ec_lcl.h. PR#3370
2014-06-03 23:15:58 +01:00
Andy Polyakov
030a3f9527
evp/e_aes.c: populate HWAES_* to remaning modes.
...
Submitted by: Ard Biesheuvel.
2014-06-02 21:48:02 +02:00
Andy Polyakov
de51e830a6
Engage POWER8 AES support.
2014-06-01 23:38:11 +02:00
Andy Polyakov
723463282f
armv4cpuid.S: switch to CNTVCT tick counter.
2014-06-01 22:34:02 +02:00
Andy Polyakov
797d24bee9
sha[1|256]-armv4: harmonize with arm_arch.h.
2014-06-01 22:29:50 +02:00
Andy Polyakov
ddacb8f27b
Engage ARMv8 AES support.
2014-06-01 22:20:37 +02:00
Andy Polyakov
f8aab6174c
linux-aarch64: engage SHA modules.
2014-06-01 18:03:51 +02:00
Andy Polyakov
ddb6b965da
Add SHA for ARMv8.
2014-06-01 18:02:11 +02:00
Andy Polyakov
e8d93e342b
Add linux-aarch64 taget.
...
armcap.c is shared between 32- and 64-bit builds and features link-time
detection of getauxval.
Submitted by: Ard Biesheuvel.
2014-06-01 17:21:06 +02:00
Ben Laurie
c93233dbfd
Tidy up, don't exceed the number of requested bits.
2014-06-01 15:31:27 +01:00
Ben Laurie
46838817c7
Constify and reduce coprime random bits to allow for multiplier.
2014-06-01 15:31:27 +01:00
Felix Laurie von Massenbach
8927c2786d
Add a test to check we're really generating probable primes.
2014-06-01 15:31:27 +01:00
Felix Laurie von Massenbach
9a3a99748b
Remove unused BIGNUMs.
2014-06-01 15:31:27 +01:00
Felix Laurie von Massenbach
c74e148776
Refactor the first prime index.
2014-06-01 15:31:26 +01:00
Felix Laurie von Massenbach
982c42cb20
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
2014-06-01 15:31:26 +01:00
Felix Laurie von Massenbach
c09ec5d2a0
Generate safe primes not divisible by 3, 5 or 7.
...
~2% speed improvement on trial division.
2014-06-01 15:31:26 +01:00
Felix Laurie von Massenbach
b0513819e0
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.
2014-06-01 15:31:26 +01:00
Felix Laurie von Massenbach
e46a059ebf
Remove static from probable_prime_dh.
2014-06-01 15:31:26 +01:00
Felix Laurie von Massenbach
e55fca760b
Remove indentation from the goto targets.
2014-06-01 15:31:26 +01:00
Dr. Stephen Henson
3009244da4
Set default global mask to UTF8 only.
2014-06-01 15:03:00 +01:00
Andy Polyakov
e09ea622bb
aesv8-armx.pl: add CTR implementation.
...
Submitted by: Ard Biesheuvel.
2014-05-29 22:45:35 +02:00
Dr. Stephen Henson
46d889f33e
Set version number correctly.
...
PR#3249
2014-05-29 14:33:32 +01:00
František Bořánek
4da0ddc47e
Fix memory leak.
...
PR#3278
2014-05-29 14:33:32 +01:00
Martin Kaiser
1c4575ebc3
remove duplicate 0x for default RSASSA-PSS salt len
2014-05-29 14:33:32 +01:00
Andy Polyakov
7cbdb975c2
aesp8-ppc.pl: optimize CBC decrypt even further.
...
10-19% improvement depending on key length and endianness.
2014-05-29 15:10:12 +02:00
Ben Laurie
ba4477d649
Make it build.
...
Closes #31 .
2014-05-25 17:35:04 +01:00
Christian Heimes
56431240ae
add test case to makefiles
2014-05-25 17:35:04 +01:00
Christian Heimes
4d4a535dcf
Implement tests for PKCS#5 PBKDF2 HMAC
2014-05-25 17:35:04 +01:00
Dr. Stephen Henson
0930251df8
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
2014-05-25 04:50:15 +01:00
Dr. Stephen Henson
6c21b860ba
Rename vpm_int.h to x509_lcl.h
2014-05-25 04:50:14 +01:00
Luiz Angelo Daros de Luca
dd36fce023
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>
2014-05-23 23:05:38 +01:00
Andy Polyakov
fda29b6db0
aesp8-ppc.pl: add optimized CBC decrypt.
2014-05-23 20:15:06 +02:00
Andy Polyakov
b83d09f552
vpaes-ppc.pl: comply with ABI.
2014-05-23 20:14:38 +02:00
Ben Laurie
eb33348879
Check length first in BUF_strnlen().
2014-05-22 10:13:22 +01:00
Ben Laurie
12f1b3e79f
Remove redundant test.
2014-05-21 12:03:02 +01:00
Ben Laurie
dea4a18404
Implement BUF_strnlen() and use it instead of strlen().
2014-05-21 11:58:03 +01:00
Viktor Dukhovni
397a8e747d
Fixes to host checking.
...
Fixes to host checking wild card support and add support for
setting host checking flags when verifying a certificate
chain.
2014-05-21 11:31:28 +01:00
Dr. Stephen Henson
558c94efc0
Fix for PKCS12_create if no-rc2 specified.
...
Use triple DES for certificate encryption if no-rc2 is
specified.
PR#3357
2014-05-21 11:28:58 +01:00
Andy Polyakov
3e68273326
aesv8-armx.pl: fix typo.
2014-05-20 23:32:12 +02:00
Andy Polyakov
a0a17fcb75
aesv8-armx.pl: optimize by adding 128-bit code paths.
2014-05-20 22:50:28 +02:00
Ben Laurie
d8ac1ea77e
Don't allocate more than is needed in BUF_strndup().
2014-05-20 13:52:31 +01:00
Janpopan
ff626ba5f4
Fix a wrong parameter count ERR_add_error_data
2014-05-19 22:10:14 +01:00
Andy Polyakov
5727e4dab8
Add "teaser" AES module for ARMv8.
...
"Teaser" means that it's initial proof-of-concept to build EVP module
upon.
2014-05-19 08:46:44 +02:00
Andy Polyakov
f75faa16af
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.
2014-05-12 10:35:29 +02:00
Kurt Roeckx
3b3ecce141
Set authkey to NULL and check malloc return value.
2014-05-12 00:20:08 +01:00
Martin Brejcha
00f3a236e0
dgram_sctp_ctrl: authkey memory leak
...
PR: 3327
2014-05-12 00:20:08 +01:00
Dr. Stephen Henson
0bcb17a777
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
2014-05-09 14:24:54 +01:00
Matt Caswell
2d2e0479eb
Fixed NULL pointer dereference in PKCS7_dataDecode reported by David Ramos in PR#3339
2014-05-07 23:21:02 +01:00
Geoff Thorpe
fce3821111
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>
2014-05-06 17:52:19 -04:00
Geoff Thorpe
12e9f627f9
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>
2014-05-06 17:43:35 -04:00
Dr. Stephen Henson
3ba1e406c2
Initialize num properly.
...
PR#3289
PR#3345
2014-05-06 14:07:37 +01:00
Dr. Stephen Henson
546b1b4384
Set Enveloped data version to 2 if ktri version not zero.
2014-05-06 13:59:05 +01:00
Tim Hudson
8bbfd94e36
- fix coverity issues 966593-966596
2014-05-06 00:02:31 +01:00
Andy Polyakov
b943b7d2c7
md5/asm/md5-[586|x86_64].pl: +15% on Atom.
...
[MD5 is hardly relevant, just cleaning up repository]
2014-05-04 16:56:00 +02:00
Andy Polyakov
496f2b148b
C64x+ assembply pack: add RC4 module.
2014-05-04 16:39:59 +02:00
Andy Polyakov
bd227733b9
C64x+ assembly pack: make it work with older toolchain.
2014-05-04 16:38:32 +02:00
Andy Polyakov
9250a30692
sha/asm/sha1-armv4-large.pl: add NEON and ARMv8 code paths.
...
sha/asm/sha256-armv4.pl: add ARMv8 code path.
2014-05-04 10:57:55 +02:00
Andy Polyakov
4afa9f033d
crypto/armcap.c: detect ARMv8 capabilities [in 32-bit build].
2014-05-04 10:55:49 +02:00
David Ramos
16ba70746b
Double free in i2o_ECPublicKey
...
PR: 3338
2014-05-04 00:46:20 +01:00
Geoff Thorpe
da12bfca51
dso: eliminate VMS code on non-VMS systems
...
Even though the meat of dso_vms.c is compiled out on non-VMS builds,
the (pre-)compiler still traverses some of the macro handling. This
trips up at least one non-VMS build configuration, so this commit
makes the skip-VMS case more robust.
Signed-off-by: Geoff Thorpe <geoff@openssl.org>
2014-05-01 21:59:36 -04:00
Geoff Thorpe
a529261891
bignum: fix boundary condition in montgomery logic
...
It's not clear whether this inconsistency could lead to an actual
computation error, but it involved a BIGNUM being passed around the
montgomery logic in an inconsistent state. This was found using flags
-DBN_DEBUG -DBN_DEBUG_RAND, and working backwards from this assertion
in 'ectest';
ectest: bn_mul.c:960: BN_mul: Assertion `(_bnum2->top == 0) ||
(_bnum2->d[_bnum2->top - 1] != 0)' failed
Signed-off-by: Geoff Thorpe <geoff@openssl.org>
2014-04-30 11:49:31 -04:00
mancha
e14f14d36e
Fix eckey_priv_encode()
...
Fix eckey_priv_encode to return an error on failure of i2d_ECPrivateKey.
2014-04-26 07:59:13 +01:00
Geoff Thorpe
79c6c4e828
make depend
2014-04-25 14:31:05 -04:00
Andy Polyakov
f8cee9d081
bn/asm/armv4-gf2m.pl, modes/asm/ghash-armv4.pl: faster multiplication
...
algorithm suggested in following paper:
Câmara, D.; Gouvêa, C. P. L.; López, J. & Dahab, R.: Fast Software
Polynomial Multiplication on ARM Processors using the NEON Engine.
http://conradoplg.cryptoland.net/files/2010/12/mocrysen13.pdf
2014-04-24 10:24:53 +02:00
Andy Polyakov
558ff0f0c1
aes/asm/bsaes-x86_64.pl: Atom-specific optimization.
2014-04-24 10:13:30 +02:00
Ben Laurie
4ba5e63bfd
Fix double frees.
2014-04-22 16:58:43 +01:00
Dr. Stephen Henson
300b9f0b70
Extension checking fixes.
...
When looking for an extension we need to set the last found
position to -1 to properly search all extensions.
PR#3309.
2014-04-15 18:50:53 +01:00
Dr. Stephen Henson
476830fd5b
ssleay_rand_add returns a value in 1.1.0
2014-04-09 15:35:51 +01:00
Dr. Stephen Henson
f74fa33bce
Return if ssleay_rand_add called with zero num.
...
Treat a zero length passed to ssleay_rand_add a no op: the existing logic
zeroes the md value which is very bad. OpenSSL itself never does this
internally and the actual call doesn't make sense as it would be passing
zero bytes of entropy.
Thanks to Marcus Meissner <meissner@suse.de> for reporting this bug.
(cherry picked from commit 5be1ae28ef
)
2014-04-07 19:44:45 +01:00
Andy Polyakov
997d1aac7c
crypto/modes/gcm128.c: more strict aliasing fixes.
2014-04-06 17:19:54 +02:00
Andy Polyakov
6eebcf3459
vpaes-[x86_64|ppc].pl: fix typo, which for some reason triggers rkhunter.
2014-04-06 12:50:36 +02:00
Eric Young
10378fb5f4
Fix base64 decoding bug.
...
A short PEM encoded sequence if passed to the BIO, and the file
had 2 \n following would fail.
PR#3289
2014-04-02 19:54:27 +01:00
Dr. Stephen Henson
b48310627d
Don't try and verify signatures if key is NULL (CVE-2013-0166)
...
Add additional check to catch this in ASN1_item_verify too.
(cherry picked from commit 66e8211c0b
)
2014-04-01 16:37:51 +01:00
Dr. Stephen Henson
2514fa79ac
Add functions returning security bits.
...
Add functions to return the "bits of security" for various public key
algorithms. Based on SP800-57.
2014-03-28 14:49:04 +00:00
Dr. Stephen Henson
3a98f9cf20
Workaround for some CMS signature formats.
...
Some CMS SignedData structure use a signature algorithm OID such
as SHA1WithRSA instead of the RSA algorithm OID. Workaround this
case by tolerating the signature if we recognise the OID.
2014-03-19 17:28:01 +00:00
Dr. Stephen Henson
f9b6c0ba4c
Fix for CVE-2014-0076
...
Fix for the attack described in the paper "Recovering OpenSSL
ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack"
by Yuval Yarom and Naomi Benger. Details can be obtained from:
http://eprint.iacr.org/2014/140
Thanks to Yuval Yarom and Naomi Benger for discovering this
flaw and to Yuval Yarom for supplying a fix.
(cherry picked from commit 2198be3483
)
Conflicts:
CHANGES
2014-03-12 14:29:43 +00:00
Andy Polyakov
5e44c144e6
SPARC T4 assembly pack: treat zero input length in CBC.
...
The problem is that OpenSSH calls EVP_Cipher, which is not as
protective as EVP_CipherUpdate. Formally speaking we ought to
do more checks in *_cipher methods, including rejecting
lengths not divisible by block size (unless ciphertext stealing
is in place). But for now I implement check for zero length in
low-level based on precedent.
PR: 3087, 2775
2014-03-07 10:30:37 +01:00
Andy Polyakov
53e5161231
dh_check.c: check BN_CTX_get's return value.
2014-03-06 14:19:37 +01:00
Andy Polyakov
972b0dc350
bss_dgram.c,d1_lib.c: make it compile with mingw.
...
Submitted by: Roumen Petrov
2014-03-06 14:04:56 +01:00
Dr. Stephen Henson
315cd871c4
For self signed root only indicate one error.
...
(cherry picked from commit bdfc0e284c
)
2014-03-03 23:36:46 +00:00
Dr. Stephen Henson
5693a30813
PKCS#8 support for alternative PRFs.
...
Add option to set an alternative to the default hmacWithSHA1 PRF
for PKCS#8 private key encryptions. This is used automatically
by PKCS8_encrypt if the nid specified is a PRF.
Add option to pkcs8 utility.
Update docs.
(cherry picked from commit b60272b01f
)
2014-03-01 23:16:08 +00:00
Dr. Stephen Henson
01757858fe
Fix memory leak.
...
(cherry picked from commit 124d218889
)
2014-03-01 23:15:53 +00:00
Andy Polyakov
b62a4a1c0e
perlasm/x86asm.pl: recognize elf-1 denoting old ELF platforms.
2014-02-27 14:26:12 +01:00
Andy Polyakov
ce876d8316
perlasm/x86gas.pl: limit special OPENSSL_ia32cap_P treatment to ELF.
2014-02-27 14:22:13 +01:00
Andy Polyakov
f861b1d433
rc4/asm/rc4-586.pl: allow for 386-only build.
2014-02-27 14:19:19 +01:00
Andy Polyakov
fd361a67ef
des/asm/des-586.pl: shortcut reference to DES_SPtrans.
2014-02-27 14:17:43 +01:00
Rob Stradling
52f71f8181
CABForum EV OIDs for Subject Jurisdiction of Incorporation or Registration.
2014-02-26 15:33:11 +00:00
Andy Polyakov
d49135e7ea
sha/asm/sha256-586.pl: don't try to compile SIMD with no-sse2.
2014-02-26 10:22:13 +01:00
Andy Polyakov
147cca8f53
sha/asm/sha512-x86_64.pl: fix compilation error on Solaris.
2014-02-26 09:30:03 +01:00
Andy Polyakov
e704741bf3
aes/asm/vpaes-ppc.pl: fix traceback info.
2014-02-25 20:11:34 +01:00
Dr. Stephen Henson
e0520c65d5
Don't use BN_ULLONG in n2l8 use SCTS_TIMESTAMP.
...
(cherry picked from commit 3678161d71
)
2014-02-25 15:06:51 +00:00
Dr. Stephen Henson
3a325c60a3
Fix for v3_scts.c
...
Not all platforms define BN_ULLONG. Define SCTS_TIMESTAMP as a type
which should work on all platforms.
(cherry picked from commit 6634416732
)
2014-02-25 14:56:31 +00:00
Dr. Stephen Henson
a4cc3c8041
Avoid Windows 8 Getversion deprecated errors.
...
Windows 8 SDKs complain that GetVersion() is deprecated.
We only use GetVersion like this:
(GetVersion() < 0x80000000)
which checks if the Windows version is NT based. Use a macro check_winnt()
which uses GetVersion() on older SDK versions and true otherwise.
2014-02-25 13:40:33 +00:00
Rob Stradling
19f65ddbab
Parse non-v1 SCTs less awkwardly.
2014-02-25 10:14:51 +00:00
Andy Polyakov
758954e0d8
x509/by_dir.c: fix run-away pointer (and potential SEGV)
...
when adding duplicates in add_cert_dir.
PR: 3261
Reported by: Marian Done
2014-02-24 15:16:56 +01:00
Andy Polyakov
214368ffee
aes/asm/aesni-x86[_64].pl: minor Atom-specific performance tweak.
2014-02-21 12:14:04 +01:00
Dr. Stephen Henson
47739161c6
fix WIN32 warnings
...
(cherry picked from commit b709f8ef54
)
2014-02-20 22:55:24 +00:00
Dr. Stephen Henson
ded18639d7
Move CT viewer extension code to crypto/x509v3
2014-02-20 18:48:56 +00:00
Dr. Stephen Henson
4cfeb00be9
make depend
2014-02-19 20:09:08 +00:00
Dr. Stephen Henson
84917787b5
Remove references to o_time.h
2014-02-19 20:06:13 +00:00
Ben Laurie
ff49a94439
Move gmtime functions to crypto.h.
2014-02-19 18:02:04 +00:00
Ben Laurie
c0482547b3
Reverse export of o_time.h.
2014-02-19 17:57:07 +00:00
Ben Laurie
765e9ba911
Merge branch 'sct-viewer-master' of https://github.com/robstradling/openssl into sct-viewer
2014-02-19 17:17:14 +00:00
Rob Stradling
b263f21246
Move the SCT List extension parser into libssl.
...
Add the extension parser in the s_client, ocsp and x509 apps.
2014-02-19 13:12:46 +00:00
Dr. Stephen Henson
6ecbc2bb62
Don't use CRYPTO_AES_CTR if it isn't defined.
2014-02-18 22:20:30 +00:00
Dr. Stephen Henson
5a7652c3e5
Remove duplicate statement.
2014-02-15 01:27:56 +00:00
Klaus-Peter Junghanns
be2c4d9bd9
Add support for aes-128/192/256-ctr to the cryptodev engine.
...
This can be used to speed up SRTP with libsrtp, e.g. on TI omap/sitara based devices.
2014-02-15 00:01:40 +00:00
Rob Stradling
dcfe8df148
Show the contents of the RFC6962 Signed Certificate Timestamp List Certificate/OCSP Extensions.
...
Add the RFC6962 OIDs to the objects table.
2014-02-14 23:24:35 +00:00
Scott Schaefer
2b4ffc659e
Fix various spelling errors
2014-02-14 22:29:12 +00:00
Andy Polyakov
701134320a
ssl/s3_pkt.c: detect RAND_bytes error in multi-block.
2014-02-14 17:43:31 +01:00
Andy Polyakov
f4d456408d
x86[_64]cpuid.pl: add low-level RDSEED.
2014-02-14 17:24:12 +01:00
Andy Polyakov
5599c7331b
aes/asm/aesni-x86_64.pl: further optimization for Atom Silvermont.
...
Improve CBC decrypt and CTR by ~13/16%, which adds up to ~25/33%
improvement over "pre-Silvermont" version. [Add performance table to
aesni-x86.pl].
2014-02-14 17:06:15 +01:00
Dr. Stephen Henson
385b348666
Include TA in checks/callback with partial chains.
...
When a chain is complete and ends in a trusted root checks are also
performed on the TA and the callback notified with ok==1. For
consistency do the same for chains where the TA is not self signed.
2014-02-14 15:07:01 +00:00
Dr. Stephen Henson
2dac2667d1
Don't do loop detection for self signed check.
2014-02-14 14:52:23 +00:00
Dr. Stephen Henson
847865d0f9
Add suppot for ASCII with CRLF canonicalisation.
2014-02-13 14:35:56 +00:00
Andy Polyakov
9587429fa0
evp/e_aes_cbc_hmac_sha*.c: improve cache locality.
2014-02-13 14:39:55 +01:00
Andy Polyakov
98e143f118
ghash-x86[_64].pl: ~15% improvement on Atom Silvermont
...
(other processors unaffected).
2014-02-13 14:37:28 +01:00
Ben Laurie
fc92396976
Fix warning.
2014-02-13 03:11:58 +00:00
Andy Polyakov
5a42c8f07f
e_aes_cbc_hmac_sha[1|256].c: fix compiler warning.
2014-02-05 16:38:22 +01:00
Andy Polyakov
0d5096fbd6
evp/e_aes_cbc_hmac_sha*.c: additional CTRL to query buffer requirements.
2014-02-05 14:05:08 +01:00
Andy Polyakov
3847d15d6b
[aesni|sha*]-mb-x86_64.pl: add data prefetching.
2014-02-05 14:03:35 +01:00
Andy Polyakov
d162584b11
modes/asm/ghash-s390x.pl: +15% performance improvement on z10.
2014-02-02 00:09:17 +01:00
Andy Polyakov
d8ba0dc977
crypto/aes/asm/aesni-x86[_64].pl update, up to 14% improvement on
...
Atom Silvermont. On other CPUs one can observe 1% loss on some
algorithms.
2014-02-01 21:13:49 +01:00
Andy Polyakov
b217ca63b1
crypto/sha/asm/sha1-x86_64.pl update:
...
+5% on Atom Silvermont, up to +8% improvement of legacy code.
Harmonize sha1-586.pl and aesni-sha1-x86_86.p with sha1-x86_64.pl.
2014-02-01 21:07:16 +01:00
Dr. Stephen Henson
e933f91f50
Add loaded dynamic ENGINEs to list.
...
Always add a dynamically loaded ENGINE to list. Otherwise it can cause
problems when multiply loaded, especially if it adds new public key methods.
For all current engines we only want a single implementation anyway.
2014-01-28 13:51:58 +00:00
Dr. Stephen Henson
ec492c8a5a
Compare encodings in X509_cmp as well as hash.
2014-01-26 16:29:50 +00:00
Dr. Stephen Henson
9f10e9293b
typo
2014-01-12 14:13:48 +00:00
Dr. Stephen Henson
ef643cc7bd
Use rdrand as additional entropy source.
...
If available rdrand is used as an additional entropy source for the
PRNG and for additional input in FIPS mode.
2014-01-11 14:19:25 +00:00
Dr. Stephen Henson
8f4077ca69
Fix bug in X509_V_FLAG_IGNORE_CRITICAL CRL handling.
2014-01-09 22:52:49 +00:00
Andy Polyakov
eedab5241e
bn/asm/x86_64-mont5.pl: fix compilation error on Solaris.
2014-01-09 13:44:59 +01:00
Andy Polyakov
5dc52b919b
PPC assembly pack: relax 64-bit requirement for little-endian support.
2014-01-07 22:44:21 +01:00
Andy Polyakov
1fb83a3bc2
aes/asm/vpaes-ppc.pl: add little-endian support.
2014-01-07 16:48:04 +01:00
Andy Polyakov
ad0d2579cf
sha/asm/sha256-armv4.pl: add NEON code path.
...
(and shave off cycle even from integer-only code)
2014-01-04 18:04:53 +01:00
Andy Polyakov
25f7117f0e
aesni-sha1-x86_64.pl: refine Atom-specific optimization.
...
(and update performance data, and fix typo)
2014-01-04 17:13:57 +01:00
Andy Polyakov
2f3af3dc36
aesni-sha1-x86_64.pl: add stiched decrypt procedure,
...
but keep it disabled, too little gain... Add some Atom-specific
optimization.
2014-01-03 21:40:08 +01:00
Andy Polyakov
926725b3d7
sparcv9cap.c: omit random detection.
...
PR: 3202
2013-12-28 13:31:14 +01:00
Andy Polyakov
2218c296b4
ARM assembly pack: make it work with older toolchain.
2013-12-28 12:17:08 +01:00
Dr. Stephen Henson
cd30f03ac5
Canonicalise input in CMS_verify.
...
If content is detached and not binary mode translate the input to
CRLF format. Before this change the input was verified verbatim
which lead to a discrepancy between sign and verify.
2013-12-22 00:35:29 +00:00
Dr. Stephen Henson
560b34f2b0
Ignore NULL parameter in EVP_MD_CTX_destroy.
...
(cherry picked from commit a6c62f0c25
)
2013-12-20 23:32:25 +00:00
Andy Polyakov
fc0503a25c
sha1-x86_64.pl: harmonize Win64 SE handlers for SIMD code pathes.
...
(and ensure stack alignment in the process)
2013-12-18 22:12:08 +01:00
Andy Polyakov
e9c80e04c1
evp/e_[aes|camellia].c: fix typo in CBC subroutine.
...
It worked because it was never called.
2013-12-18 21:42:46 +01:00
Andy Polyakov
f0f4b8f126
PPC assembly pack update addendum.
2013-12-18 21:39:15 +01:00
Andy Polyakov
cdd1acd788
sha512.c: fullfull implicit API contract in SHA512_Transform.
...
SHA512_Transform was initially added rather as tribute to tradition
than for practucal reasons. But use was recently found in ssl/s3_cbc.c
and it turned to be problematic on platforms that don't tolerate
misasligned references to memory and lack assembly subroutine.
2013-12-18 21:27:35 +01:00
Andy Polyakov
128e1d101b
PPC assembly pack: improve AIX support (enable vpaes-ppc).
2013-12-18 21:19:08 +01:00
Dr. Stephen Henson
4a253652ee
Add opaque ID structure.
...
Move the IP, email and host checking fields from the public
X509_VERIFY_PARAM structure into an opaque X509_VERIFY_PARAM_ID
structure. By doing this the structure can be modified in future
without risk of breaking any applications.
(cherry picked from commit adc6bd73e3
)
Conflicts:
crypto/x509/x509_vpm.c
2013-12-13 15:42:16 +00:00
Dr. Stephen Henson
102302b05b
Fix for partial chain notification.
...
For consistency with other cases if we are performing
partial chain verification with just one certificate
notify the callback with ok==1.
(cherry picked from commit 852553d9005e13aed7feb986a5d71cb885b994c7)
2013-12-13 15:39:55 +00:00
Dr. Stephen Henson
8a1956f3ea
Don't use rdrand engine as default unless explicitly requested.
...
(cherry picked from commit 16898401bd47a153fbf799127ff57fdcfcbd324f)
2013-12-13 15:39:55 +00:00
Andy Polyakov
41965a84c4
x86_64-xlate.pl: minor update.
2013-12-09 21:23:19 +01:00
Andy Polyakov
ec9cc70f72
bn/asm/x86_64-mont5.pl: add MULX/AD*X code path.
...
This also eliminates code duplication between x86_64-mont and x86_64-mont
and optimizes even original non-MULX code.
2013-12-09 21:02:24 +01:00
Andy Polyakov
d1671f4f1a
bn/asm/armv4-mont.pl: add NEON code path.
2013-12-04 22:37:49 +01:00
Andy Polyakov
26e18383ef
perlasm/ppc-xlate.pl: add support for AltiVec/VMX and VSX.
...
Suggested by: Marcello Cerri
2013-12-04 22:01:31 +01:00
Andy Polyakov
f586d97191
perlasm/ppc-xlate.pl: improve linux64le support.
...
Suggested by: Marcello Cerri
2013-12-04 21:47:43 +01:00
Andy Polyakov
a61e51220f
aes/asm/vpaes-ppc.pl: comply with ABI.
2013-12-04 21:46:40 +01:00
Andy Polyakov
c5d5f5bd0f
bn/asm/x86_64-mont5.pl: comply with Win64 ABI.
...
PR: 3189
Submitted by: Oscar Ciurana
2013-12-03 23:59:55 +01:00
Andy Polyakov
8bd7ca9996
crypto/bn/asm/rsaz-x86_64.pl: make it work on Win64.
2013-12-03 22:28:48 +01:00
Andy Polyakov
31ed9a2131
crypto/bn/rsaz*: fix licensing note.
...
rsaz_exp.c: harmonize line terminating;
asm/rsaz-*.pl: minor optimizations.
2013-12-03 22:08:29 +01:00
Andy Polyakov
6efef384c6
bn/asm/rsaz-x86_64.pl: fix prototype.
2013-12-03 09:43:06 +01:00
Andy Polyakov
89bb96e51d
vpaes-ppc.pl: fix bug in IV handling and comply with ABI.
2013-11-29 14:40:51 +01:00
Andy Polyakov
b9e87d07cb
ppc64-mont.pl: eliminate dependency on GPRs' upper halves.
2013-11-27 22:50:00 +01:00
Andy Polyakov
07f3e4f3f9
Take vpaes-ppc module into loop.
2013-11-27 22:39:13 +01:00
Andy Polyakov
b5c54c914f
Add Vector Permutation AES for PPC.
2013-11-27 22:32:56 +01:00
Dr. Stephen Henson
0f7fa1b190
Constify.
...
(cherry picked from commit 1abfa78a8b
)
2013-11-14 21:05:36 +00:00
Dr. Stephen Henson
afa23c46d9
Flag to disable automatic copying of contexts.
...
Some functions such as EVP_VerifyFinal only finalise a copy of the passed
context in case an application wants to digest more data. Doing this when
it is not needed is inefficient and many applications don't require it.
For compatibility the default is to still finalise a copy unless the
flag EVP_MD_CTX_FLAG_FINALISE is set in which case the passed
context is finalised an *no* further data can be digested after
finalisation.
2013-11-13 23:48:35 +00:00
Andy Polyakov
2df9ec01d5
srp/srp_grps.h: make it Compaq C-friendly.
...
PR: 3165
Submitted by: Daniel Richard G.
2013-11-12 22:09:55 +01:00
Andy Polyakov
5b63a39241
modes/asm/ghash-alpha.pl: fix typo.
2013-11-12 21:52:18 +01:00
Andy Polyakov
d1cf23ac86
Make Makefiles OSF-make-friendly.
...
PR: 3165
2013-11-12 21:51:37 +01:00
Dr. Stephen Henson
16bc45ba95
Fix memory leak.
2013-11-11 22:39:40 +00:00
Dr. Stephen Henson
85c9ba2342
Support setting of "no purpose" for trust.
...
If the oid parameter is set to NULL in X509_add1_trust_object
create an empty list of trusted purposes corresponding to
"no purpose" if trust is checked.
2013-11-11 22:39:23 +00:00
Dr. Stephen Henson
dd274b1c1c
Fix for some platforms where "char" is unsigned.
2013-11-09 15:09:23 +00:00
Dr. Stephen Henson
da15c61608
Add CMS_SignerInfo_get0_signature function.
...
Add function to retrieve the signature from a CMS_SignerInfo structure:
applications can then read or modify it.
2013-11-09 15:09:23 +00:00
Dr. Stephen Henson
534e5fabad
Check for missing components in RSA_check.
2013-11-09 15:09:23 +00:00
Andy Polyakov
33446493f4
modes/asm/ghash-alpha.pl: make it work with older assembler for real.
...
PR: 3165
2013-11-09 11:41:59 +01:00
Andy Polyakov
d24d1d7daf
modes/asm/ghash-alpha.pl: make it work with older assembler.
...
PR: 3165
2013-11-08 22:56:44 +01:00
Dr. Stephen Henson
b0513fd2bb
Initialise context before using it.
...
(cherry picked from commit a4947e4e06
)
2013-11-06 13:19:13 +00:00
Ben Laurie
c10e3f0cff
PBKDF2 should be efficient. Contributed by Christian Heimes
...
<christian@python.org>.
2013-11-03 17:23:50 +00:00
Robin Seggelmann
b814081136
DTLS/SCTP struct authchunks Bug
...
PR: 2809
DTLS/SCTP requires DATA and FORWARD-TSN chunks to be protected with
SCTP-AUTH. It is checked if this has been activated successfully for
the local and remote peer. Due to a bug, however, the
gauth_number_of_chunks field of the authchunks struct is missing on
FreeBSD, and was therefore not considered in the OpenSSL implementation.
This patch sets the corresponding pointer for the check correctly
whether or not this bug is present.
(cherry picked from commit f596e3c491
)
2013-11-01 21:41:52 +00:00
Andy Polyakov
fb65e65e28
sha/asm/sha512-ppc.pl: fix typo.
...
Submitted by: Marcelo Cerri
2013-10-31 20:21:54 +01:00
Andy Polyakov
0e0a105364
perlas/ppc-xlate.pl: fix typo.
2013-10-31 11:58:50 +01:00
Andy Polyakov
c944f81703
aes/asm/aes-ppc.pl: add little-endian support.
...
Submitted by: Marcelo Cerri
2013-10-31 11:41:26 +01:00
Andy Polyakov
8ff8a829b0
perlasm/ppc-xlate.pl: add .quad directive
...
sha/asm/sha512-ppc.pl: add little-endian support.
Submitted by: Marcelo Cerri
2013-10-31 11:08:51 +01:00
Andy Polyakov
3f9562a669
sha/asm/sha1-ppc.pl: add little-endian support.
...
Submitted by: Marcelo Cerri
2013-10-31 11:07:38 +01:00
Andy Polyakov
4eeb750d20
bn/asm/x86_64-mont.pl: minor optimization [for Decoded ICache].
2013-10-25 10:14:20 +02:00
Lubomir Rintel
ed77017b59
POD: Fix list termination
...
This fixes problems in POD list formatting: extra or missing =back
sequences.
doc/ssl/SSL_CTX_set1_curves.pod around line 90: =back without =over
doc/ssl/SSL_CTX_set1_verify_cert_store.pod around line 73: =back without =over
doc/ssl/SSL_CTX_add1_chain_cert.pod around line 82: =back without =over
doc/crypto/evp.pod around line 40: '=item' outside of any '=over'
crypto/des/des.pod around line 184: You forgot a '=back' before '=head1'
PR#3147
2013-10-22 07:38:25 +01:00
Dr. Stephen Henson
c051e521a7
Time value for various platforms.
...
The function gettimeofday() is not supported on all platforms. Use
more portable versions. Adapted from FIPS code.
2013-10-20 22:07:36 +01:00
Andy Polyakov
76c15d790e
PPC assembly pack: make new .size directives profiler-friendly.
...
Suggested by: Anton Blanchard
2013-10-15 23:40:12 +02:00
Dr. Stephen Henson
579a759071
Fix warning.
2013-10-15 11:33:30 +01:00
Dr. Stephen Henson
da317b94d9
Add test vectors from RFC7027
2013-10-15 11:33:30 +01:00
Dr. Stephen Henson
7f5fd314c0
Sync OID numbers with 1.0.2 branch.
2013-10-15 11:33:30 +01:00
Andy Polyakov
d6019e1654
PPC assembly pack: add .size directives.
2013-10-15 00:14:39 +02:00
Andy Polyakov
30b9c2348d
bn/asm/*x86_64*.pl: correct assembler requirement for ad*x.
2013-10-14 22:41:00 +02:00
Andy Polyakov
039081b809
Initial aarch64 bits.
2013-10-13 19:15:15 +02:00
Andy Polyakov
0c2adb0a9b
MIPS assembly pack: get rid of deprecated instructions.
...
Latest MIPS ISA specification declared 'branch likely' instructions
obsolete. To makes code future-proof replace them with equivalent.
2013-10-13 13:14:52 +02:00
Andy Polyakov
b4f0abd246
evp/e_aes_cbc_hmac_sha*.c: limit multi-block fragmentation to 1KB.
...
Excessive fragmentation put additional burden (of addtional MAC
calculations) on the other size and limiting fragments it to 1KB
limits the overhead to ~6%.
2013-10-12 22:10:28 +02:00
Andy Polyakov
7e1e3334f6
aes/asm/bsaes-x86_64.pl: fix Windows-specific bug in XTS.
...
PR: 3139
2013-10-12 21:37:55 +02:00
Andy Polyakov
fa104be35e
bn/asm/rsax-avx2.pl: minor optimization [for Decoded ICache].
2013-10-10 23:06:43 +02:00
Andy Polyakov
37de2b5c1e
bn/bn_exp.c: prefer MULX/AD*X over AVX2.
2013-10-09 11:08:52 +02:00
Andy Polyakov
a69c0a1be5
evp/e_aes_cbc_hmac_sha*.c: harmonize names, fix bugs.
2013-10-08 23:39:26 +02:00
Andy Polyakov
b1de640f03
evp/evp.h: add multi-block contstants and parameter type.
2013-10-08 23:38:05 +02:00
Andy Polyakov
61ba602af5
sha/asm/sha*-mb-x86_64.pl: commentary update.
2013-10-08 23:36:55 +02:00
Ben Laurie
c45a48c186
Constification.
2013-10-07 12:45:26 +01:00
Andy Polyakov
6f6a613032
aes/asm/bsaes-*.pl: improve decrypt performance.
...
Improve decrypt performance by 10-20% depending on platform. Thanks
to Jussi Kivilinna for providing valuable hint. Also thanks to Ard
Biesheuvel.
2013-10-03 23:08:31 +02:00
Andy Polyakov
524b00c0da
evp/e_des3.c: fix typo with potential integer overflow on 32-bit platforms.
...
Submitted by: Yuriy Kaminskiy
2013-10-03 10:55:49 +02:00
Andy Polyakov
6b2cae0c16
perlasm/sparcv9_modes.pl: make it work even with seasoned perl.
...
PR: 3130
2013-10-03 10:42:11 +02:00
Andy Polyakov
a5bb5bca52
bn/asm/x86_64-mont*.pl: add MULX/ADCX/ADOX code path.
2013-10-03 00:45:04 +02:00
Andy Polyakov
87954638a6
rsaz-x86_64.pl: add MULX/ADCX/ADOX code path.
2013-10-03 00:30:12 +02:00
Andy Polyakov
667053a2f3
x86_64-xlate.pl: fix jrcxz in nasm case.
2013-10-03 00:26:09 +02:00
Andy Polyakov
7f893258f6
evp/e_aes_cbc_hmac_sha*.c: multi-block glue code.
2013-10-03 00:24:03 +02:00
Andy Polyakov
6bcb68da41
Configire: take multi-block modules into build loop.
2013-10-03 00:21:10 +02:00
Andy Polyakov
b783858654
x86_64 assembly pack: add multi-block AES-NI, SHA1 and SHA256.
2013-10-03 00:18:58 +02:00
Andy Polyakov
5f487e0317
evp/e_aes_cbc_hmac_sha256.c: enable is on all AES-NI platforms, not only on AVX.
2013-10-03 00:16:51 +02:00
Andy Polyakov
066caf0551
aes/asm/*-armv*.pl: compensate for inconsistencies in tool-chains.
...
Suggested by: Ard Biesheuvel
2013-10-01 20:33:06 +02:00
Ben Laurie
3cd8547a20
Mix time into the pool to avoid repetition of the Android duplicated PID problem.
2013-09-20 16:52:07 +01:00
Ben Laurie
79b9209883
More diagnostics for invalid OIDs.
2013-09-20 14:38:36 +01:00
Andy Polyakov
e0202d946d
aes-armv4.pl, bsaes-armv7.pl: add Linux kernel and Thumb2 support.
...
Submitted by: Ard Biesheuvel
2013-09-20 13:22:57 +02:00
Dr. Stephen Henson
94c2f77a62
Add functions to set ECDSA_METHOD structure.
...
Add various functions to allocate and set the fields of an ECDSA_METHOD
structure.
2013-09-18 01:22:50 +01:00
Bodo Moeller
ca567a03ad
Fix overly lenient comparisons:
...
- EC_GROUP_cmp shouldn't consider curves equal just because
the curve name is the same. (They really *should* be the same
in this case, but there's an EC_GROUP_set_curve_name API,
which could be misused.)
- EC_POINT_cmp shouldn't return 0 for ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED
or EC_R_INCOMPATIBLE_OBJECTS errors because in a cmp API, 0 indicates
equality (not an error).
Reported by: king cope
2013-09-16 12:59:21 +02:00
Andy Polyakov
8e52a9063a
crypto/armcap.c: fix typo in rdtsc subroutine.
...
PR: 3125
Submitted by: Kyle McMartin
2013-09-15 22:07:49 +02:00
Andy Polyakov
612f4e2384
bsaes-armv7.pl: remove partial register operations in CTR subroutine.
2013-09-15 19:47:51 +02:00
Andy Polyakov
29f41e8a80
bsaes-armv7.pl: remove byte order dependency and minor optimization.
2013-09-15 19:44:43 +02:00
Ard Biesheuvel
a2ea9f3ecc
Added support for ARM/NEON based bit sliced AES in XTS mode
...
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2013-09-15 19:37:16 +02:00
Ben Laurie
edf92f1c41
Constification.
2013-09-10 18:04:08 +01:00
Andy Polyakov
7a1a12232a
crypto/modes/asm/aesni-gcm-x86_64.pl: minor optimization.
...
Avoid occasional up to 8% performance drops.
2013-09-09 21:43:21 +02:00
Andy Polyakov
72a158703b
crypto/bn/asm/x86_64-mont.pl: minor optimization.
2013-09-09 21:40:33 +02:00
Dr. Stephen Henson
52073b7675
Partial path fix.
...
When verifying a partial path always check to see if the EE certificate
is explicitly trusted: the path could contain other untrusted certificates.
2013-09-08 19:26:59 +01:00
Scott Deboy
36086186a9
Add callbacks supporting generation and retrieval of supplemental data entries, facilitating RFC 5878 (TLS auth extensions)
...
Removed prior audit proof logic - audit proof support was implemented using the generic TLS extension API
Tests exercising the new supplemental data registration and callback api can be found in ssltest.c.
Implemented changes to s_server and s_client to exercise supplemental data callbacks via the -auth argument, as well as additional flags to exercise supplemental data being sent only during renegotiation.
2013-09-06 13:59:13 +01:00
Veres Lajos
478b50cf67
misspellings fixes by https://github.com/vlajos/misspell_fixer
2013-09-05 21:39:42 +01:00
Ben Laurie
a0aaa5660a
Fix compile errors.
2013-08-21 04:21:42 +01:00
Dr. Stephen Henson
14536c8c9c
Make no-ec compilation work.
2013-08-17 17:41:13 +01:00
Kaspar Brand
5ae8d6bcba
Fix for PEM_X509_INFO_read_bio.
...
PR: 3028
Fix bug introduced in PEM_X509_INFO_bio which wouldn't process RSA keys
correctly if they appeared first.
2013-08-06 16:01:47 +01:00
Dr. Stephen Henson
bd59f2b91d
CMS RFC2631 X9.42 DH enveloped data support.
2013-08-05 16:23:13 +01:00
Dr. Stephen Henson
dc1ce3bc64
Add KDF for DH.
...
Add X9.42 DH KDF. Move sharedinfo generation code to CMS library as the
same structure is used by DH and ECDH.
Move ASN1_OBJECT typedef to ossl_typ.h so it can be picked up by dh headers
without the need to use ASN1.
2013-08-05 15:45:01 +01:00
Dr. Stephen Henson
3909087801
Extend DH parameter generation support.
...
Add support for DH parameter generation using DSA methods including
FIPS 186-3.
2013-08-05 15:45:01 +01:00
Dr. Stephen Henson
d3cc91eee2
Enhance DH dup functions.
...
Make DHparams_dup work properly with X9.42 DH parameters.
2013-08-05 15:45:01 +01:00
Dr. Stephen Henson
c9577ab5ea
If present print j, seed and counter values for DH
2013-08-05 15:45:00 +01:00
Dr. Stephen Henson
3f6b6f0b8c
Minor optimisation to KDF algorithm.
...
Don't need to use temporary buffer if remaining length equals digest length.
2013-08-05 15:45:00 +01:00
Dr. Stephen Henson
e61f5d55bc
Algorithm parameter support.
...
Check and set AlgorithmIdenfier parameters for key wrap algorithms.
Currently these just set parameters to NULL.
2013-08-05 15:45:00 +01:00
Andy Polyakov
a59f436295
crypto/evp/e_aes.c: fix logical pre-processor bug and formatting.
...
Bug would emerge when XTS is added to bsaes-armv7.pl. Pointed out by
Ard Biesheuvel of Linaro.
2013-08-03 17:09:06 +02:00
Andy Polyakov
fd8ad019e1
crypto/bn/asm/rsax-x86_64.pl: make it work on Darwin.
2013-08-03 16:28:50 +02:00
Andy Polyakov
006784378d
crypto/sha/asm/sha*-x86_64.pl: comply with Win64 ABI.
2013-07-31 23:50:15 +02:00
Dr. Stephen Henson
584ac22110
Make ecdsatest work with nonces.
...
Update ecdsatest to use ECDSA_sign_setup and ECDSA_sign_ex, this
avoids the nonce generation which would otherwise break the test.
Reinstate ecdsatest.
2013-07-19 14:11:43 +01:00
Dr. Stephen Henson
41b920ef01
Return correct enveloped data type in ASN1 methods.
...
For RSA and DSA keys return an appropriate RecipientInfo type. By setting
CMS_RECIPINFO_NONE for DSA keys an appropriate error is returned if
an attempt is made to use DSA with enveloped data.
2013-07-17 21:45:01 +01:00
Dr. Stephen Henson
88e20b8584
Add support for ECDH KARI.
...
Add support for ECDH in enveloped data. The CMS ctrls for the EC ASN1
method decode/encode the appropriate parameters from the CMS ASN1 data
and send appropriate data to the EC public key method.
2013-07-17 21:45:01 +01:00
Dr. Stephen Henson
25af7a5dbc
Add support for X9.62 KDF.
...
Add X9.62 KDF to EC EVP_PKEY_METHOD.
2013-07-17 21:45:00 +01:00
Dr. Stephen Henson
6af440ced4
Add new OIDs from RFC5753
...
Add OIDs for KDF schemes from RFC5753 and add cross references for
each type and the appropriate digest to use.
2013-07-17 21:45:00 +01:00
Dr. Stephen Henson
17c2764d2e
CMS support for key agreeement recipient info.
...
Add hooks to support key agreement recipient info type (KARI) using
algorithm specific code in the relevant public key ASN1 method.
2013-07-17 21:45:00 +01:00
Dr. Stephen Henson
ff7b6ce9db
Set CMS EnvelopedData version correctly.
2013-07-17 21:45:00 +01:00
Dr. Stephen Henson
97cf1f6c28
EVP support for wrapping algorithms.
...
Add support for key wrap algorithms via EVP interface.
Generalise AES wrap algorithm and add to modes, making existing
AES wrap algorithm a special case.
Move test code to evptests.txt
2013-07-17 21:45:00 +01:00
Dr. Stephen Henson
415ece7301
Typo.
2013-07-17 21:45:00 +01:00
Dr. Stephen Henson
8d6a75dc3a
Avoid need to change function code.
...
Keep original function names for nonce versions so we don't have to change
error function codes.
2013-07-17 21:45:00 +01:00
Adam Langley
190c615d43
Make `safe' (EC)DSA nonces the default.
...
This change updates 8a99cb29
to make the generation of (EC)DSA nonces
using the message digest the default. It also reverts the changes to
(EC)DSA_METHOD structure.
In addition to making it the default, removing the flag from EC_KEY
means that FIPS modules will no longer have an ABI mismatch.
2013-07-15 12:57:48 +01:00
Andy Polyakov
5c57c69f9e
bn/asm/rsaz-avx2.pl: Windows-specific fix.
2013-07-12 18:59:17 +02:00
Dr. Stephen Henson
4b26645c1a
Fix verify loop with CRL checking.
...
PR #3090
Reported by: Franck Youssef <fry@open.ch>
If no new reason codes are obtained after checking a CRL exit with an
error to avoid repeatedly checking the same CRL.
This will only happen if verify errors such as invalid CRL scope are
overridden in a callback.
2013-07-12 17:48:41 +01:00
Ben Laurie
852f837f5e
s/rsaz_eligible/rsaz_avx2_eligible/.
2013-07-12 12:47:39 +01:00
Andy Polyakov
241fba4ea9
sha512-586.pl: fix typo.
...
Submitted by: Gisle Vanem
2013-07-10 09:59:25 +02:00
Andy Polyakov
f5b132d652
Remove RSAX engine, superseded by RSAZ module.
2013-07-05 22:11:28 +02:00
Andy Polyakov
ca48ace5c5
Take RSAZ modules into build loop, add glue and engage.
...
RT: 2582, 2850
2013-07-05 21:39:47 +02:00
Andy Polyakov
0b4bb91db6
Add RSAZ assembly modules.
...
RT: 2582, 2850
2013-07-05 21:30:18 +02:00
Andy Polyakov
26e43b48a3
bn/asm/x86_86-mont.pl: optimize reduction for Intel Core family.
2013-07-05 21:10:56 +02:00
Andy Polyakov
cbce8c4644
bn/bn_exp.c: harmonize.
2013-07-05 20:52:58 +02:00
Dr. Stephen Henson
e0f7cfda68
Initialise CMS signature buffer length properly.
2013-07-02 22:12:19 +01:00
Andy Polyakov
b74ce8d948
bn/bn_exp.c: Solaris-specific fix, T4 MONTMUL relies on alloca.
2013-06-30 23:09:09 +02:00
Andy Polyakov
a9d14832fd
x86_64-xlate.pl: Windows fixes.
2013-06-30 23:07:33 +02:00
Andy Polyakov
42386fdb62
aesni-sha256-x86_64.pl: fix typo in Windows SEH.
2013-06-30 23:06:28 +02:00
Dr. Stephen Henson
0574cadf85
CMS RSA-OAEP and RSA-PSS support.
...
Extend RSA ASN1 method to support CMS PSS signatures for both sign
and verify.
For signing the EVP_PKEY_CTX parameters are read and the appropriate
CMS structures set up.
For verification the CMS structures are analysed and the corresponding
parameters in the EVP_PKEY_CTX set.
Also add RSA-OAEP support.
For encrypt the EVP_PKEY_CTX parameters are used.
For decrypt the CMS structure is uses to set the appropriate EVP_PKEY_CTX
parameters.
2013-06-21 23:43:05 +01:00
Dr. Stephen Henson
e365352d6a
CMS public key parameter support.
...
Add support for customisation of CMS handling of signed and enveloped
data from custom public key parameters.
This will provide support for RSA-PSS and RSA-OAEP but could also be
applied to other algorithms.
2013-06-21 21:33:00 +01:00
Dr. Stephen Henson
211a14f627
Update to OAEP support.
...
Add OAEP ctrls to retrieve MD and label. Return errors if
an attempt is made to set or retrieve OAEP parameters when
padding mode is not OAEP.
2013-06-21 21:33:00 +01:00
Dr. Stephen Henson
810639536c
Add control to retrieve signature MD.
2013-06-21 21:33:00 +01:00
Dr. Stephen Henson
e423c360fd
Add new OID to pSpecified from PKCS#1
2013-06-21 21:33:00 +01:00
Andy Polyakov
8ee3c7e676
SPARC T4 DES support: fix typo.
2013-06-18 10:42:08 +02:00
Andy Polyakov
4ddacd9921
Optimize SPARC T4 MONTMUL support.
...
Improve RSA sing performance by 20-30% by:
- switching from floating-point to integer conditional moves;
- daisy-chaining sqr-sqr-sqr-sqr-sqr-mul sequences;
- using MONTMUL even during powers table setup;
2013-06-18 10:39:38 +02:00
Andy Polyakov
02450ec69d
PA-RISC assembler pack: switch to bve in 64-bit builds.
...
PR: 3074
2013-06-18 10:37:00 +02:00
Adam Langley
8a99cb29d1
Add secure DSA nonce flag.
...
This change adds the option to calculate (EC)DSA nonces by hashing the
message and private key along with entropy to avoid leaking the private
key if the PRNG fails.
2013-06-13 17:26:07 +01:00
Adam Langley
a54a61e7a9
Don't SEGFAULT when trying to export a public DSA key as a private key.
2013-06-13 17:03:35 +01:00
Dr. Stephen Henson
271fef0ef3
Exetended OAEP support.
...
Extend OAEP support. Generalise the OAEP padding functions to support
arbitrary digests. Extend EVP_PKEY RSA method to handle the new OAEP
padding functions and add ctrls to set the additional parameters.
2013-06-12 18:48:17 +01:00
Dr. Stephen Henson
965e06da3c
Typo.
2013-06-12 18:47:28 +01:00
Andy Polyakov
3b848d3401
aesni-sha1-x86_64.pl: update performance data.
2013-06-10 22:35:22 +02:00
Andy Polyakov
42b9a4177b
aesni-sha256-x86_64.pl: harmonize with latest sha512-x86_64.pl.
2013-06-10 22:34:06 +02:00
Andy Polyakov
cd8d7335af
sha1-x86_64.pl: add AVX2+BMI code path.
2013-06-10 22:30:34 +02:00
Andy Polyakov
c7f690c243
sha512-x86_64.pl: upcoming-Atom-specific optimization.
2013-06-10 22:29:01 +02:00
Andy Polyakov
32213d8d77
sha[256|512]-586.pl: add more SIMD code paths.
2013-06-10 22:26:53 +02:00
Andy Polyakov
b42759158d
ghash-x86_64.pl: add Haswell performance data.
2013-06-10 22:25:12 +02:00
Andy Polyakov
1bc0b68d7b
x86cpuid.pl: fix extended feature flags detection.
2013-06-10 22:20:46 +02:00
Dr. Stephen Henson
2f58cda4ce
Fix PSS signature printing.
...
Fix PSS signature printing: consistently use 0x prefix for hex values for
padding length and trailer fields.
2013-06-05 15:06:03 +01:00
Dr. Stephen Henson
c71fdaed58
Reencode with X509_CRL_ctx_sign too.
2013-06-05 15:06:03 +01:00
Adam Langley
96a4c31be3
Ensure that, when generating small primes, the result is actually of the
...
requested size. Fixes OpenSSL #2701 .
This change does not address the cases of generating safe primes, or
where the |add| parameter is non-NULL.
Conflicts:
crypto/bn/bn.h
crypto/bn/bn_err.c
2013-06-04 18:52:30 +01:00
Adam Langley
2b0180c37f
Ensure that x**0 mod 1 = 0.
2013-06-04 18:47:11 +01:00
Adam Langley
7753a3a684
Add volatile qualifications to two blocks of inline asm to stop GCC from
...
eliminating them as dead code.
Both volatile and "memory" are used because of some concern that the compiler
may still cache values across the asm block without it, and because this was
such a painful debugging session that I wanted to ensure that it's never
repeated.
2013-06-04 18:46:25 +01:00
Ben Laurie
5dcd2deb3e
Remove added ;.
2013-06-04 17:27:18 +01:00
Ben Laurie
b25b8417a7
Missing prototypes.
2013-06-04 16:34:45 +01:00
Andy Polyakov
b69437e1e5
crypto/bn/bn_exp.c: SPARC portability fix.
2013-06-01 09:58:07 +02:00
Andy Polyakov
36df342f9b
aesni-x86_64.pl: optimize XTS.
...
PR: 3042
2013-05-25 19:23:09 +02:00
Andy Polyakov
4df2280b4f
aesni-sha1-x86_64.pl: Atom-specific optimization.
2013-05-25 19:08:39 +02:00
Andy Polyakov
504bbcf3cd
sha512-x86_64.pl: +16% optimization for Atom.
...
(and pending AVX2 changes).
2013-05-25 19:02:57 +02:00
Andy Polyakov
988d11b641
vpaes-x86[_64].pl: minor Atom-specific optimization.
2013-05-25 18:57:03 +02:00
Andy Polyakov
8a97a33063
Add AES-SHA256 stitch.
2013-05-13 22:49:58 +02:00
Andy Polyakov
22de0e6583
x86_64-xlate.pl: minor size/performance improvement.
2013-05-13 16:06:25 +02:00
Andy Polyakov
cd54249c21
aesni-x86_64.pl: minor CTR performance improvement.
2013-05-13 15:49:03 +02:00
Dr. Stephen Henson
c6d8adb8a4
Reencode certificates in X509_sign_ctx.
...
Reencode certificates in X509_sign_ctx as well as X509_sign.
This was causing a problem in the x509 application when it modified an
existing certificate.
2013-05-02 12:19:40 +01:00