summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/auth/srp_kx.c6
-rw-r--r--lib/ext/alpn.c12
-rw-r--r--lib/ext/etm.c4
-rw-r--r--lib/ext/heartbeat.c14
-rw-r--r--lib/ext/max_record.c16
-rw-r--r--lib/ext/safe_renegotiation.c18
-rw-r--r--lib/ext/server_name.c22
-rw-r--r--lib/ext/session_ticket.c26
-rw-r--r--lib/ext/signature.c20
-rw-r--r--lib/ext/srp.c18
-rw-r--r--lib/ext/srtp.c28
-rw-r--r--lib/ext/status_request.c18
-rw-r--r--lib/extensions.h2
13 files changed, 101 insertions, 103 deletions
diff --git a/lib/auth/srp_kx.c b/lib/auth/srp_kx.c
index ecaefb8b8c..870fb1ed8f 100644
--- a/lib/auth/srp_kx.c
+++ b/lib/auth/srp_kx.c
@@ -123,7 +123,7 @@ _gnutls_gen_srp_server_kx(gnutls_session_t session,
SRP_PWD_ENTRY *pwd_entry;
srp_server_auth_info_t info;
size_t tmp_size;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
srp_ext_st *priv;
ret =
@@ -246,7 +246,7 @@ _gnutls_gen_srp_client_kx(gnutls_session_t session,
int ret;
char *username, *password;
gnutls_srp_client_credentials_t cred;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
srp_ext_st *priv;
ret =
@@ -833,7 +833,7 @@ _gnutls_proc_srp_server_kx(gnutls_session_t session, uint8_t * data,
char *username, *password;
ssize_t data_size = _data_size;
gnutls_srp_client_credentials_t cred;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
srp_ext_st *priv;
ret =
diff --git a/lib/ext/alpn.c b/lib/ext/alpn.c
index 88752702a6..b3fa3a3268 100644
--- a/lib/ext/alpn.c
+++ b/lib/ext/alpn.c
@@ -30,7 +30,7 @@ static int _gnutls_alpn_recv_params(gnutls_session_t session,
static int _gnutls_alpn_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata);
-static void _gnutls_alpn_deinit_data(extension_priv_data_t priv);
+static void _gnutls_alpn_deinit_data(gnutls_ext_priv_data_t priv);
const extension_entry_st ext_mod_alpn = {
@@ -54,7 +54,7 @@ _gnutls_alpn_recv_params(gnutls_session_t session,
unsigned len1, len;
ssize_t data_size = _data_size;
alpn_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int selected_protocol_index;
ret =
@@ -140,7 +140,7 @@ _gnutls_alpn_send_params(gnutls_session_t session,
unsigned i;
int total_size = 0, ret;
alpn_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session, GNUTLS_EXTENSION_ALPN,
@@ -229,7 +229,7 @@ gnutls_alpn_get_selected_protocol(gnutls_session_t session,
{
alpn_ext_st *priv;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session, GNUTLS_EXTENSION_ALPN,
@@ -277,7 +277,7 @@ gnutls_alpn_set_protocols(gnutls_session_t session,
{
int ret;
alpn_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
unsigned i;
ret =
@@ -313,7 +313,7 @@ gnutls_alpn_set_protocols(gnutls_session_t session,
}
-static void _gnutls_alpn_deinit_data(extension_priv_data_t priv)
+static void _gnutls_alpn_deinit_data(gnutls_ext_priv_data_t priv)
{
gnutls_free(priv);
}
diff --git a/lib/ext/etm.c b/lib/ext/etm.c
index 8cba95912c..5219a47222 100644
--- a/lib/ext/etm.c
+++ b/lib/ext/etm.c
@@ -63,7 +63,7 @@ _gnutls_ext_etm_recv_params(gnutls_session_t session,
}
if (session->security_parameters.entity == GNUTLS_SERVER) {
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (session->internals.priorities.no_etm != 0)
return 0;
@@ -106,7 +106,7 @@ _gnutls_ext_etm_send_params(gnutls_session_t session,
} else { /* server side */
const cipher_entry_st *c;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
c = _gnutls_cipher_suite_get_cipher_algo(session->security_parameters.cipher_suite);
if (c == NULL || (c->type == CIPHER_AEAD || c->type == CIPHER_STREAM))
diff --git a/lib/ext/heartbeat.c b/lib/ext/heartbeat.c
index 6029a98907..996b8ff422 100644
--- a/lib/ext/heartbeat.c
+++ b/lib/ext/heartbeat.c
@@ -53,7 +53,7 @@
**/
void gnutls_heartbeat_enable(gnutls_session_t session, unsigned int type)
{
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
epriv = (void*)(intptr_t)type;
_gnutls_ext_set_session_data(session, GNUTLS_EXTENSION_HEARTBEAT,
@@ -74,7 +74,7 @@ void gnutls_heartbeat_enable(gnutls_session_t session, unsigned int type)
**/
unsigned gnutls_heartbeat_allowed(gnutls_session_t session, unsigned int type)
{
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (session->internals.handshake_in_progress != 0)
return 0; /* not allowed */
@@ -442,7 +442,7 @@ _gnutls_heartbeat_recv_params(gnutls_session_t session,
const uint8_t * data, size_t _data_size)
{
unsigned policy;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (_gnutls_ext_get_session_data
(session, GNUTLS_EXTENSION_HEARTBEAT, &epriv) < 0) {
@@ -477,7 +477,7 @@ static int
_gnutls_heartbeat_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata)
{
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
uint8_t p;
if (_gnutls_ext_get_session_data
@@ -496,7 +496,7 @@ _gnutls_heartbeat_send_params(gnutls_session_t session,
}
static int
-_gnutls_heartbeat_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
+_gnutls_heartbeat_pack(gnutls_ext_priv_data_t epriv, gnutls_buffer_st * ps)
{
int ret;
@@ -508,9 +508,9 @@ _gnutls_heartbeat_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
static int
_gnutls_heartbeat_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv)
+ gnutls_ext_priv_data_t * _priv)
{
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int ret;
BUFFER_POP_CAST_NUM(ps, epriv);
diff --git a/lib/ext/max_record.c b/lib/ext/max_record.c
index 41880b6236..a934ff1cfe 100644
--- a/lib/ext/max_record.c
+++ b/lib/ext/max_record.c
@@ -36,8 +36,8 @@ static int _gnutls_max_record_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata);
static int _gnutls_max_record_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv);
-static int _gnutls_max_record_pack(extension_priv_data_t _priv,
+ gnutls_ext_priv_data_t * _priv);
+static int _gnutls_max_record_pack(gnutls_ext_priv_data_t _priv,
gnutls_buffer_st * ps);
/* Maps record size to numbers according to the
@@ -75,7 +75,7 @@ _gnutls_max_record_recv_params(gnutls_session_t session,
{
ssize_t new_size;
ssize_t data_size = _data_size;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int ret;
if (session->security_parameters.entity == GNUTLS_SERVER) {
@@ -140,7 +140,7 @@ _gnutls_max_record_send_params(gnutls_session_t session,
/* this function sends the client extension data (dnsname) */
if (session->security_parameters.entity == GNUTLS_CLIENT) {
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret = _gnutls_ext_get_session_data(session,
GNUTLS_EXTENSION_MAX_RECORD_SIZE,
@@ -180,7 +180,7 @@ _gnutls_max_record_send_params(gnutls_session_t session,
static int
-_gnutls_max_record_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
+_gnutls_max_record_pack(gnutls_ext_priv_data_t epriv, gnutls_buffer_st * ps)
{
int ret;
@@ -192,9 +192,9 @@ _gnutls_max_record_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
static int
_gnutls_max_record_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv)
+ gnutls_ext_priv_data_t * _priv)
{
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int ret;
BUFFER_POP_CAST_NUM(ps, epriv);
@@ -287,7 +287,7 @@ size_t gnutls_record_get_max_size(gnutls_session_t session)
ssize_t gnutls_record_set_max_size(gnutls_session_t session, size_t size)
{
ssize_t new_size;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (session->security_parameters.entity == GNUTLS_SERVER)
return GNUTLS_E_INVALID_REQUEST;
diff --git a/lib/ext/safe_renegotiation.c b/lib/ext/safe_renegotiation.c
index d8cb933a19..6a15825bc4 100644
--- a/lib/ext/safe_renegotiation.c
+++ b/lib/ext/safe_renegotiation.c
@@ -29,7 +29,7 @@ static int _gnutls_sr_recv_params(gnutls_session_t state,
const uint8_t * data, size_t data_size);
static int _gnutls_sr_send_params(gnutls_session_t state,
gnutls_buffer_st *);
-static void _gnutls_sr_deinit_data(extension_priv_data_t priv);
+static void _gnutls_sr_deinit_data(gnutls_ext_priv_data_t priv);
const extension_entry_st ext_mod_sr = {
.name = "Safe Renegotiation",
@@ -49,7 +49,7 @@ _gnutls_ext_sr_finished(gnutls_session_t session, void *vdata,
{
int ret;
sr_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (session->internals.priorities.sr == SR_DISABLED) {
return 0;
@@ -93,7 +93,7 @@ int _gnutls_ext_sr_verify(gnutls_session_t session)
{
int ret;
sr_ext_st *priv = NULL;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (session->internals.priorities.sr == SR_DISABLED) {
gnutls_assert();
@@ -198,7 +198,7 @@ int _gnutls_ext_sr_recv_cs(gnutls_session_t session)
{
int ret, set = 0;
sr_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret = _gnutls_ext_get_session_data(session,
GNUTLS_EXTENSION_SAFE_RENEGOTIATION,
@@ -233,7 +233,7 @@ int _gnutls_ext_sr_send_cs(gnutls_session_t session)
{
int ret, set = 0;
sr_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret = _gnutls_ext_get_session_data(session,
GNUTLS_EXTENSION_SAFE_RENEGOTIATION,
@@ -266,7 +266,7 @@ _gnutls_sr_recv_params(gnutls_session_t session,
unsigned int len;
ssize_t data_size = _data_size;
sr_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int set = 0, ret;
if (data_size == 0)
@@ -346,7 +346,7 @@ _gnutls_sr_send_params(gnutls_session_t session,
*/
sr_ext_st *priv;
int ret, set = 0, len;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
size_t init_length = extdata->length;
if (session->internals.priorities.sr == SR_DISABLED) {
@@ -410,7 +410,7 @@ _gnutls_sr_send_params(gnutls_session_t session,
return extdata->length - init_length;
}
-static void _gnutls_sr_deinit_data(extension_priv_data_t priv)
+static void _gnutls_sr_deinit_data(gnutls_ext_priv_data_t priv)
{
gnutls_free(priv);
}
@@ -431,7 +431,7 @@ unsigned gnutls_safe_renegotiation_status(gnutls_session_t session)
{
int ret;
sr_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret = _gnutls_ext_get_session_data(session,
GNUTLS_EXTENSION_SAFE_RENEGOTIATION,
diff --git a/lib/ext/server_name.c b/lib/ext/server_name.c
index 93234f1c10..78c86e3187 100644
--- a/lib/ext/server_name.c
+++ b/lib/ext/server_name.c
@@ -34,10 +34,10 @@ static int _gnutls_server_name_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata);
static int _gnutls_server_name_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv);
-static int _gnutls_server_name_pack(extension_priv_data_t _priv,
+ gnutls_ext_priv_data_t * _priv);
+static int _gnutls_server_name_pack(gnutls_ext_priv_data_t _priv,
gnutls_buffer_st * ps);
-static void _gnutls_server_name_deinit_data(extension_priv_data_t priv);
+static void _gnutls_server_name_deinit_data(gnutls_ext_priv_data_t priv);
int
_gnutls_server_name_set_raw(gnutls_session_t session,
@@ -75,7 +75,7 @@ _gnutls_server_name_recv_params(gnutls_session_t session,
ssize_t data_size = _data_size;
int server_names = 0;
server_name_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (session->security_parameters.entity == GNUTLS_SERVER) {
DECR_LENGTH_RET(data_size, 2, 0);
@@ -181,7 +181,7 @@ _gnutls_server_name_send_params(gnutls_session_t session,
unsigned i;
int total_size = 0, ret;
server_name_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session,
@@ -295,7 +295,7 @@ gnutls_server_name_get(gnutls_session_t session, void *data,
server_name_ext_st *priv;
int ret;
gnutls_datum_t idn_name = {NULL,0};
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (session->security_parameters.entity == GNUTLS_CLIENT) {
gnutls_assert();
@@ -353,7 +353,7 @@ _gnutls_server_name_set_raw(gnutls_session_t session,
{
int server_names, ret;
server_name_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int set = 0;
if (name_length > MAX_SERVER_NAME_SIZE) {
@@ -458,13 +458,13 @@ gnutls_server_name_set(gnutls_session_t session,
return ret;
}
-static void _gnutls_server_name_deinit_data(extension_priv_data_t priv)
+static void _gnutls_server_name_deinit_data(gnutls_ext_priv_data_t priv)
{
gnutls_free(priv);
}
static int
-_gnutls_server_name_pack(extension_priv_data_t epriv,
+_gnutls_server_name_pack(gnutls_ext_priv_data_t epriv,
gnutls_buffer_st * ps)
{
server_name_ext_st *priv = epriv;
@@ -482,12 +482,12 @@ _gnutls_server_name_pack(extension_priv_data_t epriv,
static int
_gnutls_server_name_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv)
+ gnutls_ext_priv_data_t * _priv)
{
server_name_ext_st *priv;
unsigned int i;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
priv = gnutls_calloc(1, sizeof(*priv));
if (priv == NULL) {
diff --git a/lib/ext/session_ticket.c b/lib/ext/session_ticket.c
index 9747177b54..97488f84f9 100644
--- a/lib/ext/session_ticket.c
+++ b/lib/ext/session_ticket.c
@@ -54,10 +54,10 @@ static int session_ticket_recv_params(gnutls_session_t session,
static int session_ticket_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata);
static int session_ticket_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv);
-static int session_ticket_pack(extension_priv_data_t _priv,
+ gnutls_ext_priv_data_t * _priv);
+static int session_ticket_pack(gnutls_ext_priv_data_t _priv,
gnutls_buffer_st * ps);
-static void session_ticket_deinit_data(extension_priv_data_t priv);
+static void session_ticket_deinit_data(gnutls_ext_priv_data_t priv);
const extension_entry_st ext_mod_session_ticket = {
.name = "Session Ticket",
@@ -291,7 +291,7 @@ session_ticket_recv_params(gnutls_session_t session,
{
ssize_t data_size = _data_size;
session_ticket_ext_st *priv = NULL;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int ret;
ret =
@@ -389,7 +389,7 @@ session_ticket_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata)
{
session_ticket_ext_st *priv = NULL;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int ret;
ret =
@@ -439,7 +439,7 @@ session_ticket_send_params(gnutls_session_t session,
}
-static void session_ticket_deinit_data(extension_priv_data_t epriv)
+static void session_ticket_deinit_data(gnutls_ext_priv_data_t epriv)
{
session_ticket_ext_st *priv = epriv;
@@ -448,7 +448,7 @@ static void session_ticket_deinit_data(extension_priv_data_t epriv)
}
static int
-session_ticket_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
+session_ticket_pack(gnutls_ext_priv_data_t epriv, gnutls_buffer_st * ps)
{
session_ticket_ext_st *priv = epriv;
int ret;
@@ -461,11 +461,11 @@ session_ticket_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
}
static int
-session_ticket_unpack(gnutls_buffer_st * ps, extension_priv_data_t * _priv)
+session_ticket_unpack(gnutls_buffer_st * ps, gnutls_ext_priv_data_t * _priv)
{
session_ticket_ext_st *priv = NULL;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
gnutls_datum_t ticket;
priv = gnutls_calloc(1, sizeof(*priv));
@@ -544,7 +544,7 @@ int gnutls_session_ticket_key_generate(gnutls_datum_t * key)
int gnutls_session_ticket_enable_client(gnutls_session_t session)
{
session_ticket_ext_st *priv = NULL;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (!session) {
gnutls_assert();
@@ -586,7 +586,7 @@ gnutls_session_ticket_enable_server(gnutls_session_t session,
const gnutls_datum_t * key)
{
session_ticket_ext_st *priv = NULL;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (!session || !key || key->size != SESSION_KEY_SIZE) {
gnutls_assert();
@@ -619,7 +619,7 @@ int _gnutls_send_new_session_ticket(gnutls_session_t session, int again)
struct ticket_st ticket;
uint16_t ticket_len;
session_ticket_ext_st *priv = NULL;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
uint16_t epoch_saved = session->security_parameters.epoch_write;
if (again == 0) {
@@ -711,7 +711,7 @@ int _gnutls_recv_new_session_ticket(gnutls_session_t session)
uint16_t ticket_len;
int ret;
session_ticket_ext_st *priv = NULL;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session,
diff --git a/lib/ext/signature.c b/lib/ext/signature.c
index b1bcb237f2..2ffeeb6c75 100644
--- a/lib/ext/signature.c
+++ b/lib/ext/signature.c
@@ -43,11 +43,11 @@ static int _gnutls_signature_algorithm_send_params(gnutls_session_t
session,
gnutls_buffer_st *
extdata);
-static void signature_algorithms_deinit_data(extension_priv_data_t priv);
-static int signature_algorithms_pack(extension_priv_data_t epriv,
+static void signature_algorithms_deinit_data(gnutls_ext_priv_data_t priv);
+static int signature_algorithms_pack(gnutls_ext_priv_data_t epriv,
gnutls_buffer_st * ps);
static int signature_algorithms_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv);
+ gnutls_ext_priv_data_t * _priv);
const extension_entry_st ext_mod_sig = {
.name = "Signature Algorithms",
@@ -126,7 +126,7 @@ _gnutls_sign_algorithm_parse_data(gnutls_session_t session,
{
unsigned int sig, i;
sig_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (data_size == 0 || data_size % 2 != 0)
return gnutls_assert_val(GNUTLS_E_UNEXPECTED_PACKET_LENGTH);
@@ -275,7 +275,7 @@ _gnutls_session_get_sign_algo(gnutls_session_t session,
int ret;
const version_entry_st *ver = get_version(session);
sig_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
unsigned int cert_algo;
if (unlikely(ver == NULL))
@@ -346,13 +346,13 @@ _gnutls_session_sign_algo_enabled(gnutls_session_t session,
return GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM;
}
-static void signature_algorithms_deinit_data(extension_priv_data_t priv)
+static void signature_algorithms_deinit_data(gnutls_ext_priv_data_t priv)
{
gnutls_free(priv);
}
static int
-signature_algorithms_pack(extension_priv_data_t epriv,
+signature_algorithms_pack(gnutls_ext_priv_data_t epriv,
gnutls_buffer_st * ps)
{
sig_ext_st *priv = epriv;
@@ -367,11 +367,11 @@ signature_algorithms_pack(extension_priv_data_t epriv,
static int
signature_algorithms_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv)
+ gnutls_ext_priv_data_t * _priv)
{
sig_ext_st *priv;
int i, ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
priv = gnutls_calloc(1, sizeof(*priv));
if (priv == NULL) {
@@ -424,7 +424,7 @@ gnutls_sign_algorithm_get_requested(gnutls_session_t session,
{
const version_entry_st *ver = get_version(session);
sig_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int ret;
if (unlikely(ver == NULL))
diff --git a/lib/ext/srp.c b/lib/ext/srp.c
index 6a60586bce..8bb347ada8 100644
--- a/lib/ext/srp.c
+++ b/lib/ext/srp.c
@@ -33,10 +33,10 @@
#include <extensions.h>
static int _gnutls_srp_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv);
-static int _gnutls_srp_pack(extension_priv_data_t epriv,
+ gnutls_ext_priv_data_t * _priv);
+static int _gnutls_srp_pack(gnutls_ext_priv_data_t epriv,
gnutls_buffer_st * ps);
-static void _gnutls_srp_deinit_data(extension_priv_data_t epriv);
+static void _gnutls_srp_deinit_data(gnutls_ext_priv_data_t epriv);
static int _gnutls_srp_recv_params(gnutls_session_t state,
const uint8_t * data, size_t data_size);
static int _gnutls_srp_send_params(gnutls_session_t state,
@@ -61,7 +61,7 @@ _gnutls_srp_recv_params(gnutls_session_t session, const uint8_t * data,
{
uint8_t len;
ssize_t data_size = _data_size;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
srp_ext_st *priv;
if (session->security_parameters.entity == GNUTLS_SERVER) {
@@ -107,7 +107,7 @@ _gnutls_srp_send_params(gnutls_session_t session,
{
unsigned len;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
srp_ext_st *priv = NULL;
char *username = NULL, *password = NULL;
@@ -206,7 +206,7 @@ _gnutls_srp_send_params(gnutls_session_t session,
return ret;
}
-static void _gnutls_srp_deinit_data(extension_priv_data_t epriv)
+static void _gnutls_srp_deinit_data(gnutls_ext_priv_data_t epriv)
{
srp_ext_st *priv = epriv;
@@ -216,7 +216,7 @@ static void _gnutls_srp_deinit_data(extension_priv_data_t epriv)
}
static int
-_gnutls_srp_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
+_gnutls_srp_pack(gnutls_ext_priv_data_t epriv, gnutls_buffer_st * ps)
{
srp_ext_st *priv = epriv;
int ret;
@@ -235,11 +235,11 @@ _gnutls_srp_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
}
static int
-_gnutls_srp_unpack(gnutls_buffer_st * ps, extension_priv_data_t * _priv)
+_gnutls_srp_unpack(gnutls_buffer_st * ps, gnutls_ext_priv_data_t * _priv)
{
srp_ext_st *priv;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
gnutls_datum_t username = { NULL, 0 };
gnutls_datum_t password = { NULL, 0 };
diff --git a/lib/ext/srtp.c b/lib/ext/srtp.c
index 421e09149c..d00030878c 100644
--- a/lib/ext/srtp.c
+++ b/lib/ext/srtp.c
@@ -33,10 +33,10 @@ static int _gnutls_srtp_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata);
static int _gnutls_srtp_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * _priv);
-static int _gnutls_srtp_pack(extension_priv_data_t _priv,
+ gnutls_ext_priv_data_t * _priv);
+static int _gnutls_srtp_pack(gnutls_ext_priv_data_t _priv,
gnutls_buffer_st * ps);
-static void _gnutls_srtp_deinit_data(extension_priv_data_t priv);
+static void _gnutls_srtp_deinit_data(gnutls_ext_priv_data_t priv);
const extension_entry_st ext_mod_srtp = {
@@ -167,7 +167,7 @@ _gnutls_srtp_recv_params(gnutls_session_t session,
int len;
ssize_t data_size = _data_size;
srtp_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
uint16_t profile;
ret =
@@ -234,7 +234,7 @@ _gnutls_srtp_send_params(gnutls_session_t session,
unsigned i;
int total_size = 0, ret;
srtp_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session, GNUTLS_EXTENSION_SRTP,
@@ -308,7 +308,7 @@ gnutls_srtp_get_selected_profile(gnutls_session_t session,
{
srtp_ext_st *priv;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session, GNUTLS_EXTENSION_SRTP,
@@ -347,7 +347,7 @@ int gnutls_srtp_get_mki(gnutls_session_t session, gnutls_datum_t * mki)
{
srtp_ext_st *priv;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session, GNUTLS_EXTENSION_SRTP,
@@ -388,7 +388,7 @@ gnutls_srtp_set_mki(gnutls_session_t session, const gnutls_datum_t * mki)
{
int ret;
srtp_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session, GNUTLS_EXTENSION_SRTP,
@@ -433,7 +433,7 @@ gnutls_srtp_set_profile(gnutls_session_t session,
{
int ret;
srtp_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session, GNUTLS_EXTENSION_SRTP,
@@ -478,7 +478,7 @@ gnutls_srtp_set_profile_direct(gnutls_session_t session,
{
int ret;
srtp_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int set = 0;
const char *col;
gnutls_srtp_profile_t id;
@@ -607,13 +607,13 @@ gnutls_srtp_get_keys(gnutls_session_t session,
return msize;
}
-static void _gnutls_srtp_deinit_data(extension_priv_data_t priv)
+static void _gnutls_srtp_deinit_data(gnutls_ext_priv_data_t priv)
{
gnutls_free(priv);
}
static int
-_gnutls_srtp_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
+_gnutls_srtp_pack(gnutls_ext_priv_data_t epriv, gnutls_buffer_st * ps)
{
srtp_ext_st *priv = epriv;
unsigned int i;
@@ -633,12 +633,12 @@ _gnutls_srtp_pack(extension_priv_data_t epriv, gnutls_buffer_st * ps)
}
static int
-_gnutls_srtp_unpack(gnutls_buffer_st * ps, extension_priv_data_t * _priv)
+_gnutls_srtp_unpack(gnutls_buffer_st * ps, gnutls_ext_priv_data_t * _priv)
{
srtp_ext_st *priv;
unsigned int i;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
priv = gnutls_calloc(1, sizeof(*priv));
if (priv == NULL) {
diff --git a/lib/ext/status_request.c b/lib/ext/status_request.c
index b5683be80b..80c634e6b0 100644
--- a/lib/ext/status_request.c
+++ b/lib/ext/status_request.c
@@ -197,7 +197,7 @@ static int
_gnutls_status_request_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata)
{
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
status_request_ext_st *priv;
int ret;
@@ -233,7 +233,7 @@ static int
_gnutls_status_request_recv_params(gnutls_session_t session,
const uint8_t * data, size_t size)
{
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
status_request_ext_st *priv;
int ret;
@@ -279,7 +279,7 @@ gnutls_ocsp_status_request_enable_client(gnutls_session_t session,
gnutls_datum_t * extensions)
{
status_request_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
if (session->security_parameters.entity == GNUTLS_SERVER)
return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
@@ -315,7 +315,7 @@ gnutls_ocsp_status_request_get(gnutls_session_t session,
gnutls_datum_t * response)
{
status_request_ext_st *priv;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
int ret;
if (session->security_parameters.entity == GNUTLS_SERVER)
@@ -473,7 +473,7 @@ gnutls_certificate_set_ocsp_status_request_file
return 0;
}
-static void _gnutls_status_request_deinit_data(extension_priv_data_t epriv)
+static void _gnutls_status_request_deinit_data(gnutls_ext_priv_data_t epriv)
{
status_request_ext_st *priv = epriv;
@@ -485,7 +485,7 @@ static void _gnutls_status_request_deinit_data(extension_priv_data_t epriv)
}
static int
-_gnutls_status_request_pack(extension_priv_data_t epriv,
+_gnutls_status_request_pack(gnutls_ext_priv_data_t epriv,
gnutls_buffer_st * ps)
{
status_request_ext_st *priv = epriv;
@@ -499,7 +499,7 @@ _gnutls_status_request_pack(extension_priv_data_t epriv,
static int
_gnutls_status_request_unpack(gnutls_buffer_st * ps,
- extension_priv_data_t * epriv)
+ gnutls_ext_priv_data_t * epriv)
{
status_request_ext_st *priv;
int ret;
@@ -541,7 +541,7 @@ _gnutls_send_server_certificate_status(gnutls_session_t session, int again)
uint8_t *data;
int data_size = 0;
int ret;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
status_request_ext_st *priv;
if (again == 0) {
@@ -585,7 +585,7 @@ int _gnutls_recv_server_certificate_status(gnutls_session_t session)
gnutls_buffer_st buf;
int ret;
status_request_ext_st *priv = NULL;
- extension_priv_data_t epriv;
+ gnutls_ext_priv_data_t epriv;
ret =
_gnutls_ext_get_session_data(session,
diff --git a/lib/extensions.h b/lib/extensions.h
index c50005c273..e91eaebd88 100644
--- a/lib/extensions.h
+++ b/lib/extensions.h
@@ -58,8 +58,6 @@ int _gnutls_ext_pack(gnutls_session_t session, gnutls_buffer_st * packed);
int _gnutls_ext_unpack(gnutls_session_t session,
gnutls_buffer_st * packed);
-typedef gnutls_ext_priv_data_t extension_priv_data_t;
-
typedef struct extension_entry_st {
const char *name; /* const overriden when free_struct is set */
unsigned free_struct;