diff --git a/crypto/pqueue/pq_compat.h b/crypto/pqueue/pq_compat.h index 776760a35a23f88f3b7b412f7350fea0c65b036a..653845353d1bbacf0256e7286ca0e8837d65e65b 100644 --- a/crypto/pqueue/pq_compat.h +++ b/crypto/pqueue/pq_compat.h @@ -74,6 +74,9 @@ #if (defined(THIRTY_TWO_BIT) && !defined(BN_LLONG)) || defined(SIXTEEN_BIT) || defined(EIGHT_BIT) +#define PQ_64BIT_IS_INTEGER 0 +#define PQ_64BIT_IS_BIGNUM 1 + #define PQ_64BIT BIGNUM #define PQ_64BIT_CTX BN_CTX @@ -102,6 +105,9 @@ #else +#define PQ_64BIT_IS_INTEGER 1 +#define PQ_64BIT_IS_BIGNUM 0 + #if defined(SIXTY_FOUR_BIT) || defined(SIXTY_FOUR_BIT_LONG) #define PQ_64BIT BN_ULONG #elif defined(THIRTY_TWO_BIT) diff --git a/crypto/pqueue/pqueue.c b/crypto/pqueue/pqueue.c index 6ec5c6756cc83f0e528da285e0b89269801e09e8..e3eb836d45246f50da67373ed4535ad9b038740a 100644 --- a/crypto/pqueue/pqueue.c +++ b/crypto/pqueue/pqueue.c @@ -199,7 +199,7 @@ pqueue_find(pqueue_s *pq, PQ_64BIT priority) return found; } -#if !(defined(OPENSSL_SYS_VMS) || defined(VMS_TEST)) +#if PQ_64BIT_IS_INTEGER void pqueue_print(pqueue_s *pq) { diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 77e1031a31e69db8a3648ce30d766258c314f42a..892b8897088c0091eb73445f2dcb11619428b3ca 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -135,7 +135,7 @@ static int dtls1_record_needs_buffering(SSL *s, SSL3_RECORD *rr, static int dtls1_buffer_record(SSL *s, record_pqueue *q, PQ_64BIT priority); static int dtls1_process_record(SSL *s); -#if !(defined(OPENSSL_SYS_VMS) || defined(VMS_TEST)) +#if PQ_64BIT_IS_INTEGER static PQ_64BIT bytes_to_long_long(unsigned char *bytes, PQ_64BIT *num); #endif static void dtls1_clear_timeouts(SSL *s); @@ -1453,7 +1453,7 @@ err: static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap, PQ_64BIT *seq_num) { -#if !(defined(OPENSSL_SYS_VMS) || defined(VMS_TEST)) +#if PQ_64BIT_IS_INTEGER PQ_64BIT mask = 0x0000000000000001L; #endif PQ_64BIT rcd_num, tmp; @@ -1483,7 +1483,7 @@ static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap, return 0; /* stale, outside the window */ } -#if (defined(OPENSSL_SYS_VMS) || defined(VMS_TEST)) +#if PQ_64BIT_IS_BIGNUM { int offset; pq_64bit_sub(&tmp, &(bitmap->max_seq_num), &rcd_num); @@ -1736,7 +1736,7 @@ dtls1_reset_seq_numbers(SSL *s, int rw) memset(seq, 0x00, seq_bytes); } -#if !(defined(OPENSSL_SYS_VMS) || defined(VMS_TEST)) +#if PQ_64BIT_IS_INTEGER static PQ_64BIT bytes_to_long_long(unsigned char *bytes, PQ_64BIT *num) {