diff options
author | jsing <> | 2014-05-22 17:27:50 +0000 |
---|---|---|
committer | jsing <> | 2014-05-22 17:27:50 +0000 |
commit | 2e5d530784973856089132db3a9012c518e0a739 (patch) | |
tree | 28c5613e402ffd86b3b9cf5e02622529b777b97f | |
parent | cd9711b8bc95d797c6ad15890120d161cedeb3c2 (diff) | |
download | openbsd-2e5d530784973856089132db3a9012c518e0a739.tar.gz openbsd-2e5d530784973856089132db3a9012c518e0a739.tar.bz2 openbsd-2e5d530784973856089132db3a9012c518e0a739.zip |
Hello? Yes, you're speaking with OPENSSL_SYS_UNIX.
ok beck@ miod@
-rw-r--r-- | src/lib/libcrypto/ts/ts_rsp_sign.c | 28 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/ts/ts_rsp_sign.c | 28 |
2 files changed, 0 insertions, 56 deletions
diff --git a/src/lib/libcrypto/ts/ts_rsp_sign.c b/src/lib/libcrypto/ts/ts_rsp_sign.c index fe5244c0c5..0e57105858 100644 --- a/src/lib/libcrypto/ts/ts_rsp_sign.c +++ b/src/lib/libcrypto/ts/ts_rsp_sign.c | |||
@@ -58,9 +58,7 @@ | |||
58 | 58 | ||
59 | #include "cryptlib.h" | 59 | #include "cryptlib.h" |
60 | 60 | ||
61 | #if defined(OPENSSL_SYS_UNIX) | ||
62 | #include <sys/time.h> | 61 | #include <sys/time.h> |
63 | #endif | ||
64 | 62 | ||
65 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
66 | #include <openssl/ts.h> | 64 | #include <openssl/ts.h> |
@@ -110,8 +108,6 @@ err: | |||
110 | return NULL; | 108 | return NULL; |
111 | } | 109 | } |
112 | 110 | ||
113 | #if defined(OPENSSL_SYS_UNIX) | ||
114 | |||
115 | /* Use the gettimeofday function call. */ | 111 | /* Use the gettimeofday function call. */ |
116 | static int | 112 | static int |
117 | def_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec) | 113 | def_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec) |
@@ -132,30 +128,6 @@ def_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec) | |||
132 | return 1; | 128 | return 1; |
133 | } | 129 | } |
134 | 130 | ||
135 | #else | ||
136 | |||
137 | /* Use the time function call that provides only seconds precision. */ | ||
138 | static int | ||
139 | def_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec) | ||
140 | { | ||
141 | time_t t; | ||
142 | |||
143 | if (time(&t) == (time_t) - 1) { | ||
144 | TSerr(TS_F_DEF_TIME_CB, TS_R_TIME_SYSCALL_ERROR); | ||
145 | TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION, | ||
146 | "Time is not available."); | ||
147 | TS_RESP_CTX_add_failure_info(ctx, TS_INFO_TIME_NOT_AVAILABLE); | ||
148 | return 0; | ||
149 | } | ||
150 | /* Return time to caller, only second precision. */ | ||
151 | *sec = (long) t; | ||
152 | *usec = 0; | ||
153 | |||
154 | return 1; | ||
155 | } | ||
156 | |||
157 | #endif | ||
158 | |||
159 | static int | 131 | static int |
160 | def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data) | 132 | def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data) |
161 | { | 133 | { |
diff --git a/src/lib/libssl/src/crypto/ts/ts_rsp_sign.c b/src/lib/libssl/src/crypto/ts/ts_rsp_sign.c index fe5244c0c5..0e57105858 100644 --- a/src/lib/libssl/src/crypto/ts/ts_rsp_sign.c +++ b/src/lib/libssl/src/crypto/ts/ts_rsp_sign.c | |||
@@ -58,9 +58,7 @@ | |||
58 | 58 | ||
59 | #include "cryptlib.h" | 59 | #include "cryptlib.h" |
60 | 60 | ||
61 | #if defined(OPENSSL_SYS_UNIX) | ||
62 | #include <sys/time.h> | 61 | #include <sys/time.h> |
63 | #endif | ||
64 | 62 | ||
65 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
66 | #include <openssl/ts.h> | 64 | #include <openssl/ts.h> |
@@ -110,8 +108,6 @@ err: | |||
110 | return NULL; | 108 | return NULL; |
111 | } | 109 | } |
112 | 110 | ||
113 | #if defined(OPENSSL_SYS_UNIX) | ||
114 | |||
115 | /* Use the gettimeofday function call. */ | 111 | /* Use the gettimeofday function call. */ |
116 | static int | 112 | static int |
117 | def_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec) | 113 | def_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec) |
@@ -132,30 +128,6 @@ def_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec) | |||
132 | return 1; | 128 | return 1; |
133 | } | 129 | } |
134 | 130 | ||
135 | #else | ||
136 | |||
137 | /* Use the time function call that provides only seconds precision. */ | ||
138 | static int | ||
139 | def_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec) | ||
140 | { | ||
141 | time_t t; | ||
142 | |||
143 | if (time(&t) == (time_t) - 1) { | ||
144 | TSerr(TS_F_DEF_TIME_CB, TS_R_TIME_SYSCALL_ERROR); | ||
145 | TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION, | ||
146 | "Time is not available."); | ||
147 | TS_RESP_CTX_add_failure_info(ctx, TS_INFO_TIME_NOT_AVAILABLE); | ||
148 | return 0; | ||
149 | } | ||
150 | /* Return time to caller, only second precision. */ | ||
151 | *sec = (long) t; | ||
152 | *usec = 0; | ||
153 | |||
154 | return 1; | ||
155 | } | ||
156 | |||
157 | #endif | ||
158 | |||
159 | static int | 131 | static int |
160 | def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data) | 132 | def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data) |
161 | { | 133 | { |