aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/kerberos/packet-kerberos-template.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-06-18 18:09:58 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2014-06-18 16:15:42 +0000
commite308e7c4de81c2ff7159e444b865ac59de4faa2b (patch)
treee24dcf58137a30395cc0ce87f1e84e2b32d6a34b /asn1/kerberos/packet-kerberos-template.c
parentb5a462b087bdd7670e1a69786ebbe3f073084ac3 (diff)
Update ASN.1 source files with the API changes done in g021e7af
Change-Id: I52ecfccbce423206242e3cf99401a8c9e1655d88 Reviewed-on: https://code.wireshark.org/review/2385 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 f2fb995062..fcab02a975 100644
--- a/asn1/kerberos/packet-kerberos-template.c
+++ b/asn1/kerberos/packet-kerberos-template.c
@@ -371,7 +371,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_length(cryptotvb);
+ int length = tvb_captured_length(cryptotvb);
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
/* don't do anything if we are not attempting to decrypt data */
@@ -380,7 +380,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
}
/* make sure we have all the data we need */
- if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
+ if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
return NULL;
}
@@ -509,7 +509,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
krb5_error_code ret;
krb5_data data;
enc_key_t *ek;
- int length = tvb_length(cryptotvb);
+ int length = tvb_captured_length(cryptotvb);
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
/* don't do anything if we are not attempting to decrypt data */
@@ -518,7 +518,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
}
/* make sure we have all the data we need */
- if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
+ if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
return NULL;
}
@@ -693,7 +693,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
GSList *ske;
service_key_t *sk;
struct des3_ctx ctx;
- int length = tvb_length(cryptotvb);
+ int length = tvb_captured_length(cryptotvb);
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
@@ -703,7 +703,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
}
/* make sure we have all the data we need */
- if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
+ if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
return NULL;
}
@@ -1331,7 +1331,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_length_remaining(tvb, offset);
+ length=tvb_captured_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1362,7 +1362,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_length_remaining(tvb, offset);
+ length=tvb_captured_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1399,7 +1399,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_length_remaining(tvb, offset);
+ length=tvb_captured_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1441,7 +1441,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_length_remaining(tvb, offset);
+ length=tvb_captured_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1473,7 +1473,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_length_remaining(tvb, offset);
+ length=tvb_captured_length_remaining(tvb, offset);
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
* 7.5.1
@@ -1504,7 +1504,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_length_remaining(tvb, offset);
+ length=tvb_captured_length_remaining(tvb, offset);
/* RFC4120 :
* EncKrbPrivPart encrypted with usage
@@ -1535,7 +1535,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_length_remaining(tvb, offset);
+ length=tvb_captured_length_remaining(tvb, offset);
/* RFC4120 :
* EncKrbCredPart encrypted with usage
@@ -1588,14 +1588,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_length_remaining(tvb, offset)<2){
+ if(tvb_captured_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_length_remaining(tvb, offset)<2){
+ if(tvb_captured_length_remaining(tvb, offset)<2){
return offset;
}
/* dlglen identifier */
@@ -1603,8 +1603,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_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));
+ 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));
return offset;
}
@@ -1827,7 +1827,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_length(tvb) >= 1 && tvb_get_guint8(tvb, 0)<=0x10){
+ if(tvb_captured_length(tvb) >= 1 && tvb_get_guint8(tvb, 0)<=0x10){
if(krb4_handle){
gboolean res;
@@ -1878,7 +1878,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_length(tvb);
+ return tvb_captured_length(tvb);
}
static int
@@ -1889,7 +1889,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_length(tvb);
+ return tvb_captured_length(tvb);
}
/*--- proto_register_kerberos -------------------------------------------*/
@@ -2009,7 +2009,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_length_remaining(tvb, offset);
+ return tvb_captured_length_remaining(tvb, offset);
}