Commit graph

11432 commits

Author SHA1 Message Date
Dr. Stephen Henson
173e72e64c DTLS revision.
Revise DTLS code. There was a *lot* of code duplication in the
DTLS code that generates records. This makes it harder to maintain and
sometimes a TLS update is omitted by accident from the DTLS code.

Specifically almost all of the record generation functions have code like
this:

some_pointer = buffer + HANDSHAKE_HEADER_LENGTH;
... Record creation stuff ...
set_handshake_header(ssl, SSL_MT_SOMETHING, message_len);

...

write_handshake_message(ssl);

Where the "Record creation stuff" is identical between SSL/TLS and DTLS or
in some cases has very minor differences.

By adding a few fields to SSL3_ENC to include the header length, some flags
and function pointers for handshake header setting and handshake writing the
code can cope with both cases.

Note: although this passes "make test" and some simple DTLS tests there may
be some minor differences in the DTLS code that have to be accounted for.
2013-03-18 14:36:43 +00:00
Michael Tuexen
80ccc66d7e Avoid unnecessary fragmentation. 2013-03-18 14:30:38 +00:00
Dr. Stephen Henson
5de18d5d0d 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:08 +00:00
Dr. Stephen Henson
e24fd37cda Typo.
(cherry picked from commit 1546fb780b)
2013-03-18 14:00:39 +00:00
Dr. Stephen Henson
890f2f8b92 DTLS trace support.
Add DTLS record header parsing, different client hello format and add
HelloVerifyRequest message type.

Add code to d1_pkt.c to send message headers to the message callback.
2013-03-11 13:05:07 +00:00
Andy Polyakov
ca303d333b evptests.txt: additional GCM test vectors. 2013-03-06 19:24:05 +01:00
Dr. Stephen Henson
15652f9825 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
2013-03-06 16:15:42 +00:00
Dr. Stephen Henson
95248de327 Add CCM ciphers to tables. 2013-03-06 16:15:42 +00:00
Andy Polyakov
28997596f2 ghash-x86_64.pl: fix length handling bug.
Thanks to Shay Gueron & Vlad Krasnov for report.
2013-03-06 10:42:21 +01:00
Dr. Stephen Henson
bcb157f07f typo 2013-03-05 21:20:00 +00:00
Dr. Stephen Henson
e942c15451 Initial CCM code.
Simple example of CCM code use: translated from the FIPS self tests.
2013-03-05 18:30:53 +00:00
Ben Laurie
897dfd4eaa Use CFLAG for LFLAGS instead of the nonexistent CFLAGS. 2013-03-05 05:55:19 +00:00
Ben Laurie
c621fe6685 Ignore mk1mf.pl output directories. 2013-03-05 04:29:41 +00:00
Ben Laurie
feb4c32786 Remove unused variable. 2013-03-04 22:48:38 +00:00
Ben Laurie
63d86d067a Actually comment out the cpuid asm! 2013-03-04 20:31:59 +00:00
Ben Laurie
35ced1f705 Merge branch 'master' of openssl.net:openssl
Conflicts:
	util/mk1mf.pl
