aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/kerberos/packet-kerberos-template.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-06-19 20:31:08 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2014-06-19 18:42:28 +0000
commitd0ac93756794ed29650dc91f7f8304b11504c61b (patch)
treeca84581f86ad0d451a9600533a57b4f56e261fa0 /asn1/kerberos/packet-kerberos-template.c
parent7398779206eb53ec17bf2f4f4f7fad414b0c7391 (diff)
Revert "Update ASN.1 source files with the API changes done in g021e7af"
This reverts commit e308e7c4de81c2ff7159e444b865ac59de4faa2b. Change-Id: I079616d63f643f79f1bc03ef5fdf724f36df4071 Reviewed-on: https://code.wireshark.org/review/2435 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'asn1/kerberos/packet-kerberos-template.c')
-rw-r--r--asn1/kerberos/packet-kerberos-template.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/asn1/kerberos/packet-kerberos-template.c b/asn1/kerberos/packet-kerberos-template.c
index 8c62b47d79..125fb8db20 100644
--- a/asn1/kerberos/packet-kerberos-template.c
+++ b/asn1/kerberos/packet-kerberos-template.c
@@ -358,7 +358,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
enc_key_t *ek;
krb5_data data = {0,0,NULL};
krb5_keytab_entry key;
- int length = tvb_captured_length(cryptotvb);
+ int length = tvb_length(cryptotvb);
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
/* don't do anything if we are not attempting to decrypt data */
@@ -367,7 +367,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
}
/* make sure we have all the data we need */
- if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
+ if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
return NULL;
}
@@ -496,7 +496,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
krb5_error_code ret;
krb5_data data;
enc_key_t *ek;
- int length = tvb_captured_length(cryptotvb);
+ int length = tvb_length(cryptotvb);
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
/* don't do anything if we are not attempting to decrypt data */
@@ -505,7 +505,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
}
/* make sure we have all the data we need */
- if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
+ if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
return NULL;
}
@@ -680,7 +680,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
GSList *ske;
service_key_t *sk;
struct des3_ctx ctx;
- int length = tvb_captured_length(cryptotvb);
+ int length = tvb_length(cryptotvb);
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
@@ -690,7 +690,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
}
/* make sure we have all the data we need */
- if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
+ if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
return NULL;
}
@@ -1318,7 +1318,7 @@ dissect_krb5_decrypt_ticket_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offse
tvbuff_t *next_tvb;
next_tvb=tvb_new_subset_remaining(tvb, offset);
- length=tvb_captured_length_remaining(tvb, offset);
+ length=tvb_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1349,7 +1349,7 @@ dissect_krb5_decrypt_authenticator_data (gboolean imp_tag _U_, tvbuff_t *tvb, in
tvbuff_t *next_tvb;
next_tvb=tvb_new_subset_remaining(tvb, offset);
- length=tvb_captured_length_remaining(tvb, offset);
+ length=tvb_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1386,7 +1386,7 @@ dissect_krb5_decrypt_KDC_REP_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offs
tvbuff_t *next_tvb;
next_tvb=tvb_new_subset_remaining(tvb, offset);
- length=tvb_captured_length_remaining(tvb, offset);
+ length=tvb_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1428,7 +1428,7 @@ dissect_krb5_decrypt_PA_ENC_TIMESTAMP (gboolean imp_tag _U_, tvbuff_t *tvb, int
tvbuff_t *next_tvb;
next_tvb=tvb_new_subset_remaining(tvb, offset);
- length=tvb_captured_length_remaining(tvb, offset);
+ length=tvb_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1460,7 +1460,7 @@ dissect_krb5_decrypt_AP_REP_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offse
tvbuff_t *next_tvb;
next_tvb=tvb_new_subset_remaining(tvb, offset);
- length=tvb_captured_length_remaining(tvb, offset);
+ length=tvb_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1491,7 +1491,7 @@ dissect_krb5_decrypt_PRIV_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offset,
tvbuff_t *next_tvb;
next_tvb=tvb_new_subset_remaining(tvb, offset);
- length=tvb_captured_length_remaining(tvb, offset);
+ length=tvb_length_remaining(tvb, offset);
/* RFC4120 :
* EncKrbPrivPart encrypted with usage
@@ -1522,7 +1522,7 @@ dissect_krb5_decrypt_CRED_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offset,
tvbuff_t *next_tvb;
next_tvb=tvb_new_subset_remaining(tvb, offset);
- length=tvb_captured_length_remaining(tvb, offset);
+ length=tvb_length_remaining(tvb, offset);
/* RFC4120 :
* EncKrbCredPart encrypted with usage
@@ -1575,14 +1575,14 @@ dissect_krb5_rfc1964_checksum(asn1_ctx_t *actx _U_, proto_tree *tree, tvbuff_t *
/* the next fields are optional so we have to check that we have
* more data in our buffers */
- if(tvb_captured_length_remaining(tvb, offset)<2){
+ if(tvb_length_remaining(tvb, offset)<2){
return offset;
}
/* dlgopt identifier */
proto_tree_add_item(tree, hf_krb_gssapi_dlgopt, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- if(tvb_captured_length_remaining(tvb, offset)<2){
+ if(tvb_length_remaining(tvb, offset)<2){
return offset;
}
/* dlglen identifier */
@@ -1590,8 +1590,8 @@ dissect_krb5_rfc1964_checksum(asn1_ctx_t *actx _U_, proto_tree *tree, tvbuff_t *
proto_tree_add_item(tree, hf_krb_gssapi_dlglen, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- if(dlglen!=tvb_captured_length_remaining(tvb, offset)){
- proto_tree_add_text(tree, tvb, 0, 0, "Error: DlgLen:%d is not the same as number of bytes remaining:%d", dlglen, tvb_captured_length_remaining(tvb, offset));
+ if(dlglen!=tvb_length_remaining(tvb, offset)){
+ proto_tree_add_text(tree, tvb, 0, 0, "Error: DlgLen:%d is not the same as number of bytes remaining:%d", dlglen, tvb_length_remaining(tvb, offset));
return offset;
}
@@ -1814,7 +1814,7 @@ dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
All krb5 commands start with an APPL tag and thus is >=0x60
so if first byte is <=16 just blindly assume it is krb4 then
*/
- if(tvb_captured_length(tvb) >= 1 && tvb_get_guint8(tvb, 0)<=0x10){
+ if(tvb_length(tvb) >= 1 && tvb_get_guint8(tvb, 0)<=0x10){
if(krb4_handle){
gboolean res;
@@ -1865,7 +1865,7 @@ dissect_kerberos_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
}
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
static int
@@ -1876,7 +1876,7 @@ dissect_kerberos_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
tcp_dissect_pdus(tvb, pinfo, tree, krb_desegment, 4, get_krb_pdu_len,
dissect_kerberos_tcp_pdu, data);
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
/*--- proto_register_kerberos -------------------------------------------*/
@@ -1996,7 +1996,7 @@ static int wrap_dissect_gss_kerb(tvbuff_t *tvb, int offset, packet_info *pinfo,
dissect_kerberos_main(auth_tvb, pinfo, tree, FALSE, NULL);
- return tvb_captured_length_remaining(tvb, offset);
+ return tvb_length_remaining(tvb, offset);
}