Commit 4cb07c9e authored by Daiki Ueno's avatar Daiki Ueno

prf: define gnutls_prf_get as an ephemeral API

Signed-off-by: Daiki Ueno's avatarDaiki Ueno <[email protected]>
parent 9eed0aa3
Pipeline #126426644 failed with stages
in 74 minutes and 2 seconds
......@@ -3,3 +3,4 @@
%readonly-tables
struct ephemeral_function_st { const char *name; void *func; };
%%
gnutls_prf_get, _gnutls_prf_get
......@@ -1639,4 +1639,6 @@ get_certificate_type(gnutls_session_t session,
extern unsigned int _gnutls_global_version;
int _gnutls_prf_get(gnutls_session_t session);
#endif /* GNUTLS_LIB_GNUTLS_INT_H */
......@@ -53,6 +53,8 @@ static inline ret name arglist \
return ((ret (*)arglist)func)args; \
}
GNUTLS_EPHEMERAL_INT(gnutls_prf_get, int, (gnutls_session_t session), (session))
/* *INDENT-OFF* */
#ifdef __cplusplus
}
......
......@@ -348,3 +348,23 @@ gnutls_prf(gnutls_session_t session,
return ret;
}
/**
* _gnutls_prf_get:
* @session: is a #gnutls_session_t type.
*
* Returns the current PRF algorithm enabled on the session.
*
* Returns: a #gnutls_mac_algorithm_t on success, or a negative error code.
*
* Since: 3.6.13
* Stability: Unstable
**/
int
_gnutls_prf_get(gnutls_session_t session)
{
if (session->security_parameters.prf == NULL)
return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
return session->security_parameters.prf->id;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment