diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2004-05-03 00:43:37 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2004-05-03 00:43:37 +0000 |
commit | 510c7176382df5c29cdbf44e8e71cc93b051823f (patch) | |
tree | ae083d911c5b4304be6ad23df3275bad896cbbaf /lib/gnutls_auth.c | |
parent | c1892d31204460533da9883bef39b0fe40f986ed (diff) | |
download | gnutls-510c7176382df5c29cdbf44e8e71cc93b051823f.tar.gz |
Added gnutls_auth_client_get_type() and gnutls_auth_server_get_type().
Diffstat (limited to 'lib/gnutls_auth.c')
-rw-r--r-- | lib/gnutls_auth.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/gnutls_auth.c b/lib/gnutls_auth.c index 60ee3558d1..a3860e0bf4 100644 --- a/lib/gnutls_auth.c +++ b/lib/gnutls_auth.c @@ -153,6 +153,39 @@ int server = session->security_parameters.entity==GNUTLS_SERVER?0:1; &session->security_parameters.current_cipher_suite), server); } +/** + * gnutls_auth_server_get_type - Returns the type of credentials for the server authentication schema. + * @session: is a &gnutls_session structure. + * + * Returns the type of credentials that were used for server authentication. + * The returned information is to be used to distinguish the function used + * to access authentication data. + * + **/ +gnutls_credentials_type gnutls_auth_server_get_type( gnutls_session session) +{ + return _gnutls_map_kx_get_cred( + _gnutls_cipher_suite_get_kx_algo( + &session->security_parameters.current_cipher_suite), 1); +} + +/** + * gnutls_auth_client_get_type - Returns the type of credentials for the client authentication schema. + * @session: is a &gnutls_session structure. + * + * Returns the type of credentials that were used for client authentication. + * The returned information is to be used to distinguish the function used + * to access authentication data. + * + **/ +gnutls_credentials_type gnutls_auth_client_get_type( gnutls_session session) +{ + return _gnutls_map_kx_get_cred( + _gnutls_cipher_suite_get_kx_algo( + &session->security_parameters.current_cipher_suite), 0); +} + + /* * This returns a pointer to the linked list. Don't * free that!!! |