summaryrefslogtreecommitdiff
path: root/tests/srp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/srp.c')
-rw-r--r--tests/srp.c97
1 files changed, 60 insertions, 37 deletions
diff --git a/tests/srp.c b/tests/srp.c
index e0c1b8a8e6..7949eada74 100644
--- a/tests/srp.c
+++ b/tests/srp.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 Free Software Foundation, Inc.
+ * Copyright (C) 2017 Red Hat
*
* Author: Nikos Mavrogiannopoulos
*
@@ -15,9 +16,8 @@
* 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
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#ifdef HAVE_CONFIG_H
@@ -43,6 +43,7 @@ int main()
#include <sys/wait.h>
#include <arpa/inet.h>
#include <unistd.h>
+#include <assert.h>
#include <gnutls/gnutls.h>
#include "utils.h"
@@ -104,7 +105,7 @@ const gnutls_datum_t server_key = { server_key_pem,
};
-static void client(int fd, const char *prio)
+static void client(int fd, const char *prio, const char *user, const char *pass, int exp_err)
{
int ret;
gnutls_session_t session;
@@ -122,14 +123,15 @@ static void client(int fd, const char *prio)
gnutls_srp_allocate_client_credentials(&srp_cred);
gnutls_certificate_allocate_credentials(&x509_cred);
- gnutls_srp_set_client_credentials(srp_cred, "test", "test");
+ gnutls_srp_set_client_credentials(srp_cred, user, pass);
/* Initialize TLS session
*/
gnutls_init(&session, GNUTLS_CLIENT);
/* Use default priorities */
- gnutls_priority_set_direct(session, prio, NULL);
+ assert(gnutls_priority_set_direct(session, prio, NULL)>=0);
+ gnutls_handshake_set_timeout(session, 20 * 1000);
/* put the anonymous credentials to the current session
*/
@@ -145,6 +147,12 @@ static void client(int fd, const char *prio)
}
while (ret < 0 && gnutls_error_is_fatal(ret) == 0);
+ if (ret < 0 && ret == exp_err) {
+ if (debug)
+ success("client: handshake failed as expected\n");
+ goto end;
+ }
+
if (ret < 0) {
fail("client: Handshake failed\n");
gnutls_perror(ret);
@@ -160,7 +168,7 @@ static void client(int fd, const char *prio)
(gnutls_protocol_get_version(session)));
gnutls_bye(session, GNUTLS_SHUT_WR);
-
+ end:
close(fd);
gnutls_deinit(session);
@@ -173,28 +181,8 @@ static void client(int fd, const char *prio)
/* These are global */
-gnutls_srp_server_credentials_t s_srp_cred;
-gnutls_certificate_credentials_t s_x509_cred;
pid_t child;
-static gnutls_session_t initialize_tls_session(const char *prio)
-{
- gnutls_session_t session;
-
- gnutls_init(&session, GNUTLS_SERVER);
-
- /* avoid calling all the priority functions, since the defaults
- * are adequate.
- */
- gnutls_priority_set_direct(session, prio, NULL);
-
- gnutls_credentials_set(session, GNUTLS_CRD_SRP, s_srp_cred);
- gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
- s_x509_cred);
-
- return session;
-}
-
static void terminate(void)
{
int status;
@@ -208,6 +196,8 @@ static void server(int fd, const char *prio)
{
int ret;
gnutls_session_t session;
+ gnutls_srp_server_credentials_t s_srp_cred;
+ gnutls_certificate_credentials_t s_x509_cred;
/* this must be called once in the program
*/
@@ -227,9 +217,19 @@ static void server(int fd, const char *prio)
&server_cert, &server_key,
GNUTLS_X509_FMT_PEM);
- session = initialize_tls_session(prio);
+ assert(gnutls_init(&session, GNUTLS_SERVER)>=0);
+
+ /* avoid calling all the priority functions, since the defaults
+ * are adequate.
+ */
+ assert(gnutls_priority_set_direct(session, prio, NULL)>=0);
+
+ gnutls_credentials_set(session, GNUTLS_CRD_SRP, s_srp_cred);
+ gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
+ s_x509_cred);
gnutls_transport_set_int(session, fd);
+ gnutls_handshake_set_timeout(session, 20 * 1000);
do {
ret = gnutls_handshake(session);
@@ -266,11 +266,12 @@ static void server(int fd, const char *prio)
success("server: finished\n");
}
-static void start(const char *prio)
+static void start(const char *name, const char *prio, const char *user, const char *pass, int exp_err)
{
int fd[2];
int ret;
+ success("testing: %s\n", name);
ret = socketpair(AF_LOCAL, SOCK_STREAM, 0, fd);
if (ret < 0) {
perror("socketpair");
@@ -287,24 +288,39 @@ static void start(const char *prio)
if (child) {
int status;
/* parent */
- server(fd[0], prio);
- wait(&status);
- check_wait_status(status);
+ client(fd[1], prio, user, pass, exp_err);
+ if (exp_err < 0) {
+ kill(child, SIGTERM);
+ wait(&status);
+ } else {
+ wait(&status);
+ check_wait_status(status);
+ }
} else {
- client(fd[1], prio);
+ server(fd[0], prio);
exit(0);
}
}
+/* test1-7 are valid users, test9 uses parameter 9 which is disallowed by the RFC5054 spec */
const char *tpasswd_file =
"test:CsrY0PxYlYCAa8UuWUrcjpqBvG6ImlAdGwEUh3tN2DSDBbMWTvnUl7A8Hw7l0zFHwyLH5rh0llrmu/v.Df2FjDEGy0s0rYR5ARE2XlXPl66xhevHj5vitD0Qvq/J0x1v0zMWJSgq/Ah2MoOrw9aBEsQUgf9MddiHQKjE3Vetoq3:3h3cfS0WrBgPUsldDASSK0:1\n"
"test2:1J14yVX4iBa97cySs2/SduwnSbHxiz7WieE761psJQDxkc5flpumEwXbAgK5PrSZ0aZ6q7zyrAN1apJR1QQPAdyScJ6Jw4zjDP7AnezUVGbUNMJXhsI0NPwSc0c/415XfrnM1139yjWCr1qkcYMoN4bALppMMLB8glJkxy7t.3cmH9MkRRAjXXdUgAvHw2ZFLmB/8TlZDhnDS78xCSgLQs.oubZEEIgOWl7BT2.aW76fW3yKWdVrrHQDYPtR4hKx:11rUG9wSMLHe2Cu2p7dmFY:2\n"
- "test3:LVJZDDuElMHuRt5/fcx64AhJ4erhFvbIhv/XCtD0tJI3OC6yEBzthZ1FSqblri9qtsvboPApbFHwP9WEluGtCOuzOON4LS8sSeQDBO.PaqjTnsmXKPYMKa.SuLXFuRTtdiFRwX2ZRy3GIWoCvxJtPDWCEYGBWfnjj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QBT.AcYThpx.Xo7V5OeJQjvpKmhCfFI3fvUhmAiOAp9FjXqGYfIxB8u/kvQjgtODVqQ1rFGgFUEKtqhbRjvsDoknaB1wV8xWfjS9u2/E7Dz.Bim3G4pIWqBs6HSlwSwOM3/uvF4ZBkye63m/ux6qnlhNCxjVoyBi8W1SMEyODz5eEonlDA9i6ox/g8Qq8uOIXSb///////////:2\n";
void doit(void)
{
@@ -324,8 +340,15 @@ void doit(void)
fwrite(tpasswd_file, 1, strlen(tpasswd_file), fd);
fclose(fd);
- start("NORMAL:-KX-ALL:+SRP");
- start("NORMAL:-KX-ALL:+SRP-RSA");
+ start("srp-1024", "NORMAL:-KX-ALL:+SRP", "test", "test", 0);
+ start("srp-1536", "NORMAL:-KX-ALL:+SRP", "test2", "test2", 0);
+ start("srp-2048", "NORMAL:-KX-ALL:+SRP", "test3", "test3", 0);
+ start("srp-3072", "NORMAL:-KX-ALL:+SRP", "test4", "test4", 0);
+ start("srp-4096", "NORMAL:-KX-ALL:+SRP", "test5", "test5", 0);
+ start("srp-8192", "NORMAL:-KX-ALL:+SRP", "test7", "test7", 0);
+ start("srp-other", "NORMAL:-KX-ALL:+SRP", "test9", "test9", GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
+
+ start("srp-rsa", "NORMAL:-KX-ALL:+SRP-RSA", "test", "test", 0);
remove("tpasswd");
remove("tpasswd.conf");