parent
dc565f4e83
commit
914a518ada
@ -1,65 +0,0 @@
|
||||
From cf9cda99a5caf8fabd547f25a962b96a46e13957 Mon Sep 17 00:00:00 2001
|
||||
From: Nikos Mavrogiannopoulos <nmav@redhat.com>
|
||||
Date: Thu, 12 Apr 2018 14:58:59 +0200
|
||||
Subject: [PATCH] include crypt.h to use crypt()
|
||||
|
||||
This is necessary in Fedora28 as it doesn't provide
|
||||
crypt() prototype in unistd.h
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1566464
|
||||
|
||||
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
src/auth/plain.c | 5 +++++
|
||||
src/ocpasswd/ocpasswd.c | 5 +++++
|
||||
3 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 71c27564..c03d8e7b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -319,7 +319,7 @@ AC_CHECK_MEMBER([struct sockaddr.sa_len],
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
|
||||
-AC_CHECK_HEADERS([net/if_tun.h linux/if_tun.h netinet/in_systm.h], [], [], [])
|
||||
+AC_CHECK_HEADERS([net/if_tun.h linux/if_tun.h netinet/in_systm.h crypt.h], [], [], [])
|
||||
|
||||
AC_CHECK_FUNCS([setproctitle vasprintf clock_gettime isatty pselect ppoll getpeereid sigaltstack])
|
||||
AC_CHECK_FUNCS([strlcpy posix_memalign malloc_trim strsep])
|
||||
diff --git a/src/auth/plain.c b/src/auth/plain.c
|
||||
index 2052e07d..f9c7b1b1 100644
|
||||
--- a/src/auth/plain.c
|
||||
+++ b/src/auth/plain.c
|
||||
@@ -37,6 +37,11 @@
|
||||
#ifdef HAVE_LIBOATH
|
||||
# include <liboath/oath.h>
|
||||
#endif
|
||||
+#ifdef HAVE_CRYPT_H
|
||||
+ /* libcrypt in Fedora28 does not provide prototype
|
||||
+ * in unistd.h */
|
||||
+# include <crypt.h>
|
||||
+#endif
|
||||
|
||||
#define MAX_CPASS_SIZE 128
|
||||
#define HOTP_WINDOW 20
|
||||
diff --git a/src/ocpasswd/ocpasswd.c b/src/ocpasswd/ocpasswd.c
|
||||
index de3b8396..abb66744 100644
|
||||
--- a/src/ocpasswd/ocpasswd.c
|
||||
+++ b/src/ocpasswd/ocpasswd.c
|
||||
@@ -32,6 +32,11 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "ocpasswd-args.h"
|
||||
+#ifdef HAVE_CRYPT_H
|
||||
+ /* libcrypt in Fedora28 does not provide prototype
|
||||
+ * in unistd.h */
|
||||
+# include <crypt.h>
|
||||
+#endif
|
||||
|
||||
/* Gnulib portability files. */
|
||||
#include <getpass.h>
|
||||
--
|
||||
2.14.3
|
||||
|
@ -0,0 +1,46 @@
|
||||
diff --git a/tests/server-cert-rsa-pss b/tests/server-cert-rsa-pss
|
||||
new file mode 100755
|
||||
index 0000000..be3d098
|
||||
--- /dev/null
|
||||
+++ b/tests/server-cert-rsa-pss
|
||||
@@ -0,0 +1,40 @@
|
||||
+#!/bin/sh
|
||||
+#
|
||||
+# Copyright (C) 2017 Red Hat, Inc.
|
||||
+#
|
||||
+# This file is part of ocserv.
|
||||
+#
|
||||
+# ocserv is free software; you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU General Public License as published by the
|
||||
+# Free Software Foundation; either version 2 of the License, or (at
|
||||
+# your option) any later version.
|
||||
+#
|
||||
+# ocserv is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with GnuTLS; if not, write to the Free Software Foundation,
|
||||
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
+
|
||||
+SERV="${SERV:-../src/ocserv}"
|
||||
+srcdir=${srcdir:-.}
|
||||
+NO_NEED_ROOT=1
|
||||
+PORT=4444
|
||||
+
|
||||
+. `dirname $0`/common.sh
|
||||
+
|
||||
+echo "Testing server cert with RSA-PSS... "
|
||||
+
|
||||
+update_config test-rsa-pss.config
|
||||
+launch_sr_server -d 1 -f -c ${CONFIG} & PID=$!
|
||||
+wait_server $PID
|
||||
+
|
||||
+echo "Connecting to obtain cookie... "
|
||||
+( echo "test" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT -q $ADDRESS:$PORT -u test --servercert=sha256:7462b697482f771a9a787bc19db00f704a1685ae09ed201b7a126b052a09522e --cookieonly ) ||
|
||||
+ fail $PID "Could not receive cookie from server"
|
||||
+
|
||||
+cleanup
|
||||
+
|
||||
+exit 0
|
Loading…
Reference in new issue