e_ubsec.c (205128) | e_ubsec.c (215697) |
---|---|
1/* crypto/engine/hw_ubsec.c */ 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 3 * project 2000. 4 * 5 * Cloned shamelessly by Joe Tardo. 6 */ 7/* ==================================================================== 8 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. --- 617 unchanged lines hidden (view full) --- 626 } 627#endif 628 629static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 630 const BIGNUM *q, const BIGNUM *dp, 631 const BIGNUM *dq, const BIGNUM *qinv, BN_CTX *ctx) 632 { 633 int y_len, | 1/* crypto/engine/hw_ubsec.c */ 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 3 * project 2000. 4 * 5 * Cloned shamelessly by Joe Tardo. 6 */ 7/* ==================================================================== 8 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. --- 617 unchanged lines hidden (view full) --- 626 } 627#endif 628 629static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 630 const BIGNUM *q, const BIGNUM *dp, 631 const BIGNUM *dq, const BIGNUM *qinv, BN_CTX *ctx) 632 { 633 int y_len, |
634 m_len, | |
635 fd; 636 | 634 fd; 635 |
637 m_len = BN_num_bytes(p) + BN_num_bytes(q) + 1; | |
638 y_len = BN_num_bits(p) + BN_num_bits(q); 639 640 /* Check if hardware can't handle this argument. */ 641 if (y_len > max_key_len) { 642 UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_SIZE_TOO_LARGE_OR_TOO_SMALL); 643 return FAIL_TO_SOFTWARE; 644 } 645 --- 425 unchanged lines hidden --- | 636 y_len = BN_num_bits(p) + BN_num_bits(q); 637 638 /* Check if hardware can't handle this argument. */ 639 if (y_len > max_key_len) { 640 UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_SIZE_TOO_LARGE_OR_TOO_SMALL); 641 return FAIL_TO_SOFTWARE; 642 } 643 --- 425 unchanged lines hidden --- |