diff options
author | beck <> | 2000-12-15 02:58:47 +0000 |
---|---|---|
committer | beck <> | 2000-12-15 02:58:47 +0000 |
commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/bn/bn_asm.c | |
parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip |
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libcrypto/bn/bn_asm.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_asm.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/libcrypto/bn/bn_asm.c b/src/lib/libcrypto/bn/bn_asm.c index 3329cc18e6..44e52a40db 100644 --- a/src/lib/libcrypto/bn/bn_asm.c +++ b/src/lib/libcrypto/bn/bn_asm.c | |||
@@ -227,7 +227,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) | |||
227 | 227 | ||
228 | #else | 228 | #else |
229 | 229 | ||
230 | /* Divide h-l by d and return the result. */ | 230 | /* Divide h,l by d and return the result. */ |
231 | /* I need to test this some more :-( */ | 231 | /* I need to test this some more :-( */ |
232 | BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) | 232 | BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) |
233 | { | 233 | { |
@@ -237,13 +237,8 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) | |||
237 | if (d == 0) return(BN_MASK2); | 237 | if (d == 0) return(BN_MASK2); |
238 | 238 | ||
239 | i=BN_num_bits_word(d); | 239 | i=BN_num_bits_word(d); |
240 | if ((i != BN_BITS2) && (h > (BN_ULONG)1<<i)) | 240 | assert((i == BN_BITS2) || (h > (BN_ULONG)1<<i)); |
241 | { | 241 | |
242 | #if !defined(NO_STDIO) && !defined(WIN16) | ||
243 | fprintf(stderr,"Division would overflow (%d)\n",i); | ||
244 | #endif | ||
245 | abort(); | ||
246 | } | ||
247 | i=BN_BITS2-i; | 242 | i=BN_BITS2-i; |
248 | if (h >= d) h-=d; | 243 | if (h >= d) h-=d; |
249 | 244 | ||