summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn.h
diff options
context:
space:
mode:
authormiod <>2014-04-13 15:25:35 +0000
committermiod <>2014-04-13 15:25:35 +0000
commit1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a (patch)
tree74f4ff344980894c7c9ceeab9b81176ac7572566 /src/lib/libcrypto/bn/bn.h
parent92349eb53934e1b3e9b807e603d45417a6320d21 (diff)
downloadopenbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.gz
openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.bz2
openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.zip
Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.
Diffstat (limited to 'src/lib/libcrypto/bn/bn.h')
-rw-r--r--src/lib/libcrypto/bn/bn.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index f34248ec4f..21a1a3fe35 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -538,6 +538,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *ret,
538BIGNUM *BN_mod_sqrt(BIGNUM *ret, 538BIGNUM *BN_mod_sqrt(BIGNUM *ret,
539 const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); 539 const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
540 540
541void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
542
541/* Deprecated versions */ 543/* Deprecated versions */
542#ifndef OPENSSL_NO_DEPRECATED 544#ifndef OPENSSL_NO_DEPRECATED
543BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe, 545BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,
@@ -774,11 +776,20 @@ int RAND_pseudo_bytes(unsigned char *buf,int num);
774 776
775#define bn_fix_top(a) bn_check_top(a) 777#define bn_fix_top(a) bn_check_top(a)
776 778
779#define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2)
780#define bn_wcheck_size(bn, words) \
781 do { \
782 const BIGNUM *_bnum2 = (bn); \
783 assert(words <= (_bnum2)->dmax && words >= (_bnum2)->top); \
784 } while(0)
785
777#else /* !BN_DEBUG */ 786#else /* !BN_DEBUG */
778 787
779#define bn_pollute(a) 788#define bn_pollute(a)
780#define bn_check_top(a) 789#define bn_check_top(a)
781#define bn_fix_top(a) bn_correct_top(a) 790#define bn_fix_top(a) bn_correct_top(a)
791#define bn_check_size(bn, bits)
792#define bn_wcheck_size(bn, words)
782 793
783#endif 794#endif
784 795