Skip to content

Commit 1c50422

Browse files
committed
Merge from CDK: Upgrade YaSSL to 2.4.2.
1 parent 485019a commit 1c50422

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1134
-795
lines changed

cdk/extra/yassl/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ INCLUDE(install_macros)
1717
INCLUDE(msvc)
1818

1919
INCLUDE_DIRECTORIES(
20-
${CMAKE_BINARY_DIR}/include
21-
${CMAKE_CURRENT_SOURCE_DIR}/include
22-
${CMAKE_CURRENT_SOURCE_DIR}/taocrypt/include
23-
${CMAKE_CURRENT_SOURCE_DIR}/taocrypt/mySTL)
20+
${CMAKE_CURRENT_SOURCE_DIR}/include
21+
${CMAKE_CURRENT_SOURCE_DIR}/taocrypt/include
22+
${CMAKE_CURRENT_SOURCE_DIR}/taocrypt/mySTL)
2423

2524
ADD_DEFINITIONS(${SSL_DEFINES})
2625

@@ -49,8 +48,8 @@ CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
4948
ADD_DEFINITIONS(-DSIZEOF_LONG=${SIZEOF_LONG} -DSIZEOF_LONG_LONG=${SIZEOF_LONG_LONG})
5049

5150
SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
52-
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
53-
src/yassl_imp.cpp src/yassl_int.cpp)
51+
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
52+
src/yassl_imp.cpp src/yassl_int.cpp)
5453

5554
ADD_LIBRARY(yassl STATIC ${YASSL_SOURCES})
5655
#RESTRICT_SYMBOL_EXPORTS(yassl)
@@ -68,4 +67,4 @@ ENDIF()
6867
# if(NOT WINDOWS_RUNTIME_MD)
6968
# CHANGE_MD_2_MT()
7069
# endif()
71-
#endif()
70+
#endif()

cdk/extra/yassl/README

Lines changed: 81 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
yaSSL takes a different approach to certificate verification than OpenSSL does.
44
The default policy for the client is to verify the server, this means that if
5-
you don't load CAs to verify the server you'll get a connect error, unable to
5+
you don't load CAs to verify the server you'll get a connect error, unable to
66
verify. It you want to mimic OpenSSL behavior of not verifying the server and
77
reducing security you can do this by calling:
88

@@ -12,6 +12,66 @@ before calling SSL_new();
1212

1313
*** end Note ***
1414

15+
yaSSL Release notes, version 2.4.2 (9/22/2016)
16+
This release of yaSSL fixes a medium security vulnerability. A fix for
17+
potential AES side channel leaks is included that a local user monitoring
18+
the same CPU core cache could exploit. VM users, hyper-threading users,
19+
and users where potential attackers have access to the CPU cache will need
20+
to update if they utilize AES.
21+
22+
DSA padding fixes for unusual sizes is included as well. Users with DSA
23+
certficiates should update.
24+
25+
yaSSL Release notes, version 2.4.0 (5/20/2016)
26+
This release of yaSSL fixes the OpenSSL compatibility function
27+
SSL_CTX_load_verify_locations() when using the path directory to allow
28+
unlimited path sizes. Minor Windows build fixes are included.
29+
No high level security fixes in this version but we always recommend
30+
updating.
31+
32+
33+
yaSSL Release notes, version 2.3.9b (2/03/2016)
34+
This release of yaSSL fixes the OpenSSL compatibility function
35+
X509_NAME_get_index_by_NID() to use the actual index of the common name
36+
instead of searching on the format prefix. Thanks for the report from
37+
[email protected] . Anyone using this function should update.
38+
39+
yaSSL Release notes, version 2.3.9 (12/01/2015)
40+
This release of yaSSL fixes two client side Diffie-Hellman problems.
41+
yaSSL was only handling the cases of zero or one leading zeros for the key
42+
agreement instead of potentially any number. This caused about 1 in 50,000
43+
connections to fail when using DHE cipher suites. The second problem was
44+
the case where a server would send a public value shorter than the prime
45+
value, causing about 1 in 128 client connections to fail, and also
46+
caused the yaSSL client to read off the end of memory. All client side
47+
DHE cipher suite users should update.
48+
Thanks to Adam Langely ([email protected]) for the detailed report!
49+
50+
yaSSL Release notes, version 2.3.8 (9/17/2015)
51+
This release of yaSSL fixes a high security vulnerability. All users
52+
SHOULD update. If using yaSSL for TLS on the server side with private
53+
RSA keys allowing ephemeral key exchange you MUST update and regenerate
54+
the RSA private keys. This report is detailed in:
55+
https://people.redhat.com/~fweimer/rsa-crt-leaks.pdf
56+
yaSSL now detects RSA signature faults and returns an error.
57+
58+
yaSSL Patch notes, version 2.3.7e (6/26/2015)
59+
This release of yaSSL includes a fix for Date less than comparison.
60+
Previously yaSSL would return true on less than comparisons if the Dates
61+
were equal. Reported by Oracle. No security problem, but if a cert was
62+
generated right now, a server started using it in the same second, and a
63+
client tried to verify it in the same second it would report not yet valid.
64+
65+
yaSSL Patch notes, version 2.3.7d (6/22/2015)
66+
This release of yaSSL includes a fix for input_buffer set_current with
67+
index 0. SSL_peek() at front of waiting data could trigger. Robert
68+
Golebiowski of Oracle identified and suggested a fix, thanks!
69+
70+
yaSSL Patch notes, version 2.3.7c (6/12/2015)
71+
This release of yaSSL does certificate DATE comparisons to the second
72+
instead of to the minute, helpful when using freshly generated certs.
73+
Though keep in mind that time sync differences could still show up.
74+
1575
yaSSL Patch notes, version 2.3.7b (3/18/2015)
1676
This release of yaSSL fixes a potential crash with corrupted private keys.
1777
Also detects bad keys earlier for user.
@@ -24,7 +84,7 @@ yaSSL Release notes, version 2.3.6 (11/25/2014)
2484

