|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +diff --git a/source/windows/host_resolver.c b/source/windows/host_resolver.c |
| 19 | +index 59fbb85..ad4a99e 100644 |
| 20 | +--- a/source/windows/host_resolver.c |
| 21 | ++++ b/source/windows/host_resolver.c |
| 22 | +@@ -4,6 +4,7 @@ |
| 23 | + */ |
| 24 | + |
| 25 | + /* don't move this below the Windows.h include!!!!*/ |
| 26 | ++#define _WIN32_WINNT 0x0601 |
| 27 | + #include <winsock2.h> |
| 28 | + #include <ws2tcpip.h> |
| 29 | + |
| 30 | +diff --git a/source/windows/iocp/iocp_event_loop.c b/source/windows/iocp/iocp_event_loop.c |
| 31 | +index 9ccce30..5cbbef7 100644 |
| 32 | +--- a/source/windows/iocp/iocp_event_loop.c |
| 33 | ++++ b/source/windows/iocp/iocp_event_loop.c |
| 34 | +@@ -12,6 +12,7 @@ |
| 35 | + |
| 36 | + #include <aws/io/logging.h> |
| 37 | + |
| 38 | ++#define _WIN32_WINNT 0x0601 |
| 39 | + #include <Windows.h> |
| 40 | + |
| 41 | + /* The next set of struct definitions are taken directly from the |
| 42 | +diff --git a/source/windows/secure_channel_tls_handler.c b/source/windows/secure_channel_tls_handler.c |
| 43 | +index 50caf02..29fe850 100644 |
| 44 | +--- a/source/windows/secure_channel_tls_handler.c |
| 45 | ++++ b/source/windows/secure_channel_tls_handler.c |
| 46 | +@@ -2,6 +2,7 @@ |
| 47 | + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 48 | + * SPDX-License-Identifier: Apache-2.0. |
| 49 | + */ |
| 50 | ++#define _WIN32_WINNT 0x0601 |
| 51 | + #define SECURITY_WIN32 |
| 52 | + |
| 53 | + #include <aws/io/tls_channel_handler.h> |
| 54 | +@@ -35,6 +36,25 @@ |
| 55 | + # pragma warning(disable : 4306) /* Identifier is type cast to a larger pointer. */ |
| 56 | + #endif |
| 57 | + |
| 58 | ++#ifndef SP_PROT_TLS1_0_SERVER |
| 59 | ++#define SP_PROT_TLS1_0_SERVER SP_PROT_TLS1_SERVER |
| 60 | ++#endif |
| 61 | ++#ifndef SP_PROT_TLS1_0_CLIENT |
| 62 | ++#define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT |
| 63 | ++#endif |
| 64 | ++#ifndef SP_PROT_TLS1_1_SERVER |
| 65 | ++#define SP_PROT_TLS1_1_SERVER 0x00000100 |
| 66 | ++#endif |
| 67 | ++#ifndef SP_PROT_TLS1_1_CLIENT |
| 68 | ++#define SP_PROT_TLS1_1_CLIENT 0x00000200 |
| 69 | ++#endif |
| 70 | ++#ifndef SCH_USE_STRONG_CRYPTO |
| 71 | ++#define SCH_USE_STRONG_CRYPTO 0x00400000 |
| 72 | ++#endif |
| 73 | ++#ifndef SECBUFFER_ALERT |
| 74 | ++#define SECBUFFER_ALERT 0x11 |
| 75 | ++#endif |
| 76 | ++ |
| 77 | + #define KB_1 1024 |
| 78 | + #define READ_OUT_SIZE (16 * KB_1) |
| 79 | + #define READ_IN_SIZE READ_OUT_SIZE |
| 80 | +@@ -456,7 +476,7 @@ static int s_fillin_alpn_data( |
| 81 | + |
| 82 | + *extension_length += sizeof(uint32_t) + sizeof(uint16_t); |
| 83 | + |
| 84 | +- *extension_name = SecApplicationProtocolNegotiationExt_ALPN; |
| 85 | ++ *extension_name = 2; |
| 86 | + /*now add the protocols*/ |
| 87 | + for (size_t i = 0; i < protocols_count; ++i) { |
| 88 | + struct aws_byte_cursor *protocol_ptr = NULL; |
0 commit comments