summaryrefslogtreecommitdiff
path: root/lib/gnutls_auth.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-02-18 22:55:00 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-02-18 22:55:00 +0000
commit1acc528e707e0fe9fb08811023ab018f0f51465d (patch)
tree9dfcd288a54477b66b8104c649b25ee56cd4d7ae /lib/gnutls_auth.c
parentd32ec830deec7725a67def96146ab8513d598e10 (diff)
downloadgnutls-1acc528e707e0fe9fb08811023ab018f0f51465d.tar.gz
some fixes in types.
Diffstat (limited to 'lib/gnutls_auth.c')
-rw-r--r--lib/gnutls_auth.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/gnutls_auth.c b/lib/gnutls_auth.c
index e497fca0f5..afa48c485a 100644
--- a/lib/gnutls_auth.c
+++ b/lib/gnutls_auth.c
@@ -305,11 +305,15 @@ int _gnutls_auth_info_set( gnutls_session session, gnutls_credentials_type type,
* opaque data.
*/
int _gnutls_generate_key(GNUTLS_KEY key) {
- _gnutls_mpi_print( NULL, &key->key.size, key->KEY);
- key->key.data = gnutls_secure_malloc( key->key.size);
+size_t tmp;
+
+ _gnutls_mpi_print( NULL, &tmp, key->KEY);
+ key->key.data = gnutls_secure_malloc( tmp);
if ( key->key.data==NULL) {
return GNUTLS_E_MEMORY_ERROR;
}
- _gnutls_mpi_print( key->key.data, &key->key.size, key->KEY);
+ _gnutls_mpi_print( key->key.data, &tmp, key->KEY);
+
+ key->key.size = tmp;
return 0;
}