Changeset 808 for openssl/trunk/crypto/bn/bn.h
- Timestamp:
- Aug 7, 2014, 8:25:37 PM (11 years ago)
- Location:
- openssl/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
openssl/trunk ¶
- Property svn:mergeinfo changed
/openssl/vendor/1.0.0-current (added) merged: 799-800,804 /openssl/vendor/1.0.0n (added) merged: 807
- Property svn:mergeinfo changed
-
TabularUnified openssl/trunk/crypto/bn/bn.h ¶
r150 r808 254 254 #endif 255 255 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 256 274 #define BN_DEFAULT_BITS 1280 257 275 … … 521 539 const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); 522 540 541 void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords); 542 523 543 /* Deprecated versions */ 524 544 #ifndef OPENSSL_NO_DEPRECATED … … 742 762 #define bn_fix_top(a) bn_check_top(a) 743 763 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 744 771 #else /* !BN_DEBUG */ 745 772 … … 747 774 #define bn_check_top(a) 748 775 #define bn_fix_top(a) bn_correct_top(a) 776 #define bn_check_size(bn, bits) 777 #define bn_wcheck_size(bn, words) 749 778 750 779 #endif
Note:
See TracChangeset
for help on using the changeset viewer.