Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45b7f6ef5d | ||
|
|
4ff2364639 | ||
|
|
ca2937a607 | ||
|
|
d6f7e84281 | ||
|
|
e99a02ec18 | ||
|
|
f3e39c4700 | ||
|
|
c8e79e4872 |
@@ -40,6 +40,8 @@ jobs:
|
||||
- obsd67
|
||||
- obsd69
|
||||
- obsd70
|
||||
- obsd72
|
||||
- obsd73
|
||||
- obsdsnap
|
||||
- obsdsnap-i386
|
||||
- openindiana
|
||||
|
||||
+9
-3
@@ -187,7 +187,13 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
|
||||
AC_MSG_RESULT([$GCC_VER])
|
||||
|
||||
AC_MSG_CHECKING([clang version])
|
||||
CLANG_VER=`$CC -v 2>&1 | $AWK '/clang version /{print $3}'`
|
||||
ver="`$CC -v 2>&1`"
|
||||
if echo "$ver" | grep "Apple" >/dev/null; then
|
||||
CLANG_VER="apple-`echo "$ver" | \
|
||||
awk '/Apple LLVM/ {print $4"-"$5}'`"
|
||||
else
|
||||
CLANG_VER=`echo "$ver" | $AWK '/clang version /{print $3}'`
|
||||
fi
|
||||
AC_MSG_RESULT([$CLANG_VER])
|
||||
|
||||
OSSH_CHECK_CFLAG_COMPILE([-pipe])
|
||||
@@ -225,7 +231,7 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
|
||||
# https://bugzilla.mindrot.org/show_bug.cgi?id=3475 and
|
||||
# https://github.com/llvm/llvm-project/issues/59242
|
||||
case "$CLANG_VER" in
|
||||
15.*) OSSH_CHECK_CFLAG_COMPILE([-fzero-call-used-regs=used]) ;;
|
||||
15.*|apple*) OSSH_CHECK_CFLAG_COMPILE([-fzero-call-used-regs=used]) ;;
|
||||
*) OSSH_CHECK_CFLAG_COMPILE([-fzero-call-used-regs=all]) ;;
|
||||
esac
|
||||
OSSH_CHECK_CFLAG_COMPILE([-ftrivial-auto-var-init=zero])
|
||||
@@ -1464,7 +1470,7 @@ else
|
||||
[[
|
||||
int a=0, b=0, c=0, d=0, n, v;
|
||||
n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
|
||||
if (n != 3 && n != 4)
|
||||
if (n < 1)
|
||||
exit(1);
|
||||
v = a*1000000 + b*10000 + c*100 + d;
|
||||
fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kex.c,v 1.178 2023/03/12 10:40:39 dtucker Exp $ */
|
||||
/* $OpenBSD: kex.c,v 1.179 2023/08/18 01:37:41 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@@ -113,6 +113,8 @@ static const struct kexalg kexalgs[] = {
|
||||
{ KEX_CURVE25519_SHA256, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
{ KEX_CURVE25519_SHA256_OLD, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
#ifdef USE_SNTRUP761X25519
|
||||
{ KEX_SNTRUP761X25519_SHA512_IANA, KEX_KEM_SNTRUP761X25519_SHA512, 0,
|
||||
SSH_DIGEST_SHA512 },
|
||||
{ KEX_SNTRUP761X25519_SHA512, KEX_KEM_SNTRUP761X25519_SHA512, 0,
|
||||
SSH_DIGEST_SHA512 },
|
||||
#endif
|
||||
@@ -1334,7 +1336,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
|
||||
for (;;) {
|
||||
if (timeout_ms > 0) {
|
||||
r = waitrfd(ssh_packet_get_connection_in(ssh),
|
||||
&timeout_ms);
|
||||
&timeout_ms, NULL);
|
||||
if (r == -1 && errno == ETIMEDOUT) {
|
||||
send_error(ssh, "Timed out waiting "
|
||||
"for SSH identification string.");
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#define KEX_CURVE25519_SHA256 "curve25519-sha256"
|
||||
#define KEX_CURVE25519_SHA256_OLD "[email protected]"
|
||||
#define KEX_SNTRUP761X25519_SHA512 "[email protected]"
|
||||
#define KEX_SNTRUP761X25519_SHA512_IANA "sntrup761x25519-sha512"
|
||||
|
||||
#define COMP_NONE 0
|
||||
/* pre-auth compression (COMP_ZLIB) is only supported in the client */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: misc.c,v 1.185 2023/08/04 06:32:40 dtucker Exp $ */
|
||||
/* $OpenBSD: misc.c,v 1.186 2023/08/18 01:37:41 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
* Copyright (c) 2005-2020 Damien Miller. All rights reserved.
|
||||
@@ -313,20 +313,38 @@ set_sock_tos(int fd, int tos)
|
||||
* Returns 0 if fd ready or -1 on timeout or error (see errno).
|
||||
*/
|
||||
static int
|
||||
waitfd(int fd, int *timeoutp, short events)
|
||||
waitfd(int fd, int *timeoutp, short events, volatile sig_atomic_t *stop)
|
||||
{
|
||||
struct pollfd pfd;
|
||||
struct timeval t_start;
|
||||
int oerrno, r, have_timeout = (*timeoutp >= 0);
|
||||
struct timespec timeout;
|
||||
int oerrno, r;
|
||||
sigset_t nsigset, osigset;
|
||||
|
||||
if (timeoutp && *timeoutp == -1)
|
||||
timeoutp = NULL;
|
||||
pfd.fd = fd;
|
||||
pfd.events = events;
|
||||
for (; !have_timeout || *timeoutp >= 0;) {
|
||||
monotime_tv(&t_start);
|
||||
r = poll(&pfd, 1, *timeoutp);
|
||||
ptimeout_init(&timeout);
|
||||
if (timeoutp != NULL)
|
||||
ptimeout_deadline_ms(&timeout, *timeoutp);
|
||||
if (stop != NULL)
|
||||
sigfillset(&nsigset);
|
||||
for (; timeoutp == NULL || *timeoutp >= 0;) {
|
||||
if (stop != NULL) {
|
||||
sigprocmask(SIG_BLOCK, &nsigset, &osigset);
|
||||
if (*stop) {
|
||||
sigprocmask(SIG_SETMASK, &osigset, NULL);
|
||||
errno = EINTR;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
r = ppoll(&pfd, 1, ptimeout_get_tsp(&timeout),
|
||||
stop != NULL ? &osigset : NULL);
|
||||
oerrno = errno;
|
||||
if (have_timeout)
|
||||
ms_subtract_diff(&t_start, timeoutp);
|
||||
if (stop != NULL)
|
||||
sigprocmask(SIG_SETMASK, &osigset, NULL);
|
||||
if (timeoutp)
|
||||
*timeoutp = ptimeout_get_ms(&timeout);
|
||||
errno = oerrno;
|
||||
if (r > 0)
|
||||
return 0;
|
||||
@@ -346,8 +364,8 @@ waitfd(int fd, int *timeoutp, short events)
|
||||
* Returns 0 if fd ready or -1 on timeout or error (see errno).
|
||||
*/
|
||||
int
|
||||
waitrfd(int fd, int *timeoutp) {
|
||||
return waitfd(fd, timeoutp, POLLIN);
|
||||
waitrfd(int fd, int *timeoutp, volatile sig_atomic_t *stop) {
|
||||
return waitfd(fd, timeoutp, POLLIN, stop);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -381,7 +399,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
|
||||
break;
|
||||
}
|
||||
|
||||
if (waitfd(sockfd, timeoutp, POLLIN | POLLOUT) == -1)
|
||||
if (waitfd(sockfd, timeoutp, POLLIN | POLLOUT, NULL) == -1)
|
||||
return -1;
|
||||
|
||||
/* Completed or failed */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: misc.h,v 1.103 2023/07/19 14:02:27 djm Exp $ */
|
||||
/* $OpenBSD: misc.h,v 1.104 2023/08/18 01:37:41 djm Exp $ */
|
||||
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* Data structure for representing a forwarding request. */
|
||||
struct Forward {
|
||||
@@ -57,7 +58,7 @@ char *get_rdomain(int);
|
||||
int set_rdomain(int, const char *);
|
||||
int get_sock_af(int);
|
||||
void set_sock_tos(int, int);
|
||||
int waitrfd(int, int *);
|
||||
int waitrfd(int, int *, volatile sig_atomic_t *);
|
||||
int timeout_connect(int, const struct sockaddr *, socklen_t, int *);
|
||||
int a2port(const char *);
|
||||
int a2tun(const char *, int *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mux.c,v 1.99 2023/08/04 06:32:40 dtucker Exp $ */
|
||||
/* $OpenBSD: mux.c,v 1.100 2023/08/18 01:37:41 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
|
||||
*
|
||||
@@ -1480,7 +1480,9 @@ mux_client_read(int fd, struct sshbuf *b, size_t need, int timeout_ms)
|
||||
case EWOULDBLOCK:
|
||||
#endif
|
||||
case EAGAIN:
|
||||
if (waitrfd(fd, &timeout_ms) == -1)
|
||||
if (waitrfd(fd, &timeout_ms,
|
||||
&muxclient_terminate) == -1 &&
|
||||
errno != EINTR)
|
||||
return -1; /* timeout */
|
||||
/* FALLTHROUGH */
|
||||
case EINTR:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#define KEX_SERVER_KEX \
|
||||
"sntrup761x25519-sha512," \
|
||||
"[email protected]," \
|
||||
"curve25519-sha256," \
|
||||
"[email protected]," \
|
||||
|
||||
@@ -1197,6 +1197,7 @@ character, then the specified algorithms will be placed at the head of the
|
||||
default set.
|
||||
The default is:
|
||||
.Bd -literal -offset indent
|
||||
sntrup761x25519-sha512,
|
||||
[email protected],
|
||||
curve25519-sha256,[email protected],
|
||||
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
|
||||
|
||||
@@ -1697,7 +1697,7 @@ main(int ac, char **av)
|
||||
break;
|
||||
case 'V':
|
||||
fprintf(stderr, "%s, %s\n",
|
||||
SSH_VERSION, SSH_OPENSSL_VERSION);
|
||||
SSH_RELEASE, SSH_OPENSSL_VERSION);
|
||||
exit(0);
|
||||
default:
|
||||
usage();
|
||||
|
||||
@@ -1037,11 +1037,14 @@ ecdh-sha2-nistp384
|
||||
.It
|
||||
ecdh-sha2-nistp521
|
||||
.It
|
||||
sntrup761x25519-sha512
|
||||
.It
|
||||
[email protected]
|
||||
.El
|
||||
.Pp
|
||||
The default is:
|
||||
.Bd -literal -offset indent
|
||||
sntrup761x25519-sha512,
|
||||
[email protected],
|
||||
curve25519-sha256,[email protected],
|
||||
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
|
||||
|
||||
Reference in New Issue
Block a user