| OLD | NEW |
| 1 /* crypto/bn/bn_exp2.c */ | 1 /* crypto/bn/bn_exp2.c */ |
| 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
| 6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
| 7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
| 8 * | 8 * |
| 9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
| 10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 294 |
| 295 if (wvalue2 && b == wpos2) | 295 if (wvalue2 && b == wpos2) |
| 296 { | 296 { |
| 297 /* wvalue2 is odd and < 2^window2 */ | 297 /* wvalue2 is odd and < 2^window2 */ |
| 298 if (!BN_mod_mul_montgomery(r,r,val2[wvalue2>>1],mont,ctx
)) | 298 if (!BN_mod_mul_montgomery(r,r,val2[wvalue2>>1],mont,ctx
)) |
| 299 goto err; | 299 goto err; |
| 300 wvalue2 = 0; | 300 wvalue2 = 0; |
| 301 r_is_one = 0; | 301 r_is_one = 0; |
| 302 } | 302 } |
| 303 } | 303 } |
| 304 » BN_from_montgomery(rr,r,mont,ctx); | 304 » if (!BN_from_montgomery(rr,r,mont,ctx)) |
| 305 » » goto err; |
| 305 ret=1; | 306 ret=1; |
| 306 err: | 307 err: |
| 307 if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); | 308 if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); |
| 308 BN_CTX_end(ctx); | 309 BN_CTX_end(ctx); |
| 309 bn_check_top(rr); | 310 bn_check_top(rr); |
| 310 return(ret); | 311 return(ret); |
| 311 } | 312 } |
| OLD | NEW |