aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509v3
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-02-25 14:54:09 +0000
committerDr. Stephen Henson <steve@openssl.org>2014-02-25 14:56:31 +0000
commit3a325c60a39610e8afd56dd90417f13d1044fb00 (patch)
treef5b7c1f618c697b47fb0e795b42ea168da8889d7 /crypto/x509v3
parent86a2f966d0099d87dc2e2a05a923a26ebc182dea (diff)
downloadopenssl-3a325c60a39610e8afd56dd90417f13d1044fb00.tar.gz
Fix for v3_scts.c
Not all platforms define BN_ULLONG. Define SCTS_TIMESTAMP as a type which should work on all platforms. (cherry picked from commit 6634416732b94627eba1c47de3c3a6321a5458f0)
Diffstat (limited to 'crypto/x509v3')
-rw-r--r--crypto/x509v3/v3_scts.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/crypto/x509v3/v3_scts.c b/crypto/x509v3/v3_scts.c
index 9c560ad483..614522a75e 100644
--- a/crypto/x509v3/v3_scts.c
+++ b/crypto/x509v3/v3_scts.c
@@ -63,6 +63,15 @@
#include <openssl/bn.h>
#include "../ssl/ssl_locl.h"
+#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
+#define SCTS_TIMESTAMP unsigned __int64
+#elif defined(__arch64__)
+#define SCTS_TIMESTAMP unsigned long
+#else
+#define SCTS_TIMESTAMP unsigned long long
+#endif
+
+
static int i2r_scts(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *oct, BIO *out, int indent);
const X509V3_EXT_METHOD v3_ct_scts[] = {
@@ -96,7 +105,7 @@ static void tls12_signature_print(BIO *out, const unsigned char *data)
BIO_printf(out, "%s", OBJ_nid2ln(nid));
}
-static void timestamp_print(BIO *out, BN_ULLONG timestamp)
+static void timestamp_print(BIO *out, SCTS_TIMESTAMP timestamp)
{
ASN1_GENERALIZEDTIME *gen;
char genstr[20];
@@ -118,7 +127,7 @@ static void timestamp_print(BIO *out, BN_ULLONG timestamp)
static int i2r_scts(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *oct,
BIO *out, int indent)
{
- BN_ULLONG timestamp;
+ SCTS_TIMESTAMP timestamp;
unsigned char* data = oct->data;
unsigned short listlen, sctlen = 0, fieldlen;