2013-03-04 20:26:17 +00:00
Dr. Stephen Henson
71a16946dc Fix WIN32 build.
Make assembly language handling conditional on the "copy" platform
as Windows does its own thing here.
2013-03-04 19:21:32 +00:00
Andy Polyakov
5702e965d7 x86cpuid.pl: make it work with older CPUs.
PR: 3005
2013-03-04 20:05:04 +01:00
Ben Laurie
654d227a86 Only copy headers if they've changed. 2013-03-04 16:56:18 +00:00
Ben Laurie
2f297fce73 Don't make CPUID stuff twice. 2013-03-04 16:10:47 +00:00
Ben Laurie
656829b78f Handle assembler files. 2013-03-04 14:31:19 +00:00
Ben Laurie
95dd301861 Missing MINFO generation. 2013-03-04 14:31:18 +00:00
Ben Laurie
4e2322892b Override local vars for MINFO build. 2013-03-04 14:31:18 +00:00
Ben Laurie
7b0d591dc3 Allow variables to be overridden on the command line. 2013-03-04 14:31:18 +00:00
Ben Laurie
7bbb8c5620 Take the first definition of a variable. 2013-03-04 14:31:18 +00:00
Ben Laurie
d0aeeee176 Use "copy" instead of "auto". 2013-03-04 14:31:18 +00:00
Ben Laurie
afc1b1eab7 Remove pointless diagnostic. 2013-03-04 14:31:18 +00:00
Ben Laurie
5108690f19 Preserve the C compiler. 2013-03-04 14:31:18 +00:00
Ben Laurie
3c76bcded0 Inherit CFLAGS when plaform is "auto". 2013-03-04 14:31:18 +00:00
Ben Laurie
ea5003bd1e Include correctly. 2013-03-04 14:31:18 +00:00
Ben Laurie
45ba475b81 Remove empty command. 2013-03-04 14:31:18 +00:00
Ben Laurie
7067cbc8b5 Spelling. 2013-03-04 14:31:18 +00:00
Ben Laurie
f990fae812 Add dependency on destination directory. 2013-03-04 14:31:18 +00:00
Ben Laurie
a32d9eaf07 Spelling. 2013-03-04 14:31:18 +00:00
Ben Laurie
f953c2d039 Add reallyclean target. 2013-03-04 14:31:18 +00:00
Andy Polyakov
342dbbbe4e x86_64-gf2m.pl: fix typo. 2013-03-01 22:36:36 +01:00
Andy Polyakov
7c43601d44 x86_64-gf2m.pl: add missing Windows build fix for #2963.
PR: 3004
2013-03-01 21:43:10 +01:00
Ben Laurie
1aaa04191f Ignore MINFO. 2013-02-26 21:51:13 +00:00
Ben Laurie
e46a281de5 Missing files target. 2013-02-26 21:51:13 +00:00
Dr. Stephen Henson
e1f1d28f34 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.
2013-02-26 16:59:56 +00:00
Dr. Stephen Henson
388aff08dc Fix error codes. 2013-02-26 16:46:58 +00:00
Dr. Stephen Henson
3646578ae7 Demo code for SSL_CONF API
Two example programs one for command line argument processing and
one for configuration file processing.
2013-02-26 16:33:05 +00:00
Dr. Stephen Henson
4365e4aad9 Update SSL_CONF docs.
Fix some typos and update version number first added: it has now been
backported to OpenSSL 1.0.2.
2013-02-26 15:29:11 +00:00
Ben Laurie
0850f11855 Fix ignored return value warnings.
Not sure why I am getting these now and not before.
2013-02-21 18:30:04 +00:00
Ben Laurie
975dfb1c6c make depend. 2013-02-21 18:17:38 +00:00
Nick Alcock
5cc2707742 Fix POD errors to stop make install_docs dying with pod2man 2.5.0+
podlators 2.5.0 has switched to dying on POD syntax errors. This means
that a bunch of long-standing erroneous POD in the openssl documentation
now leads to fatal errors from pod2man, halting installation.

Unfortunately POD constraints mean that you have to sort numeric lists
in ascending order if they start with 1: you cannot do 1, 0, 2 even if
you want 1 to appear first. I've reshuffled such (alas, I wish there
were a better way but I don't know of one).
2013-02-15 19:36:26 +01:00
Andy Polyakov
47edeb9f59 sha256-586.pl: code refresh. 2013-02-15 11:23:06 +01:00
Andy Polyakov
35c77b7303 sha1-586.pl: code refresh. 2013-02-14 22:20:17 +01:00
Andy Polyakov
273a808180 ghash-x86[_64].pl: code refresh. 2013-02-14 16:28:09 +01:00
Andy Polyakov
7c9e81be40 [aesni-]sha1-x86_64.pl: code refresh. 2013-02-14 16:14:02 +01:00