diff options
Diffstat (limited to '')
| -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 | { |
