strongswan-4.4.0-5.5.2_gmp_mpz_powm_sec.patch
src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c | ||
---|---|---|
475 | 475 |
} |
476 | 476 |
break; |
477 | 477 |
} |
478 |
if (!e.ptr || !n.ptr)
|
|
478 |
if (!e.len || !n.len || (n.ptr[n.len-1] & 0x01) == 0)
|
|
479 | 479 |
{ |
480 | 480 |
return NULL; |
481 | 481 |
} |
... | ... | |
506 | 506 | |
507 | 507 |
this->k = (mpz_sizeinbase(this->n, 2) + 7) / BITS_PER_BYTE; |
508 | 508 | |
509 |
if (!mpz_sgn(this->e)) |
|
510 |
{ |
|
511 |
destroy(this); |
|
512 |
return NULL; |
|
513 |
} |
|
509 | 514 |
return &this->public; |
510 | 515 |
} |
511 |
- |