mirror of
https://github.com/openssl/openssl.git
synced 2025-01-10 20:13:48 +08:00
Fix for v3_scts.c
Not all platforms define BN_ULLONG. Define SCTS_TIMESTAMP as a type which should work on all platforms.
This commit is contained in:
parent
7101fd705c
commit
6634416732
@ -63,6 +63,15 @@
|
|||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include "../ssl/ssl_locl.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);
|
static int i2r_scts(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *oct, BIO *out, int indent);
|
||||||
|
|
||||||
const X509V3_EXT_METHOD v3_ct_scts[] = {
|
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));
|
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;
|
ASN1_GENERALIZEDTIME *gen;
|
||||||
char genstr[20];
|
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,
|
static int i2r_scts(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *oct,
|
||||||
BIO *out, int indent)
|
BIO *out, int indent)
|
||||||
{
|
{
|
||||||
BN_ULLONG timestamp;
|
SCTS_TIMESTAMP timestamp;
|
||||||
unsigned char* data = oct->data;
|
unsigned char* data = oct->data;
|
||||||
unsigned short listlen, sctlen = 0, fieldlen;
|
unsigned short listlen, sctlen = 0, fieldlen;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user