summaryrefslogtreecommitdiff
path: root/lib/gnutls_anon_cred.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-02-24 15:46:05 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-02-24 15:46:05 +0000
commit23efd99903aeca9bf12476a129e2944c62978bea (patch)
tree2abeba0a6a00f1f192ba5daa13e6f2014121c1e7 /lib/gnutls_anon_cred.c
parent5673b9085a7a5daad79609230ab40eac75ac4f7d (diff)
downloadgnutls-23efd99903aeca9bf12476a129e2944c62978bea.tar.gz
The Diffie Hellman parameters are now stored in the credentials structures.
This will allow precomputation of signatures (for DHE cipher suites).
Diffstat (limited to 'lib/gnutls_anon_cred.c')
-rw-r--r--lib/gnutls_anon_cred.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gnutls_anon_cred.c b/lib/gnutls_anon_cred.c
index 379d821b23..544596d646 100644
--- a/lib/gnutls_anon_cred.c
+++ b/lib/gnutls_anon_cred.c
@@ -37,7 +37,8 @@ static int anon_tmp;
* the structure.
**/
void gnutls_anon_free_server_sc( GNUTLS_ANON_SERVER_CREDENTIALS sc) {
- return;
+
+ gnutls_free( sc);
}
/**
@@ -49,7 +50,10 @@ void gnutls_anon_free_server_sc( GNUTLS_ANON_SERVER_CREDENTIALS sc) {
* the structure.
**/
int gnutls_anon_allocate_server_sc( GNUTLS_ANON_SERVER_CREDENTIALS *sc) {
- *sc = &anon_tmp;
+
+ *sc = gnutls_calloc( 1, sizeof(ANON_SERVER_CREDENTIALS_INT));
+ (*sc)->dh_params = &_gnutls_dh_default_params;
+
return 0;
}