diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-12-16 22:22:39 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-12-16 22:22:39 +0100 |
commit | c6f19f3a0f715d2e03e11f7e21e41153e44d931f (patch) | |
tree | a3e93354acf06383446b65d50c13375cc5c6877e /lib/gnutls_pubkey.c | |
parent | dbde31c7e7f19a57d5f02f9738f2f4585f2dbd2b (diff) | |
download | gnutls-c6f19f3a0f715d2e03e11f7e21e41153e44d931f.tar.gz |
importing a pubkey from raw params will set the bits field correctly.
Diffstat (limited to 'lib/gnutls_pubkey.c')
-rw-r--r-- | lib/gnutls_pubkey.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c index d903a60020..51421308a0 100644 --- a/lib/gnutls_pubkey.c +++ b/lib/gnutls_pubkey.c @@ -894,6 +894,7 @@ gnutls_pubkey_import_rsa_raw (gnutls_pubkey_t key, key->params_size = RSA_PUBLIC_PARAMS; key->pk_algorithm = GNUTLS_PK_RSA; + key->bits = _gnutls_mpi_get_nbits(key->params[0]); return 0; } @@ -964,6 +965,7 @@ gnutls_pubkey_import_dsa_raw (gnutls_pubkey_t key, key->params_size = DSA_PUBLIC_PARAMS; key->pk_algorithm = GNUTLS_PK_DSA; + key->bits = _gnutls_mpi_get_nbits(key->params[3]); return 0; |