Commit graph

5801 commits

Author SHA1 Message Date
Rob Stradling
f3b7e522d8 CABForum EV OIDs for Subject Jurisdiction of Incorporation or Registration.
(cherry picked from commit ffcc832ba6e17859d45779eea87e38467561dd5d)
2014-02-26 15:33:10 +00:00
Andy Polyakov
d00ae7cf70 sha/asm/sha256-586.pl: don't try to compile SIMD with no-sse2.
(cherry picked from commit d49135e7ea)
2014-02-26 10:23:56 +01:00
Andy Polyakov
f92926e331 sha/asm/sha512-x86_64.pl: fix compilation error on Solaris.
(cherry picked from commit 147cca8f53)
2014-02-26 09:31:40 +01:00
Andy Polyakov
aa1bb606f3 aes/asm/vpaes-ppc.pl: fix traceback info.
(cherry picked from commit e704741bf3)
2014-02-25 20:13:41 +01:00
Zoltan Arpadffy
dabd4f1986 OpenVMS fixes. 2014-02-25 15:16:03 +00:00
Dr. Stephen Henson
3678161d71 Don't use BN_ULLONG in n2l8 use SCTS_TIMESTAMP. 2014-02-25 15:05:08 +00:00
Dr. Stephen Henson
6634416732 Fix for v3_scts.c
Not all platforms define BN_ULLONG. Define SCTS_TIMESTAMP as a type
which should work on all platforms.
2014-02-25 14:54:09 +00:00
Dr. Stephen Henson
0f9bcf3319 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.
(cherry picked from commit a4cc3c8041)
2014-02-25 13:41:53 +00:00
Rob Stradling
a948732e1c Parse non-v1 SCTs less awkwardly.
(cherry picked from commit 19f65ddbab)
2014-02-25 13:04:21 +00:00
Andy Polyakov
83fe7b9c83 x509/by_dir.c: fix run-away pointer (and potential SEGV)
when adding duplicates in add_cert_dir.

PR: 3261
Reported by: Marian Done
(cherry picked from commit 758954e0d8)
2014-02-24 15:21:37 +01:00
Dr. Stephen Henson
97654d7e28 Prepare for 1.0.2-beta2-dev 2014-02-24 13:52:51 +00:00
Dr. Stephen Henson
94f4166017 Prepare for 1.0.2-beta1 release 2014-02-24 13:51:34 +00:00
Dr. Stephen Henson
a74c9c9e10 OpenSSL 1.0.2 is now in beta 2014-02-24 13:50:38 +00:00
Dr. Stephen Henson
d2a3c4497f make update 2014-02-24 13:50:38 +00:00
Andy Polyakov
2d4d9623da aes/asm/aesni-x86[_64].pl: minor Atom-specific performance tweak.
(cherry picked from commit 214368ffee)
2014-02-21 12:15:07 +01:00
Dr. Stephen Henson
7743be3aac make update 2014-02-20 22:57:24 +00:00
Dr. Stephen Henson
b709f8ef54 fix WIN32 warnings 2014-02-20 22:41:06 +00:00
Rob Stradling
c74ce24cd2 Show the contents of the RFC6962 Signed Certificate Timestamp List Certificate/OCSP Extensions.
Add the RFC6962 OIDs to the objects table.
(backport from master branch)
2014-02-20 21:43:54 +00:00
Dr. Stephen Henson
612566e752 Don't use CRYPTO_AES_CTR if it isn't defined.
(cherry picked from commit 6ecbc2bb62)
2014-02-18 22:21:41 +00:00
Dr. Stephen Henson
eb70d4407f Remove duplicate statement.
(cherry picked from commit 5a7652c3e5)
2014-02-15 01:29:24 +00:00
Klaus-Peter Junghanns
b335b5440a 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.
(cherry picked from commit be2c4d9bd9)
2014-02-15 00:06:43 +00:00
Scott Schaefer
0413ea5801 Fix various spelling errors
(cherry picked from commit 2b4ffc659e)
2014-02-14 22:35:15 +00:00
Andy Polyakov
aff78bb39a ssl/s3_pkt.c: detect RAND_bytes error in multi-block.
(cherry picked from commit 701134320a)
2014-02-14 17:45:33 +01:00
Andy Polyakov
104c032b7b x86[_64]cpuid.pl: add low-level RDSEED.
(cherry picked from commit f4d456408d)
2014-02-14 17:25:14 +01:00
Andy Polyakov
b347341c75 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].
(cherry picked from commit 5599c7331b)
2014-02-14 17:17:39 +01:00
Dr. Stephen Henson
c00f8d697a Include self-signed flag in certificates by checking SKID/AKID as well
as issuer and subject names. Although this is an incompatible change
it should have little impact in pratice because self-issued certificates
that are not self-signed are rarely encountered.
(cherry picked from commit b1efb7161f)
2014-02-14 15:27:30 +00:00
Dr. Stephen Henson
b07e4f2f46 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.
(cherry picked from commit 385b348666)
2014-02-14 15:12:53 +00:00
Dr. Stephen Henson
ced6dc5cef Add cert_self_signed function to simplify verify
(from master)
2014-02-14 15:12:52 +00:00
Dr. Stephen Henson
bf2d129194 Simplify X509_STORE_CTX_get1_chain (from master). 2014-02-14 15:12:52 +00:00
Andy Polyakov
fcc6f699e3 evp/e_aes_cbc_hmac_sha*.c: improve cache locality.
(cherry picked from commit 9587429fa0)
2014-02-13 14:41:10 +01:00
Andy Polyakov
7078d93307 ghash-x86[_64].pl: ~15% improvement on Atom Silvermont
(other processors unaffected).
(cherry picked from commit 98e143f118)
2014-02-13 14:38:59 +01:00
Scott Deboy
038bec784e 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.

