diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-09-18 14:49:24 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-09-18 14:49:28 +0200 |
commit | 18ac6db4b91dfda5e7ca5998d6ce74a06aca0620 (patch) | |
tree | a1dc1f2fbca6b4febc2209be709e4371b9b793c6 /lib/extensions.c | |
parent | 8691940ed97f340130d843b3d16dfc95836b4da4 (diff) | |
download | gnutls-tmp-enhance-ext-handling.tar.gz |
extensions: introduced functions to obtain currently parsed messagetmp-enhance-ext-handling
This allows the extension handling code to operate differently
on different messages.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/extensions.c')
-rw-r--r-- | lib/extensions.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/extensions.c b/lib/extensions.c index 2b94f016b7..b746353fe2 100644 --- a/lib/extensions.c +++ b/lib/extensions.c @@ -599,3 +599,23 @@ gnutls_ext_get_data(gnutls_session_t session, { return _gnutls_ext_get_session_data(session, id, data); } + +/** + * gnutls_ext_get_current_msg: + * @session: a #gnutls_session_t opaque pointer + * + * This function allows an extension handler to obtain the message + * this extension is being called from. The returned value is a single + * entry of the %gnutls_ext_flags_t enumeration. That is, if an + * extension was registered with the %GNUTLS_EXT_FLAG_CT and + * %GNUTLS_EXT_FLAG_CR flags, the value when called during parsing of the + * certificate message will be %GNUTLS_EXT_FLAG_CT. + * + * If not called under an extension handler, its value is undefined. + * + * Since: 3.6.x + **/ +unsigned gnutls_ext_get_current_msg(gnutls_session_t session) +{ + return _gnutls_ext_get_msg(session); +} |