diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-02-24 15:46:05 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-02-24 15:46:05 +0000 |
commit | 23efd99903aeca9bf12476a129e2944c62978bea (patch) | |
tree | 2abeba0a6a00f1f192ba5daa13e6f2014121c1e7 /lib/gnutls_ui.c | |
parent | 5673b9085a7a5daad79609230ab40eac75ac4f7d (diff) | |
download | gnutls-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_ui.c')
-rw-r--r-- | lib/gnutls_ui.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index a45895b87a..b8ebae5e42 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -290,3 +290,31 @@ int gnutls_x509_fingerprint(GNUTLS_DigestAlgorithm algo, const gnutls_datum* dat return 0; } +/** + * gnutls_anon_set_server_dh_params - This function will set the DH parameters for a server to use + * @res: is a GNUTLS_ANON_SERVER_CREDENTIALS structure + * @dh_params: is a structure that holds diffie hellman parameters. + * + * This function will set the diffie hellman parameters for an anonymous + * server to use. These parameters will be used in Anonymous Diffie Hellman + * cipher suites. + * + **/ +void gnutls_anon_set_server_dh_params( GNUTLS_ANON_SERVER_CREDENTIALS res, GNUTLS_DH_PARAMS dh_params) { + res->dh_params = dh_params; +} + +/** + * gnutls_certificate_set_server_dh_params - This function will set the DH parameters for a server to use + * @res: is a GNUTLS_CERTIFICATE_CREDENTIALS structure + * @dh_params: is a structure that holds diffie hellman parameters. + * + * This function will set the diffie hellman parameters for a certificate + * server to use. These parameters will be used in Ephemeral Diffie Hellman + * cipher suites. + * + **/ +int gnutls_certificate_set_dh_params(GNUTLS_CERTIFICATE_CREDENTIALS res, GNUTLS_DH_PARAMS dh_params) { + res->dh_params = dh_params; + return 0; +} |