(cherry picked from commit 36086186a9)
Conflicts:
	Configure
	apps/s_client.c
	apps/s_server.c
	ssl/ssl.h
	ssl/ssl3.h
	ssl/ssltest.c
2014-02-08 16:12:15 -08:00
Dr. Stephen Henson
f407eec799 make update 2014-02-06 14:31:09 +00:00
Andy Polyakov
41cf2d2518 evp/e_aes_cbc_hmac_sha[1|256].c: add multi-block implementations [from master]. 2014-02-05 19:52:38 +01:00
Andy Polyakov
41c373fa3e [aesni|sha*]-mb-x86_64.pl: add multi-block assembly modules [from master]. 2014-02-05 14:33:44 +01:00
Ben Laurie
984a30423d Add extension free function. 2014-02-02 15:22:47 +00:00
Andy Polyakov
0693dd954e modes/asm/ghash-s390x.pl: +15% performance improvement on z10.
(cherry picked from commit d162584b11)
2014-02-02 00:10:41 +01:00
Andy Polyakov
9071b36d9a Add AES-NI+SHA256 stitch registrations (from master). 2014-02-02 00:05:02 +01:00
Andy Polyakov
eb6af20d2e dso/dso_win32.c: fix compiler warning.
(cherry picked from commit 0a2d5003df)
2014-02-01 23:32:19 +01:00
Andy Polyakov
8087969c5b crypto/cryptlib.c: remove stdio dependency (update from master). 2014-02-01 23:27:49 +01:00
Andy Polyakov
cb437c66d1 camellia/asm/cmll-x86_64.pl: fix symptomless bugs (update from master). 2014-02-01 23:14:33 +01:00
Ben Laurie
40b0d0765e Remove redundant accessor (you can do the same thing, and more, with
X509_ALGOR_[gs]et0()).
2014-02-01 22:03:40 +00:00
Andy Polyakov
2cc5142fb1 Improve WINCE support.
Submitted by: Pierre Delaage
(cherry picked from commit a006fef78e)

Resolved conflicts:

	crypto/bio/bss_dgram.c
	ssl/d1_lib.c
	util/pl/VC-32.pl
2014-02-01 22:48:56 +01:00
Andy Polyakov
d451ece4e7 b_sock.c: make getsockopt work in cases when optlen is 64-bit value.
(cherry picked from commit 80c42f3e0c)
2014-02-01 22:33:02 +01:00
Andy Polyakov
1121ba1b74 wp-mmx.pl: ~10% performance improvement.
(cherry picked from commit ae007d4d09)
2014-02-01 22:27:07 +01:00
Andy Polyakov
1fb039fde2 wp-x86_64.pl: ~10% performance improvement.
(cherry picked from commit 701d593f70)
2014-02-01 22:26:45 +01:00
Andy Polyakov
3073927e42 sha512-ia64.pl: 15-20% performance improvement.
(cherry picked from commit 46a2b3387a)
2014-02-01 22:21:57 +01:00
Andy Polyakov
b6c2029931 objxref.pl: improve portability.
(cherry picked from commit 71fa3bc5ec)
2014-02-01 22:17:36 +01:00
Adam Langley
45d010255f 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.
(cherry picked from commit 7753a3a684)
2014-02-01 22:01:46 +01:00
Andy Polyakov
7e569022c5 PPC assembly pack: ppc64-mont update from master. 2014-02-01 21:51:51 +01:00
Andy Polyakov
50f1b47c7f PPC assembly pack: jumbo update from master.
Add Vector Permutation AES and little-endian support.
2014-02-01 21:48:31 +01:00
Andy Polyakov
5572bc4e2f crypto/aes/asm/aesni-x86[_64].pl: jumbo update from master. 2014-02-01 21:27:46 +01:00
Andy Polyakov
729d334106 crypto/sha/asm/sha1-x86_64.pl: jumbo update from master. 2014-02-01 21:24:55 +01:00
Ben Laurie
cacdfcb247 Add more accessors. 2014-02-01 18:30:23 +00:00
Ben Laurie
519ad9b384 Add accessor for x509.cert_info. 2014-02-01 18:30:23 +00:00
Ben Laurie
7b2d785d20 Fix warning. 2014-01-29 17:57:32 +01:00
Dr. Stephen Henson
9614ed695d 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.
(cherry picked from commit e933f91f50)
2014-01-28 13:57:14 +00:00
Dr. Stephen Henson
5e7329d156 Compare encodings in X509_cmp as well as hash.
(cherry picked from commit ec492c8a5a)
2014-01-27 14:33:10 +00:00
Dr. Stephen Henson
3f4742b48c make update 2014-01-23 17:13:37 +00:00
Zoltan Arpadffy
e775891708 VMS fixes 2014-01-11 22:44:04 +00:00
Dr. Stephen Henson
50701af9d5 Fix bug in X509_V_FLAG_IGNORE_CRITICAL CRL handling.
(cherry picked from commit 8f4077ca69)
2014-01-09 22:53:50 +00:00
Andy Polyakov
392fd8f89c bn/asm/x86_64-mont5.pl: fix compilation error on Solaris.
(cherry picked from commit eedab5241e)
2014-01-09 13:47:53 +01:00
Andy Polyakov
e34140620e sha/asm/sha256-armv4.pl: add NEON code path.
(and shave off cycle even from integer-only code)
(cherry picked from commit ad0d2579cf)
2014-01-04 18:06:36 +01:00
Andy Polyakov
acd9121085 aesni-sha1-x86_64.pl: harmonize [Atom-specific optimizations] with master branch. 2014-01-04 17:42:13 +01:00
Andy Polyakov
ccbb8d5e95 sparcv9cap.c: omit random detection.
PR: 3202
(cherry picked from commit 926725b3d7)
2013-12-28 13:32:45 +01:00
Andy Polyakov
d7d7e7b038 ARM assembly pack: make it work with older toolchain.
(cherry picked from commit 2218c296b4)
2013-12-28 12:18:11 +01:00
Dr. Stephen Henson
ff64ab32ae Ignore NULL parameter in EVP_MD_CTX_destroy.
(cherry picked from commit a6c62f0c25)
2013-12-20 23:24:26 +00:00
Andy Polyakov
fc9c9e47f7 sha1-x86_64.pl: harmonize Win64 SE handlers for SIMD code pathes.
(and ensure stack alignment in the process)
(cherry picked from commit fc0503a25c)
2013-12-18 22:57:14 +01:00
Andy Polyakov
68e6ac4379 evp/e_[aes|camellia].c: fix typo in CBC subroutine.
It worked because it was never called.
(cherry picked from commit e9c80e04c1)
2013-12-18 22:56:24 +01:00
Andy Polyakov
e34b7e99fd 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.
(cherry picked from commit cdd1acd788)
2013-12-18 22:56:00 +01:00
Dr. Stephen Henson
3a0c71541b verify parameter enumeration functions
(cherry picked from commit 9b3d75706e)

