Skip to content

Commit d8b0147

Browse files
authored
Merge pull request #746 from tgauth/update-dependencies
Update dependency versions
2 parents 0eab6d5 + 0e69c3d commit d8b0147

File tree

7 files changed

+108
-10
lines changed

7 files changed

+108
-10
lines changed

contrib/win32/openssh/config.h.vs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@
207207
/* #undef HAVE_ADDR_V6_IN_UTMPX */
208208

209209
/* Define to 1 if you have the `arc4random' function. */
210-
#define HAVE_ARC4RANDOM 1
210+
/* #undef HAVE_ARC4RANDOM */
211211

212212
/* Define to 1 if you have the `arc4random_buf' function. */
213-
#define HAVE_ARC4RANDOM_BUF 1
213+
/* #undef HAVE_ARC4RANDOM_BUF */
214214

215215
/* Define to 1 if you have the `arc4random_uniform' function. */
216-
#define HAVE_ARC4RANDOM_UNIFORM 1
216+
/* #undef HAVE_ARC4RANDOM_UNIFORM */
217217

218218
/* Define to 1 if you have the `asprintf' function. */
219219
/* #undef HAVE_ASPRINTF */

contrib/win32/openssh/openbsd_compat.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@
103103
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\glob.c" />
104104
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\strcasestr.c" />
105105
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\strndup.c" />
106+
<ClCompile Include="..\..\..\openbsd-compat\arc4random_uniform.c" />
107+
<ClCompile Include="..\..\..\openbsd-compat\bsd-getentropy.c" />
106108
<ClCompile Include="..\..\..\openbsd-compat\bsd-pselect.c" />
109+
<ClCompile Include="..\..\..\openbsd-compat\bsd-timegm.c" />
107110
</ItemGroup>
108111
<ItemGroup>
109112
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\base64.h" />
@@ -137,6 +140,7 @@
137140
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\sys-queue.h" />
138141
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\sys-tree.h" />
139142
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\vis.h" />
143+
<ClInclude Include="..\..\..\openbsd-compat\arc4random_win.h" />
140144
</ItemGroup>
141145
<PropertyGroup Label="Globals">
142146
<ProjectGuid>{DD483F7D-C553-4740-BC1A-903805AD0174}</ProjectGuid>

contrib/win32/openssh/openbsd_compat.vcxproj.filters

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,15 @@
219219
<ClCompile Include="..\..\..\openbsd-compat\bsd-pselect.c">
220220
<Filter>Source Files</Filter>
221221
</ClCompile>
222+
<ClCompile Include="..\..\..\openbsd-compat\bsd-timegm.c">
223+
<Filter>Source Files</Filter>
224+
</ClCompile>
225+
<ClCompile Include="..\..\..\openbsd-compat\arc4random_uniform.c">
226+
<Filter>Source Files</Filter>
227+
</ClCompile>
228+
<ClCompile Include="..\..\..\openbsd-compat\bsd-getentropy.c">
229+
<Filter>Source Files</Filter>
230+
</ClCompile>
222231
</ItemGroup>
223232
<ItemGroup>
224233
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\base64.h">
@@ -314,5 +323,8 @@
314323
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\vis.h">
315324
<Filter>Header Files</Filter>
316325
</ClInclude>
326+
<ClInclude Include="..\..\..\openbsd-compat\arc4random_win.h">
327+
<Filter>Header Files</Filter>
328+
</ClInclude>
317329
</ItemGroup>
318-
</Project>
330+
</Project>

contrib/win32/openssh/paths.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<OpenSSH-Src-Path>$(SolutionDir)..\..\..\</OpenSSH-Src-Path>
55
<OpenSSH-Bin-Path>$(SolutionDir)..\..\..\bin\</OpenSSH-Bin-Path>
66
<OpenSSH-Lib-Path>$(SolutionDir)lib\</OpenSSH-Lib-Path>
7-
<LibreSSLVersion>3.8.2.0</LibreSSLVersion>
8-
<ZLibVersion>1.3</ZLibVersion>
9-
<fido2Version>1.14.0</fido2Version>
7+
<LibreSSLVersion>3.9.2.0</LibreSSLVersion>
8+
<ZLibVersion>1.3.1</ZLibVersion>
9+
<fido2Version>1.15.0</fido2Version>
1010
<!--libcbor version is not used in the build; it is needed for pipeline compliance tasks-->
1111
<libcborVersion>0.10.1</libcborVersion>
1212
<LibreSSL-Path>$(SolutionDir)\LibreSSL\sdk\</LibreSSL-Path>

