diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-03-24 01:18:02 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-03-24 01:18:02 +0100 |
commit | 3b300c4263ad641788016e30159388f3bcd4f5d4 (patch) | |
tree | 0c8d422eda41f1ca6bf82bea77d8ad7a79e79aa0 | |
parent | 15bf7be0a835880e7016848d23b469e29818a073 (diff) | |
download | gnutls-3b300c4263ad641788016e30159388f3bcd4f5d4.tar.gz |
Fixes for win32 and time. OCSP test now sets a fixed time to avoid expiration errors.
-rw-r--r-- | tests/ocsp.c | 14 | ||||
-rw-r--r-- | tests/openpgp-auth2.c | 2 | ||||
-rw-r--r-- | tests/resume-dtls.c | 13 |
3 files changed, 27 insertions, 2 deletions
diff --git a/tests/ocsp.c b/tests/ocsp.c index a707671ce7..8449923cbf 100644 --- a/tests/ocsp.c +++ b/tests/ocsp.c @@ -33,6 +33,16 @@ #include "utils.h" +static time_t mytime (time_t * t) +{ + time_t then = 1332548220; + + if (t) + *t = then; + + return then; +} + /* sample request */ static void @@ -1449,8 +1459,10 @@ doit (void) exit (1); } + gnutls_global_set_time_function (mytime); gnutls_global_set_log_function (tls_log_func); - gnutls_global_set_log_level (0); + if (debug) + gnutls_global_set_log_level (99); ocsp_invalid_calls (); req_parse (); diff --git a/tests/openpgp-auth2.c b/tests/openpgp-auth2.c index d87f79f94f..b1db9f2798 100644 --- a/tests/openpgp-auth2.c +++ b/tests/openpgp-auth2.c @@ -253,6 +253,8 @@ doit () gnutls_global_deinit (); } #else +#include <stdlib.h> + void doit () { diff --git a/tests/resume-dtls.c b/tests/resume-dtls.c index acdb8b582b..03f606ce18 100644 --- a/tests/resume-dtls.c +++ b/tests/resume-dtls.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2004-2012 Free Software Foundation, Inc. * - * Author: Simon Josefsson + * Author: Nikos Mavrogiannopoulos * * This file is part of GnuTLS. * @@ -39,6 +39,15 @@ #include <unistd.h> #include <gnutls/gnutls.h> +#if defined(_WIN32) + +int main() +{ + exit(77); +} + +#else + #include "tcp.c" #include "utils.h" @@ -665,3 +674,5 @@ wrap_db_delete (void *dbf, gnutls_datum_t key) return -1; } + +#endif /* WIN32 */ |