Conflicts:

	crypto/x509/x509_vpm.c
2013-12-13 15:52:27 +00:00
Dr. Stephen Henson
adc6bd73e3 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.
2013-12-13 15:36:31 +00:00
Dr. Stephen Henson
53a8f8c26d 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.
2013-12-13 15:29:26 +00:00
Dr. Stephen Henson
8f68678989 Don't use rdrand engine as default unless explicitly requested. 2013-12-13 15:29:26 +00:00
Dr. Stephen Henson
57c4e42d75 Get FIPS checking logic right.
We need to lock when *not* in FIPS mode.
2013-12-10 12:52:27 +00:00
Andy Polyakov
422c8c36e5 ARM assembly pack: SHA update from master. 2013-12-09 23:53:42 +01:00
Andy Polyakov
b76310ba74 ARM assembly pack: AES update from master (including bit-sliced module). 2013-12-09 23:44:45 +01:00
Andy Polyakov
c012f6e576 bn/asm/armv4-mont.pl: add NEON code path.
(cherry picked from commit d1671f4f1a)
2013-12-09 22:46:29 +01:00
Andy Polyakov
cf6d55961c crypto/bn/asm/x86_64-mont*.pl: update from master.
Add MULX/AD*X code paths and optimize even original code path.
2013-12-09 22:40:53 +01:00
Andy Polyakov
3aa1b1ccbb x86_64-xlate.pl: fix jrcxz in nasm case.
(cherry picked from commit 667053a2f3)
2013-12-09 22:19:34 +01:00
Andy Polyakov
3dcae82fa9 x86_64-xlate.pl: minor update.
(cherry picked from commit 41965a84c4)
2013-12-09 21:53:41 +01:00
Dr. Stephen Henson
c43dc3dd77 Avoid multiple locks in FIPS mode.
PR: 3176.