2585
This release of yaSSL fixes some valgrind warnings/errors including
2686
uninitialized reads and off by one index errors induced from fuzzing
27-
the handshake. These were reported by Oracle.
87+
the handshake. These were reported by Oracle.
2888

2989
yaSSL Release notes, version 2.3.5 (9/29/2014)
3090

@@ -113,7 +173,7 @@ See libcurl build instructions below under 1.3.0 and note in 1.5.8.
113173

114174
This release of yaSSL contains bug fixes, the removal of assert() s and
115175
a security patch for a buffer overflow possibility in certificate name
116-
processing.
176+
processing.
117177

118178
See normal build instructions below under 1.0.6.
119179
See libcurl build instructions below under 1.3.0 and note in 1.5.8.
@@ -141,15 +201,15 @@ See libcurl build instructions below under 1.3.0 and note in 1.5.8.
141201
*****************yaSSL Release notes, version 1.9.2 (9/24/08)
142202

143203
This release of yaSSL contains bug fixes and improved certificate verify
144-
callback support.
204+
callback support.
145205

146206
See normal build instructions below under 1.0.6.
147207
See libcurl build instructions below under 1.3.0 and note in 1.5.8.
148208

149209

150210
*****************yaSSL Release notes, version 1.8.8 (5/7/08)
151211

152-
This release of yaSSL contains bug fixes, and better socket handling.
212+
This release of yaSSL contains bug fixes, and better socket handling.
153213

154214
See normal build instructions below under 1.0.6.
155215
See libcurl build instructions below under 1.3.0 and note in 1.5.8.
@@ -159,7 +219,7 @@ See libcurl build instructions below under 1.3.0 and note in 1.5.8.
159219

160220
This release of yaSSL contains bug fixes, and fixes security problems
161221
associated with using SSL 2.0 client hellos and improper input handling.
162-
Please upgrade to this version if you are using a previous one.
222+
Please upgrade to this version if you are using a previous one.
163223

164224
See normal build instructions below under 1.0.6.
165225
See libcurl build instructions below under 1.3.0 and note in 1.5.8.
@@ -168,7 +228,7 @@ See libcurl build instructions below under 1.3.0 and note in 1.5.8.
168228
*****************yaSSL Release notes, version 1.7.5 (10/15/07)
169229

170230
This release of yaSSL contains bug fixes, adds MSVC 2005 project support,
171-
GCC 4.2 support, IPV6 support and test, and new test certificates.
231+
GCC 4.2 support, IPV6 support and test, and new test certificates.
172232

173233
See normal build instructions below under 1.0.6.
174234
See libcurl build instructions below under 1.3.0 and note in 1.5.8.
@@ -177,7 +237,7 @@ See libcurl build instructions below under 1.3.0 and note in 1.5.8.
177237
*****************yaSSL Release notes, version 1.7.2 (8/20/07)
178238

179239
This release of yaSSL contains bug fixes and adds initial OpenVPN support.
180-
Just configure at this point and beginning of build.
240+
Just configure at this point and beginning of build.
181241

182242
See normal build instructions below under 1.0.6.
183243
See libcurl build instructions below under 1.3.0 and note in 1.5.8.
@@ -208,8 +268,8 @@ See libcurl build instructions below under 1.3.0 and note in 1.5.8.
208268

209269