contrib/win32/win32compat/misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ nanosleep(const struct timespec *req, struct timespec *rem)
191191
* Copyright (c) 2009, 2010 NoMachine
192192
* All rights reserved
193193
*/
194-
static int
194+
int
195195
gettimeofday(struct timeval *tv, void *tz)
196196
{
197197
union {
@@ -213,7 +213,7 @@ gettimeofday(struct timeval *tv, void *tz)
213213
return 0;
214214
}
215215

216-
static void
216+
void
217217
explicit_bzero(void *b, size_t len)
218218
{
219219
SecureZeroMemory(b, len);

openbsd-compat/arc4random.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,16 @@ static struct _rsx {
8888

8989
static inline int _rs_allocate(struct _rs **, struct _rsx **);
9090
static inline void _rs_forkdetect(void);
91+
#ifdef WINDOWS
92+
#include "arc4random_win.h"
93+
#else
9194
#include "arc4random.h"
95+
#endif /* WINDOWS*/
9296

9397
static inline void _rs_rekey(u_char *dat, size_t datlen);
9498

9599
static inline void
96-
_rs_init(u_char *buf, size_t n)
100+
_rs_init(u_char* buf, size_t n)
97101
{
98102
if (n < KEYSZ + IVSZ)
99103
return;

openbsd-compat/arc4random_win.h

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/* $OpenBSD: arc4random_win.h,v 1.6 2016/06/30 12:17:29 bcook Exp $ */
2+
3+
/*
4+
* Copyright (c) 1996, David Mazieres <[email protected]>
5+
* Copyright (c) 2008, Damien Miller <[email protected]>
6+
* Copyright (c) 2013, Markus Friedl <[email protected]>
7+
* Copyright (c) 2014, Theo de Raadt <[email protected]>
8+
*
9+
* Permission to use, copy, modify, and distribute this software for any
10+
* purpose with or without fee is hereby granted, provided that the above
11+
* copyright notice and this permission notice appear in all copies.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20+
*/
21+
22+
/*
23+
* Stub functions for portability.
24+
*/
25+
26+
#include <windows.h>
27+
28+
static volatile HANDLE arc4random_mtx = NULL;
29+
30+
/*
31+
* Initialize the mutex on the first lock attempt. On collision, each thread
32+
* will attempt to allocate a mutex and compare-and-swap it into place as the
33+
* global mutex. On failure to swap in the global mutex, the mutex is closed.
34+
*/
35+
#define _ARC4_LOCK() { \
36+
if (!arc4random_mtx) { \
37+
HANDLE p = CreateMutex(NULL, FALSE, NULL); \
38+
if (InterlockedCompareExchangePointer((void **)&arc4random_mtx, (void *)p, NULL)) \
39+
CloseHandle(p); \
40+
} \
41+
WaitForSingleObject(arc4random_mtx, INFINITE); \
42+
} \
43+
44+
#define _ARC4_UNLOCK() ReleaseMutex(arc4random_mtx)
45+
46+
static inline void
47+
_getentropy_fail(void)
48+
{
49+
TerminateProcess(GetCurrentProcess(), 0);
50+
}
51+
52+
static inline int
53+
_rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
54+
{
55+
*rsp = VirtualAlloc(NULL, sizeof(**rsp),
56+
MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
57+
if (*rsp == NULL)
58+
return (-1);
59+
60+
*rsxp = VirtualAlloc(NULL, sizeof(**rsxp),
61+
MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
62+
if (*rsxp == NULL) {
63+
VirtualFree(*rsp, 0, MEM_RELEASE);
64+
*rsp = NULL;
65+
return (-1);
66+
}
67+
return (0);
68+
}
69+
70+
static inline void
71+
_rs_forkhandler(void)
72+
{
73+
}
74+
75+
static inline void
76+
_rs_forkdetect(void)
77+
{
78+
}

0 commit comments

Comments
 (0)