Ignore:
Timestamp:
Aug 7, 2014, 8:25:37 PM (11 years ago)
Author:
dmik
Message:

openssl: Merge version 1.0.0n from vendor to trunk.

Location:
openssl/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • openssl/trunk

  • TabularUnified openssl/trunk/crypto/bn/bn.h

    r150 r808  
    254254#endif
    255255
     256/* 2011-02-22 SMS.
     257 * In various places, a size_t variable or a type cast to size_t was
     258 * used to perform integer-only operations on pointers.  This failed on
     259 * VMS with 64-bit pointers (CC /POINTER_SIZE = 64) because size_t is
     260 * still only 32 bits.  What's needed in these cases is an integer type
     261 * with the same size as a pointer, which size_t is not certain to be.
     262 * The only fix here is VMS-specific.
     263 */
     264#if defined(OPENSSL_SYS_VMS)
     265# if __INITIAL_POINTER_SIZE == 64
     266#  define PTR_SIZE_INT long long
     267# else /* __INITIAL_POINTER_SIZE == 64 */
     268#  define PTR_SIZE_INT int
     269# endif /* __INITIAL_POINTER_SIZE == 64 [else] */
     270#else /* defined(OPENSSL_SYS_VMS) */
     271# define PTR_SIZE_INT size_t
     272#endif /* defined(OPENSSL_SYS_VMS) [else] */
     273
    256274#define BN_DEFAULT_BITS 1280
    257275
     
    521539        const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
    522540
     541void    BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
     542
    523543/* Deprecated versions */
    524544#ifndef OPENSSL_NO_DEPRECATED
     
    742762#define bn_fix_top(a)           bn_check_top(a)
    743763
     764#define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2)
     765#define bn_wcheck_size(bn, words) \
     766        do { \
     767                const BIGNUM *_bnum2 = (bn); \
     768                assert(words <= (_bnum2)->dmax && words >= (_bnum2)->top); \
     769        } while(0)
     770
    744771#else /* !BN_DEBUG */
    745772
     
    747774#define bn_check_top(a)
    748775#define bn_fix_top(a)           bn_correct_top(a)
     776#define bn_check_size(bn, bits)
     777#define bn_wcheck_size(bn, words)
    749778
    750779#endif
Note: See TracChangeset for help on using the changeset viewer.