diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2005-09-27 16:35:27 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2005-09-27 16:35:27 +0000 |
commit | 7c4c21c0e84a539558e3e1689d8a7b8a2c4c0056 (patch) | |
tree | 1735ff449b8119fea13204511499768b6a88c979 /lib/gnutls_srp.c | |
parent | 511650f3ed9aa7d7b933069e3b5c733d44166d7d (diff) | |
download | gnutls-7c4c21c0e84a539558e3e1689d8a7b8a2c4c0056.tar.gz |
Made the PKCS #12 API handle null passwords. Based on patch by
Anton Altaparmakov <aia21@cam.ac.uk>.
Diffstat (limited to 'lib/gnutls_srp.c')
-rw-r--r-- | lib/gnutls_srp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gnutls_srp.c b/lib/gnutls_srp.c index 06a6ec178f..629c860016 100644 --- a/lib/gnutls_srp.c +++ b/lib/gnutls_srp.c @@ -45,7 +45,7 @@ int _gnutls_srp_gx(opaque * text, size_t textsize, opaque ** result, mpi_t x, e; size_t result_size; - if (_gnutls_mpi_scan(&x, text, &textsize)) { + if (_gnutls_mpi_scan_nz(&x, text, &textsize)) { gnutls_assert(); return GNUTLS_E_MPI_SCAN_FAILED; } @@ -195,7 +195,7 @@ mpi_t _gnutls_calc_srp_u(mpi_t A, mpi_t B, mpi_t n) /* convert the bytes of hd to integer */ hash_size = 20; /* SHA */ - ret = _gnutls_mpi_scan(&res, hd, &hash_size); + ret = _gnutls_mpi_scan_nz(&res, hd, &hash_size); gnutls_free(holder); if (ret < 0) { @@ -676,13 +676,13 @@ int gnutls_srp_verifier(const char *username, const char *password, } size = prime->size; - if (_gnutls_mpi_scan(&_n, prime->data, &size)) { + if (_gnutls_mpi_scan_nz(&_n, prime->data, &size)) { gnutls_assert(); return GNUTLS_E_MPI_SCAN_FAILED; } size = generator->size; - if (_gnutls_mpi_scan(&_g, generator->data, &size)) { + if (_gnutls_mpi_scan_nz(&_g, generator->data, &size)) { gnutls_assert(); return GNUTLS_E_MPI_SCAN_FAILED; } |