In FIPS mode ssleay_rand_bytes is only used for PRNG seeding and is
performed in either a single threaded context (when the PRNG is first
initialised) or under a lock (reseeding). To avoid multiple locks disable
use of CRYPTO_LOCK_RAND in FIPS mode in ssleay_rand_bytes.
2013-12-08 13:21:02 +00:00
Andy Polyakov
e5eab8a199 bn/asm/x86_64-mont5.pl: comply with Win64 ABI.
PR: 3189
Submitted by: Oscar Ciurana
(cherry picked from commit c5d5f5bd0f)
2013-12-04 00:02:18 +01:00
Andy Polyakov
7bab6eb6f0 crypto/bn/asm/rsaz-x86_64.pl: make it work on Win64.
(cherry picked from commit 8bd7ca9996)
2013-12-03 22:30:00 +01:00
Andy Polyakov
87d9526d0c crypto/bn/rsaz*: fix licensing note.
rsaz_exp.c: harmonize line terminating;
asm/rsaz-*.pl: minor optimizations.
asm/rsaz-x86_64.pl: sync from master.
(cherry picked from commit 31ed9a2131)
2013-12-03 22:17:55 +01:00
Andy Polyakov
36982f056a bn/asm/rsaz-x86_64.pl: fix prototype.
(cherry picked from commit 6efef384c6)
2013-12-03 09:44:24 +01:00
Dr. Stephen Henson
bc35b8e435 make update 2013-12-01 23:09:44 +00:00
Dr. Stephen Henson
74184b6f21 RSAX no longer compiled. 2013-12-01 23:06:33 +00:00
Dr. Stephen Henson
1abfa78a8b Constify. 2013-11-14 21:00:40 +00:00
Andy Polyakov
0de70011ad srp/srp_grps.h: make it Compaq C-friendly.
PR: 3165
Submitted by: Daniel Richard G.
(cherry picked from commit 2df9ec01d5)
2013-11-12 22:19:40 +01:00
Andy Polyakov
220d1e5353 modes/asm/ghash-alpha.pl: update from HEAD.
PR: 3165
2013-11-12 21:59:01 +01:00
Andy Polyakov
ca44f72938 Make Makefiles OSF-make-friendly.
PR: 3165
(cherry picked from commit d1cf23ac86)
2013-11-12 21:53:39 +01:00
Dr. Stephen Henson
18f49508a5 Fix memory leak.
(cherry picked from commit 16bc45ba95)
2013-11-11 23:55:18 +00:00
Dr. Stephen Henson
a257865303 Fix for some platforms where "char" is unsigned.
(cherry picked from commit 08b433540416c5bc9a874ba0343e35ba490c65f1)
2013-11-11 22:18:07 +00:00
Dr. Stephen Henson
b5dde6bcc6 Check for missing components in RSA_check.
(cherry picked from commit 01be36ef70525e81fc358d2e559bdd0a0d9427a5)
2013-11-09 15:09:22 +00:00
Dr. Stephen Henson
233069f8db Add CMS_SignerInfo_get0_signature function.
Add function to retrieve the signature from a CMS_SignerInfo structure:
applications can then read or modify it.
(cherry picked from commit e8df6cec4c09b9a94c4c07abcf0402d31ec82cc1)
2013-11-09 15:09:22 +00:00
Andy Polyakov
3241496144 modes/asm/ghash-alpha.pl: make it work with older assembler.
PR: 3165
(cherry picked from commit d24d1d7daf)
2013-11-08 23:10:09 +01:00
Dr. Stephen Henson
a4947e4e06 Initialise context before using it. 2013-11-06 13:16:50 +00:00
Ben Laurie
262f1c524e PBKDF2 should be efficient. Contributed by Christian Heimes
<christian@python.org>.
2013-11-03 17:27:12 +00:00
Robin Seggelmann
f596e3c491 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.
2013-10-30 14:37:22 +00:00
Andy Polyakov
e41a49c625 PPC assembly pack: make new .size directives profiler-friendly.
Suggested by: Anton Blanchard
(cherry picked from commit 76c15d790e)
2013-10-15 23:42:18 +02:00
Dr. Stephen Henson
72550c52ed Fix warning.
(cherry picked from commit f6983769c1bcd6c3c6b6bbfbbc41848f6dccf127)
2013-10-15 11:33:58 +01:00
Dr. Stephen Henson
a9d0c56de1 Add test vectors from RFC7027
(cherry picked from commit 8ba2d4ed7f128e400693562efd35985068c45e4d)
2013-10-15 11:33:58 +01:00
Andy Polyakov
43ce9cdde9 PPC assembly pack: update from master branch.
Includes multiple updates: AES module to comply with more ABI
flavors, SHA512 for PPC32, .size directives.
2013-10-15 00:31:45 +02:00
Andy Polyakov
958608ca1c Initial aarch64 bits.
(cherry picked from commit 039081b809)
2013-10-13 19:24:22 +02:00
Andy Polyakov
1aecb23f5b 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.
(cherry picked from commit 0c2adb0a9b)
2013-10-13 13:18:21 +02:00
Andy Polyakov
9ed6fba2b4 aes/asm/bsaes-x86_64.pl: update from master.
Performance improvement and Windows-specific bugfix (PR#3139).
2013-10-12 21:47:54 +02:00
Andy Polyakov
df5c435c0b bn/asm/rsax-avx2.pl: minor optimization [for Decoded ICache].
(cherry picked from commit fa104be35e)
2013-10-10 23:09:54 +02:00
Ben Laurie
1ebaf97c44 Constification. 2013-10-07 12:44:40 +01:00
Andy Polyakov
c99028f252 evp/e_des3.c: fix typo with potential integer overflow on 32-bit platforms.
Submitted by: Yuriy Kaminskiy
(cherry picked from commit 524b00c0da)
2013-10-05 21:09:50 +01:00
Andy Polyakov
90d8c5862b perlasm/sparcv9_modes.pl: make it work even with seasoned perl.
PR: 3130
(cherry picked from commit 6b2cae0c16)
2013-10-05 21:09:39 +01:00
Ben Laurie
7a216dfee5 Constification. 2013-10-01 14:51:04 +01:00
Dr. Stephen Henson
3e792793f6 add cofactor ECDH support from fips branch
(cherry picked from commit a3a2e3a43d)
2013-10-01 14:01:18 +01:00
Ben Laurie
ac5cb33356 Fix compile errors.
(cherry picked from commit a0aaa5660a)
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
aaf74259ec CMS RFC2631 X9.42 DH enveloped data support.
(cherry picked from commit bd59f2b91d)

Conflicts:

	crypto/dh/dh.h
	crypto/dh/dh_err.c

Sync error codes with 1.0.1.
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
ecf9ceb90d Minor optimisation to KDF algorithm.
Don't need to use temporary buffer if remaining length equals digest length.
(cherry picked from commit 3f6b6f0b8c)
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
5c4ff8ad37 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.
(cherry picked from commit dc1ce3bc64)
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
dc427fc8e2 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.
(cherry picked from commit 41b920ef01)
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
e1e6c4dae7 Algorithm parameter support.
Check and set AlgorithmIdenfier parameters for key wrap algorithms.
Currently these just set parameters to NULL.
(cherry picked from commit e61f5d55bc)
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
1747fd1cc6 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.
(cherry picked from commit 88e20b8584)
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
a119822b90 Add support for X9.62 KDF.
Add X9.62 KDF to EC EVP_PKEY_METHOD.
(cherry picked from commit 25af7a5dbc)
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
8c798690ce 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.
(cherry picked from commit 17c2764d2e)
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
af7d6b936b 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.
(cherry picked from commit 0574cadf85)

Also sync error codes with OpenSSL 1.0.1 and add new ones.
2013-10-01 14:01:18 +01:00
Dr. Stephen Henson
a64b8786b5 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.
(cherry picked from commit 211a14f627)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
25f93585a7 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.
(cherry picked from commit 271fef0ef3)

Conflicts:

	CHANGES
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
0d5a49e150 Add FIPS RSA error code.
Add some RSA error codes used by the FIPS module.
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
5c49a98c5e Set CMS EnvelopedData version correctly.
(cherry picked from commit ff7b6ce9db)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
869772ff08 Initialise CMS signature buffer length properly.
(cherry picked from commit e0f7cfda68)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
f2edf3181e 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.
(cherry picked from commit e365352d6a)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
d6dc5c506a Add control to retrieve signature MD.
(cherry picked from commit 810639536c)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
eebd5e5dd7 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.
(cherry picked from commit 6af440ced4)

Conflicts:

	crypto/objects/obj_dat.h
	crypto/objects/obj_mac.num
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
868b266451 Add new OID to pSpecified from PKCS#1
(cherry picked from commit e423c360fd)

Conflicts:

	crypto/objects/obj_dat.h
	crypto/objects/obj_mac.num
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
3fa23ff0f1 Add FIPS 186-2 DSA parameter generation algorithm.
Backport support for FIPS 186-2 DSA parameter generation from
HEAD. Redirect to FIPS in FIPS mode and workaround prototype error.
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
c275fb091e Extend DH parameter generation support.
Add support for DH parameter generation using DSA methods including
FIPS 186-3.
(cherry picked from commit 3909087801)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
90c341c601 Enhance DH dup functions.
Make DHparams_dup work properly with X9.42 DH parameters.
(cherry picked from commit d3cc91eee2)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
52d0e1ca4e If present print j, seed and counter values for DH
(cherry picked from commit c9577ab5ea)

Conflicts:

	crypto/dh/dh_ameth.c
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
c6f3386577 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
(cherry picked from commit 97cf1f6c28)

Conflicts:

	CHANGES
2013-10-01 14:01:17 +01:00
Andy Polyakov
cf65a07256 evptests.txt: add XTS test vectors
(cherry picked from commit c9a8e3d1c7)
2013-10-01 14:01:17 +01:00
Andy Polyakov
051dc9db2b evptests.txt: additional GCM test vectors.
(cherry picked from commit ca303d333b)
2013-10-01 14:01:17 +01:00
Ben Laurie
93a886b45a Fix warnings.
(cherry picked from commit 282a480a35)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
ec19082ecc GCM and CCM test support
Add code to support GCM an CCM modes in evp_test. On encrypt this
will compare the expected ciphertext and tag. On decrypt it will
compare the expected plaintext: tag comparison is done internally.

Add a simple CCM test case and convert all tests from crypto/modes/gcm128.c
(cherry picked from commit 15652f9825)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
0eff7c7c88 Add CCM ciphers to tables.
(cherry picked from commit 95248de327)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
6c4b3514d7 New SP 800-56A compliant version of DH_compute_key().
(cherry picked from commit bc91494e06)
2013-10-01 14:01:17 +01:00
Dr. Stephen Henson
d84cca7447 Typo.
(cherry picked from commit 415ece7301)
2013-10-01 14:01:16 +01:00
Dr. Stephen Henson
b49df9502e Disable Dual EC DRBG.
Return an error if an attempt is made to enable the Dual EC DRBG: it
is not used by default.
(cherry picked from commit a4870de5aa)
2013-09-22 18:25:58 +01:00
Dr. Stephen Henson
7560f63909 Fix warning. 2013-09-18 15:10:22 +01:00
Dr. Stephen Henson
7c23127fde Add functions to set ECDSA_METHOD structure.
Add various functions to allocate and set the fields of an ECDSA_METHOD
structure.
(cherry picked from commit 94c2f77a62)
2013-09-18 01:23:40 +01:00
Bodo Moeller
485d7d5904 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

(cherry picked from commit 312a46791ab465cfa3bf26764361faed0e5df014)
2013-09-16 14:50:48 +02:00
Andy Polyakov
d75e384ff8 Extend OPENSSL_ia32cap_P (backport from HEAD). 2013-09-15 22:13:54 +02:00
Andy Polyakov
c340c7a88c crypto/armcap.c: fix typo in rdtsc subroutine.
PR: 3125
Submitted by: Kyle McMartin
(cherry picked from commit 8e52a9063a)
2013-09-15 22:10:49 +02:00
Ben Laurie
0338648426 Constification. 2013-09-10 17:58:44 +01:00
Andy Polyakov
c7dc404188 crypto/modes/asm/aesni-gcm-x86_64.pl: minor optimization.
Avoid occasional up to 8% performance drops.
(cherry picked from commit 7a1a12232a)
2013-09-09 21:46:02 +02:00
Andy Polyakov
08853158b6 crypto/bn/asm/x86_64-mont.pl: minor optimization.
(cherry picked from commit 72a158703b)
2013-09-09 21:42:48 +02:00
Andy Polyakov
74e0187663 Revert "x86cpuid.pl: fix extended feature flags detection."
This reverts commit 514f1a7835.
2013-09-09 21:35:15 +02:00
Dr. Stephen Henson
5117d50b7e 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.
(cherry picked from commit 52073b7675)
2013-09-08 21:25:10 +01:00
Dr. Stephen Henson
904348a492 Time difference functions.
Backport of ASN1_TIME_diff and OPENSSL_gmtime_diff functions from master
branch.
2013-08-19 21:55:07 +01:00
Dr. Stephen Henson
5b430cfc44 Make no-ec compilation work.
(cherry picked from commit 14536c8c9c)
2013-08-19 14:13:38 +01:00
Dr. Stephen Henson
71c34b7f2d 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.
(cherry picked from commit 4b26645c1a)
2013-08-06 16:08:04 +01:00
Kaspar Brand
b0cfaf58ad 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.
(cherry picked from commit 5ae8d6bcba)
2013-08-06 16:04:52 +01:00
Andy Polyakov
9dc07f04c3 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.
(cherry picked from commit 044f63086051d7542fa9485a1432498c39c4d8fa)
2013-08-03 17:09:37 +02:00
Andy Polyakov
f15c16200b crypto/bn/asm/rsax-x86_64.pl: make it work on Darwin.
(cherry picked from commit fd8ad019e1)
2013-08-03 16:30:40 +02:00
Andy Polyakov
4e09add6f8 crypto/sha/asm/sha*-x86_64.pl: comply with Win64 ABI.
(cherry picked from commit 006784378d)
2013-07-31 23:52:21 +02:00
Andy Polyakov
82ae22ef4d bn/asm/rsaz-avx2.pl: Windows-specific fix.
(cherry picked from commit 5c57c69f9e)
2013-07-12 19:01:23 +02:00
Ben Laurie
b56bae5126 s/rsaz_eligible/rsaz_avx2_eligible/.
(cherry picked from commit 852f837f5e)
2013-07-12 18:53:05 +02:00
Andy Polyakov
2d3f31e0a1 sha512-586.pl: fix typo.
Submitted by: Gisle Vanem
(cherry picked from commit 241fba4ea9)
2013-07-10 10:02:34 +02:00
Andy Polyakov
ae74191e38 Remove RSAX engine, superseded by RSAZ module.
(cherry picked from commit f5b132d652)

Conflicts [resloved]:

	Configure
2013-07-05 22:16:10 +02:00
Andy Polyakov
ab8233ab81 Take RSAZ modules into build loop, add glue and engage.
RT: 2582, 2850
(cherry picked from commit ca48ace5c5)

Conflicts:

	Configure
2013-07-05 21:53:05 +02:00
Andy Polyakov
d5572bdc64 Add RSAZ assembly modules.
RT: 2582, 2850
(cherry picked from commit 0b4bb91db6)
2013-07-05 21:49:19 +02:00
Andy Polyakov
e3990db59c bn/asm/x86_86-mont.pl: optimize reduction for Intel Core family.
(cherry picked from commit 26e43b48a3)
2013-07-05 21:15:16 +02:00
Andy Polyakov
87d90528ac bn/bn_exp.c: harmonize.
(cherry picked from commit cbce8c4644)
2013-07-05 21:01:51 +02:00
Andy Polyakov
8508a80998 bn/bn_exp.c: Solaris-specific fix, T4 MONTMUL relies on alloca.
(cherry picked from commit b74ce8d948)
2013-06-30 23:14:31 +02:00
Andy Polyakov
7850a8bc04 x86_64-xlate.pl: Windows fixes.
(cherry picked from commit a9d14832fd)
2013-06-30 23:14:19 +02:00
Andy Polyakov
fccec89084 aesni-sha256-x86_64.pl: fix typo in Windows SEH.
(cherry picked from commit 42386fdb62)
2013-06-30 23:14:04 +02:00
Andy Polyakov
6c7fa27404 PA-RISC assembler pack: switch to bve in 64-bit builds.
PR: 3074
(cherry picked from commit 02450ec69d)
2013-06-30 23:13:23 +02:00
Andy Polyakov
e7f9c08ab8 SPARC T4 DES support: fix typo.
(cherry picked from commit 8ee3c7e676)
2013-06-18 11:07:24 +02:00
Andy Polyakov
03c8441b14 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;
(cherry picked from commit 4ddacd9921)
2013-06-18 11:07:16 +02:00
Ben Laurie
e887c4187e Backport single makefile from master. 2013-06-13 15:09:48 +01:00
Ben Laurie
933aee6199 Wrong include path. 2013-06-13 13:26:22 +01:00
Andy Polyakov
f00962aaf3 aesni-sha1-x86_64.pl: update performance data.
(cherry picked from commit 3b848d3401)
2013-06-10 22:52:06 +02:00
Andy Polyakov
3eccd2e53a aesni-sha256-x86_64.pl: harmonize with latest sha512-x86_64.pl.
(cherry picked from commit 42b9a4177b)
2013-06-10 22:51:55 +02:00
Andy Polyakov
fcd0e61c24 sha1-x86_64.pl: add AVX2+BMI code path.
(cherry picked from commit cd8d7335af)
2013-06-10 22:51:47 +02:00
Andy Polyakov
e7a02b24c1 sha512-x86_64.pl: upcoming-Atom-specific optimization.
(cherry picked from commit c7f690c243)
2013-06-10 22:51:31 +02:00
Andy Polyakov
cbe6bb54e6 sha[256|512]-586.pl: add more SIMD code paths.
(cherry picked from commit 32213d8d77)
2013-06-10 22:50:32 +02:00
Andy Polyakov
23966faca4 ghash-x86_64.pl: add Haswell performance data.
(cherry picked from commit b42759158d)
2013-06-10 22:50:23 +02:00
Andy Polyakov
514f1a7835 x86cpuid.pl: fix extended feature flags detection.
(cherry picked from commit 1bc0b68d7b)
2013-06-10 22:49:35 +02:00
Dr. Stephen Henson
af908bc48b Don't use RC2 with PKCS#12 files in FIPS mode.
(cherry picked from commit cdb6c48445)
2013-06-05 15:06:02 +01:00
Dr. Stephen Henson
233ebcb543 Fix PSS signature printing.
Fix PSS signature printing: consistently use 0x prefix for hex values for
padding length and trailer fields.
(cherry picked from commit deb24ad53147f5a8dd63416224a5edd7bbc0e74a)
2013-06-05 15:06:02 +01:00
Dr. Stephen Henson
da0c007254 Reencode with X509_CRL_ctx_sign too.
(cherry picked from commit 96940f4f2d0300c033379a87db0ff19e598c6264)
2013-06-05 15:06:02 +01:00
Ben Laurie
e3120586fb Missing prototypes. 2013-06-04 15:14:18 +01:00
Ben Laurie
3941aa12f1 Remove added ;. 2013-06-04 15:05:18 +01:00
Andy Polyakov
0c10cf0ad6 crypto/modes: even more strict aliasing fixes [and fix bug in cbc128.c from
previous cbc128.c commit].
2013-06-04 14:31:23 +01:00
Andy Polyakov
62874a5a69 cbc128.c: fix strict aliasing warning. 2013-06-04 14:30:49 +01:00
Andy Polyakov
8c1f9c56fd crypto/bn/bn_exp.c: SPARC portability fix.
(cherry picked from commit b69437e1e5)
2013-06-01 09:59:54 +02:00
Andy Polyakov
75063c1527 aesni-sha1-x86_64.pl: Atom-specific optimization.
(cherry picked from commit 4df2280b4f)
2013-05-25 19:09:47 +02:00
Andy Polyakov
5de583aa91 sha512-x86_64.pl: +16% optimization for Atom.
(and pending AVX2 changes).
(cherry picked from commit 504bbcf3cd)
2013-05-25 19:04:48 +02:00
Andy Polyakov
a0675d8149 vpaes-x86[_64].pl: minor Atom-specific optimization.
(cherry picked from commit 988d11b641)
2013-05-25 18:58:54 +02:00
Andy Polyakov
a7e9ed95ec evp/e_aes.c: engage SPARC T4 AES support [from master]. 2013-05-20 16:36:53 +02:00
Andy Polyakov
615d0edf1f evp/e_aes.c: engage AES-NI GCM stitch. 2013-05-20 16:30:21 +02:00
Andy Polyakov
e775755dec evp/evp_err.c: update from master. 2013-05-20 16:16:34 +02:00
Andy Polyakov
a1bf7de5a7 evp/e_camellia.c: engage SPARC T5 Camellia support [from master]. 2013-05-20 16:09:13 +02:00
Andy Polyakov
047c02e8db evp/e_des[3].c: engage SPARC T4 DES support. 2013-05-20 16:08:39 +02:00
Andy Polyakov
c92989d2b7 Add BN support for SPARC VIS3 and T4 [from master]. 2013-05-20 15:48:13 +02:00
Andy Polyakov
039e7875ff md5_locl.h: enable assembly support on SPARC [from master]. 2013-05-20 00:33:09 +02:00
Andy Polyakov
48b7b96bd0 sparcv9cap.c: update from master. 2013-05-20 00:16:18 +02:00
Andy Polyakov
747b7a636a Add MD5 SPARC T4 code from master. 2013-05-20 00:08:15 +02:00
Andy Polyakov
635f56fabd Add SHA SPARC T4 code from master. 2013-05-20 00:04:38 +02:00
Andy Polyakov
c617bc0054 Add Camellia SPARC T4 module from master. 2013-05-19 23:58:54 +02:00
Andy Polyakov
d215724753 Add AES SPARC T4 module from master. 2013-05-19 23:54:34 +02:00
Andy Polyakov
9c1ee1bed5 Add DES SPARC T4 module from master. 2013-05-19 23:51:22 +02:00
Andy Polyakov
14ef63c15e Add perlasm/sparcv9_modes.pl from master. 2013-05-19 23:47:38 +02:00
Andy Polyakov
5a456140c1 des_enc.m4: update from master. 2013-05-19 23:43:12 +02:00
Andy Polyakov
1ff546737b evp/Makefile: fix typo. 2013-05-19 23:11:03 +02:00
Andy Polyakov
56f0b25754 Add EVP glue to AES-NI SHA256 stich [from master]. 2013-05-19 22:35:37 +02:00
Andy Polyakov
b0f78dc018 Add AES-NI SHA256 stitch and take it into build loop [from master]. 2013-05-19 22:23:18 +02:00
Andy Polyakov
1f2d194acf aesni-sha1-x86_64.pl: update from master. 2013-05-19 22:18:52 +02:00
Andy Polyakov
aacfb2a2c6 Add AES-NI GCM stich and take it into build loop [from master]. 2013-05-19 22:06:18 +02:00
Andy Polyakov
0ba304dd31 gcm128.c: update from master (add AVX and VIS3 support). 2013-05-19 21:55:30 +02:00
Andy Polyakov
8eb2da5fbb ghash-sparcv9.pl: update from master. 2013-05-19 21:53:14 +02:00
Andy Polyakov
d1896e8ccd ghash-x86_64.pl: update from master. 2013-05-19 21:51:19 +02:00
Andy Polyakov
0edcb7a556 ghash-x86.pl: update from master. 2013-05-19 21:46:03 +02:00
Andy Polyakov
ecc2c5d81a sha512-x86_64.pl: update from master. 2013-05-19 21:36:54 +02:00
Andy Polyakov
441dec8e9f sha512-586.pl: update from master. 2013-05-19 21:36:38 +02:00
Andy Polyakov
4f566c360b sha256-598.pl: update from master. 2013-05-19 21:35:55 +02:00
Andy Polyakov
e10cd58090 sha1-x86_64.pl: update from master. 2013-05-19 21:33:04 +02:00
Andy Polyakov
5c8ae6d93e sha1-586.pl: update from master. 2013-05-19 21:32:29 +02:00
Andy Polyakov
e72f7677bf crypto/perlasm: update from master. 2013-05-19 21:27:59 +02:00
Dr. Stephen Henson
8659dc73f4 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.
(cherry picked from commit c6d8adb8a4)
2013-05-02 12:24:33 +01:00
Andy Polyakov
07464787a8 crypto/modes/modes_lcl.h: let STRICT_ALIGNMENT be on ARMv7.
While ARMv7 in general is capable of unaligned access, not all instructions
actually are. And trouble is that compiler doesn't seem to differentiate
those capable and incapable of unaligned access. Side effect is that kernel
goes into endless loop retrying same instruction triggering unaligned trap.
Problem was observed in xts128.c and ccm128.c modules. It's possible to
resolve it by using (volatile u32*) casts, but letting STRICT_ALIGNMENT
be feels more appropriate.
(cherry picked from commit 3bdd80521a)
2013-04-13 21:19:16 +02:00
Dr. Stephen Henson
a8cc9f1873 Typo.
(cherry picked from commit 0ded2a0689)
2013-03-31 17:43:42 +01:00
Matt Caswell
4e5b9645e8 Make binary curve ASN.1 work in FIPS mode.
Don't check for binary curves by checking methods: the values will
be different in FIPS mode as they are redirected to the validated module
version.
(cherry picked from commit 94782e0e9c)
2013-03-26 16:58:29 +00:00
Dr. Stephen Henson
04347839ea enhance EC method to support setting curve type when generating keys and add parameter encoding option
(cherry picked from commit 24edfa9df9)
2013-03-20 15:54:05 +00:00
Andy Polyakov
2a1ab7b438 x86cpuid.pl: make it work with older CPUs.
PR: 3005
(cherry picked from commit 5702e965d7)
2013-03-18 19:50:09 +01:00
Andy Polyakov
dd1e4fbcc0 e_aes_cbc_hmac_sha1.c: fix rare bad record mac on AES-NI plaforms.
PR: 3002
(cherry picked from commit 5c60046553)
2013-03-18 19:35:20 +01:00
Dr. Stephen Henson
d7e429b91d Encode INTEGER correctly.
If an ASN1_INTEGER structure is allocated but not explicitly set encode
it as zero: don't generate an invalid zero length INTEGER.
(cherry picked from commit 1643edc63c)
2013-03-18 14:22:01 +00:00
Andy Polyakov
2d9be79407 x86_64-gf2m.pl: fix typo.
(cherry picked from commit 342dbbbe4e)
2013-03-01 22:37:53 +01:00
Andy Polyakov
2e4b7eede3 x86_64-gf2m.pl: add missing Windows build fix for #2963.
PR: 3004
(cherry picked from commit 7c43601d44)
2013-03-01 21:57:25 +01:00
Dr. Stephen Henson
e1dee801b9 Add function CMS_RecipientInfo_encrypt
Add CMS_RecipientInfo_encrypt: this function encrypts an existing content
encryption key to match the key in the RecipientInfo structure: this is
useful if a new recpient is added to and existing enveloped data structure.

Add documentation.
(cherry picked from commit e1f1d28f34)
2013-02-26 17:06:08 +00:00
Andy Polyakov
b9eef98883 bn_nist.c: work around clang 3.0 bug.
(cherry picked from commit 750398acd8)
2013-02-16 11:37:38 +01:00
Andy Polyakov
a3e66779d3 sparccpuid.S: work around emulator bug on T1.
(cherry picked from commit 3caeef94bd)
2013-02-11 10:41:22 +01:00
Andy Polyakov
82425f2c28 e_aes_cbc_hmac_sha1.c: align calculated MAC at cache line.
It also ensures that valgring is happy.
(cherry picked from commit 2141e6f30b)
2013-02-08 10:35:02 +01:00
Andy Polyakov
af010edd55 e_aes_cbc_hmac_sha1.c: cleanse temporary copy of HMAC secret.
(cherry picked from commit 529d27ea47)
2013-02-06 13:56:15 +00:00
Andy Polyakov
5966f4d973 e_aes_cbc_hmac_sha1.c: address the CBC decrypt timing issues.
Address CBC decrypt timing issues and reenable the AESNI+SHA1 stitch.
(cherry picked from commit 125093b59f)
2013-02-06 13:56:15 +00:00
Ben Laurie
fb0a59cc58 Make CBC decoding constant time.
This patch makes the decoding of SSLv3 and TLS CBC records constant
time. Without this, a timing side-channel can be used to build a padding
oracle and mount Vaudenay's attack.

This patch also disables the stitched AESNI+SHA mode pending a similar
fix to that code.

In order to be easy to backport, this change is implemented in ssl/,
rather than as a generic AEAD mode. In the future this should be changed
around so that HMAC isn't in ssl/, but crypto/ as FIPS expects.
(cherry picked from commit e130841bcc)
2013-02-06 13:56:12 +00:00
Ben Laurie
f5cd3561ba Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cherry picked from commit 2ee798880a)
2013-02-06 13:56:12 +00:00
Andy Polyakov
2a713eadc3 bn_word.c: fix overflow bug in BN_add_word.
(cherry picked from commit 134c00659a)
2013-02-02 22:37:35 +01:00
Andy Polyakov
2e7900b624 x86_64 assembly pack: keep making Windows build more robust.
PR: 2963 and a number of others
(cherry picked from commit 4568182a8b)
2013-02-02 19:56:43 +01:00
Dr. Stephen Henson
1db4354b53 Don't include comp.h in cmd_cd.c if OPENSSL_NO_COMP set 2013-01-23 01:11:05 +00:00
Andy Polyakov
3f233a1e77 x86_64 assembly pack: make Windows build more robust [from master].
PR: 2963 and a number of others
2013-01-22 22:51:29 +01:00
Andy Polyakov
b17ffba915 bn/asm/mips.pl: hardwire local call to bn_div_words. 2013-01-22 21:16:02 +01:00
Dr. Stephen Henson
3619e34f50 Don't include comp.h if no-comp set. 2013-01-20 01:10:03 +00:00