/*
- * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
*/
#include <ctype.h>
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include "testutil.h"
-#include "openssl/crypto.h"
+#include <openssl/crypto.h>
#ifndef OPENSSL_NO_CT
/* Used when declaring buffers to read text files into */
for (i = 0; i < sk_SCT_num(scts); ++i) {
SCT *sct_i = sk_SCT_value(scts, i);
- if (!TEST_int_eq(SCT_get_source(sct_i), SCT_SOURCE_X509V3_EXTENSION)) {
+ if (!TEST_int_eq(SCT_get_source(sct_i),
+ SCT_SOURCE_X509V3_EXTENSION)) {
goto end;
}
}
1000;
const time_t time_tolerance = 600; /* 10 minutes */
- if (!TEST_uint_le((unsigned int)fabs(difftime(time(NULL), default_time)),
- (unsigned int)time_tolerance))
+ if (!TEST_time_t_le(abs((int)difftime(time(NULL), default_time)),
+ time_tolerance))
goto end;
success = 1;