210270
Since yaSSL now supports zlib, as does libcurl, the libcurl build test can
211-
fail if yaSSL is built with zlib support since the zlib library isn't
212-
passed. You can do two things to fix this:
271+
fail if yaSSL is built with zlib support since the zlib library isn't
272+
passed. You can do two things to fix this:
213273

214274
1) build yaSSL w/o zlib --without-zlib
215275
2) or add flags to curl configure LDFLAGS="-lm -lz"
@@ -223,7 +283,7 @@ See libcurl build instructions below under 1.3.0 and note in 1.5.8.
223283

224284
SSL_METHOD *TLSv1_1_server_method(void);
225285
SSL_METHOD *TLSv1_1_client_method(void);
226-
286+
227287
or the SSLv23 versions (even though yaSSL doesn't support SSL 2.0 the v23
228288
means to pick the highest of SSL 3.0, TLS 1.0, or TLS 1.1).
229289

@@ -260,7 +320,7 @@ See libcurl build instructions below under 1.3.0.
260320
2) follow the instructions in zlib from projects/visualc6/README.txt
261321
for how to add the zlib project into the yaSSL workspace noting that
262322
you'll need to add configuration support for "Win32 Debug" and
263-
"Win32 Release" in note 3 under "To use:".
323+
"Win32 Release" in note 3 under "To use:".
264324
3) define HAVE_LIBZ when building yaSSL
265325

266326

@@ -272,7 +332,7 @@ See libcurl build instructions below under 1.3.0.
272332

273333

274334
This release of yaSSL contains bug fixes, portability enhancements,
275-
nonblocking connect and accept, better OpenSSL error mapping, and
335+
nonblocking connect and accept, better OpenSSL error mapping, and
276336
certificate caching for session resumption.
277337

278338
See normal build instructions below under 1.0.6.
@@ -283,7 +343,7 @@ See libcurl build instructions below under 1.3.0.
283343

284344

285345
This release of yaSSL contains bug fixes, portability enhancements,
286-
and libcurl 7.15.4 support (any newer versions may not build).
346+
and libcurl 7.15.4 support (any newer versions may not build).
287347

288348
See normal build instructions below under 1.0.6.
289349
See libcurl build instructions below under 1.3.0.
@@ -325,12 +385,12 @@ See normal build instructions below under 1.0.6.
325385

326386
--To build for libcurl on Win32:
327387

328-
Simply add the yaSSL project as a dependency to libcurl, add
388+
Simply add the yaSSL project as a dependency to libcurl, add
329389
yaSSL-Home\include and yaSSL-Home\include\openssl to the include list, and
330390
define USE_SSLEAY and USE_OPENSSL
331391

332392
please email [email protected] if you have any questions.
333-
393+
334394

335395
*******************yaSSL Release notes, version 1.2.2 (03/27/06)
336396

@@ -523,8 +583,8 @@ Please see build instructions in release notes 0.3.0.
523583
******************yaSSL Release notes, version 0.4.0
524584

525585
This release of yaSSL contains minor bug fixes, an optional memory tracker,
526-
an echo client and server with input/output redirection for load testing,
527-
and initial session caching support.
586+
an echo client and server with input/output redirection for load testing,
587+
and initial session caching support.
528588

529589

530590
Please see build instructions in release notes 0.3.0.
@@ -572,7 +632,7 @@ See the notes at the bottom of this page for build instructions.
572632
*******************yaSSL Release notes, version 0.2.0
573633

574634
This release of yaSSL contains minor bug fixes and initial alternate crypto
575-
functionality.
635+
functionality.
576636

577637
*** Complete Build ***
578638

@@ -588,7 +648,7 @@ gzip -cd yassl-update-0.2.0.tar.gz | tar xvf -
588648

589649
to update the previous release.
590650

591-
Then issue the make command on linux or rebuild the yaSSL project on Windows.
651+
Then issue the make command on linux or rebuild the yaSSL project on Windows.
592652

593653
*******************yaSSL Release notes, version 0.1.0
594654

@@ -648,7 +708,7 @@ Building yassl on linux:
648708

649709
use the ./buildall script to build everything.
650710

651-
buildall will configure and build CML, CryptoPP, and yassl. Testing was
711+
buildall will configure and build CML, CryptoPP, and yassl. Testing was
652712
preformed with gcc version 3.3.2 on kernel 2.4.22.
653713

654714

