1 diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c
2 index c18d6f6..9214a2e 100644
5 @@ -313,6 +313,10 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = {
6 { ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn },
7 { ssl_signed_certificate_timestamp_xtn,
8 &ssl3_ClientSendSignedCertTimestampXtn },
9 + /* WebSphere Application Server 7.0 is intolerant to the last extension
10 + * being zero-length. It is not intolerant of TLS 1.2, so ensure that
11 + * signature_algorithms is at the end to guarantee a non-empty
13 { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn },
14 { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn },
15 /* any extra entries will appear as { 0, NULL } */
16 @@ -2507,9 +2511,11 @@ ssl3_CalculatePaddingExtensionLength(unsigned int clientHelloLength)
19 extensionLength = 512 - recordLength;
20 - /* Extensions take at least four bytes to encode. */
21 - if (extensionLength < 4) {
22 - extensionLength = 4;
23 + /* Extensions take at least four bytes to encode. Always include at least
24 + * one byte of data if including the extension. WebSphere Application
25 + * Server 7.0 is intolerant to the last extension being zero-length. */
26 + if (extensionLength < 4 + 1) {
27 + extensionLength = 4 + 1;
30 return extensionLength;