diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-07-03 17:28:44 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-07-03 17:28:44 +0200 |
commit | 3607979dcd6329cf932feb71154850fc4108206e (patch) | |
tree | 0b0c54ca83c477f5e65986b623ff1fb994e99279 /includes | |
parent | d768f45a6a476410295fafc90259ab36c6ffdc15 (diff) | |
download | gnutls-3607979dcd6329cf932feb71154850fc4108206e.tar.gz |
Add APIs to register TLS extension handlers.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/gnutls/gnutls.h.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/includes/gnutls/gnutls.h.in b/includes/gnutls/gnutls.h.in index 1bd5d03876..13d507bdfe 100644 --- a/includes/gnutls/gnutls.h.in +++ b/includes/gnutls/gnutls.h.in @@ -480,6 +480,29 @@ extern "C" /* TLS Extensions */ + typedef int (*gnutls_ext_recv_func) (gnutls_session_t session, + const unsigned char *data, size_t len); + typedef int (*gnutls_ext_send_func) (gnutls_session_t session, + unsigned char *data, size_t len); + + /* This flag indicates for an extension whether + * it is useful to application level or TLS level only. + * This is (only) used to parse the application level extensions + * before the user_hello callback is called. + */ + typedef enum + { + GNUTLS_EXT_ANY, + GNUTLS_EXT_APPLICATION, + GNUTLS_EXT_TLS + } gnutls_ext_parse_type_t; + + int gnutls_ext_register (int type, + const char *name, + gnutls_ext_parse_type_t parse_type, + gnutls_ext_recv_func recv_func, + gnutls_ext_send_func send_func); + typedef enum { GNUTLS_NAME_DNS = 1 |