cdk/extra/yassl/certs/dsa-cert.pem

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
-----BEGIN CERTIFICATE-----
2-
MIIDqzCCA2ugAwIBAgIJAMGqrgDU6DyhMAkGByqGSM44BAMwgY4xCzAJBgNVBAYT
2+
MIIDrzCCA2+gAwIBAgIJAK1zRM7YFcNjMAkGByqGSM44BAMwgZAxCzAJBgNVBAYT
33
AlVTMQ8wDQYDVQQIDAZPcmVnb24xETAPBgNVBAcMCFBvcnRsYW5kMRAwDgYDVQQK
4-
DAd3b2xmU1NMMRAwDgYDVQQLDAd0ZXN0aW5nMRYwFAYDVQQDDA13d3cueWFzc2w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bgA4XV7l1aNQME4wHQYDVR0O
19+
BBYEFCCY5ONeqOL/KqR/SwbV5Ufb/IHHMB8GA1UdIwQYMBaAFCCY5ONeqOL/KqR/
20+
SwbV5Ufb/IHHMAwGA1UdEwQFMAMBAf8wCQYHKoZIzjgEAwMvADAsAhQRYSCVN/Ge
21+
agV3mffU3qNZ92fI0QIUPH7Jp+iASI7U1ocaYDc10qXGaGY=
2222
-----END CERTIFICATE-----

cdk/extra/yassl/include/crypto_wrapper.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919

20-
/* The crypto wrapper header is used to define policies for the cipher
20+
/* The crypto wrapper header is used to define policies for the cipher
2121
* components used by SSL. There are 3 policies to consider:
2222
*
2323
* 1) MAC, the Message Authentication Code used for each Message
@@ -174,7 +174,7 @@ class HMAC_RMD : public Digest {
174174
};
175175

176176

177-
// BulkCipher policy should implement encrypt, decrypt, get block size,
177+
// BulkCipher policy should implement encrypt, decrypt, get block size,
178178
// and set keys for encrypt and decrypt
179179
struct BulkCipher : public virtual_base {
180180
virtual void encrypt(byte*, const byte*, unsigned int) = 0;
@@ -318,7 +318,7 @@ struct Auth : public virtual_base {
318318
// For use with NULL Authentication schemes
319319
struct NO_Auth : public Auth {
320320
void sign(byte*, const byte*, unsigned int, const RandomPool&) {}
321-
bool verify(const byte*, unsigned int, const byte*, unsigned int)
321+
bool verify(const byte*, unsigned int, const byte*, unsigned int)
322322
{ return true; }
323323
};
324324

@@ -372,11 +372,12 @@ class DiffieHellman {
372372
DiffieHellman(const Integer&, const Integer&, const RandomPool&);
373373
~DiffieHellman();
374374

375-
DiffieHellman(const DiffieHellman&);
375+
DiffieHellman(const DiffieHellman&);
376376
DiffieHellman& operator=(const DiffieHellman&);
377377

378378
uint get_agreedKeyLength() const;
379379
const byte* get_agreedKey() const;
380+
uint get_publicKeyLength() const;
380381
const byte* get_publicKey() const;
381382
void makeAgreement(const byte*, unsigned int);
382383

cdk/extra/yassl/include/openssl/generate_prefix_files.pl

100644100755
File mode changed.

cdk/extra/yassl/include/openssl/ssl.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "rsa.h"
3535

3636

37-
#define YASSL_VERSION "2.3.7b"
37+
#define YASSL_VERSION "2.4.2"
3838

3939

4040
#if defined(__cplusplus)
@@ -335,9 +335,6 @@ enum { /* ssl Constants */
335335
SSL_OP_ALL = 61,
336336
SSL_OP_SINGLE_DH_USE = 62,
337337
SSL_OP_EPHEMERAL_RSA = 63,
338-
SSL_OP_NO_SSLv2 = 64,
339-
SSL_OP_NO_SSLv3 = 65,
340-
SSL_OP_NO_TLSv1 = 66,
341338
SSL_OP_PKCS1_CHECK_1 = 67,
342339
SSL_OP_PKCS1_CHECK_2 = 68,
343340
SSL_OP_NETSCAPE_CA_DN_BUG = 69,
@@ -358,8 +355,12 @@ enum { /* ssl Constants */
358355
SSL_RECEIVED_SHUTDOWN = 94,
359356
SSL_CB_ALERT = 95,
360357
SSL_CB_READ = 96,
361-
SSL_CB_HANDSHAKE_DONE = 97
358+
SSL_CB_HANDSHAKE_DONE = 97,
362359

360+
SSL_OP_NO_SSLv2 = 128,
361+
SSL_OP_NO_SSLv3 = 256,
362+
SSL_OP_NO_TLSv1 = 512,
363+
SSL_OP_NO_TLSv1_1 = 1024,
363364
};
364365

365366

cdk/extra/yassl/include/yassl_error.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ enum YasslError {
5353
compress_error = 118,
5454
decompress_error = 119,
5555
pms_version_error = 120,
56-
sanityCipher_error = 121
56+
sanityCipher_error = 121,
57+
rsaSignFault_error = 122
5758

5859
// !!!! add error message to .cpp !!!!
5960

0 commit comments

Comments
 (0)