aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'asn1')
-rw-r--r--asn1/ldap/packet-ldap-template.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c
index eff9506ff7..5c4e447802 100644
--- a/asn1/ldap/packet-ldap-template.c
+++ b/asn1/ldap/packet-ldap-template.c
@@ -104,6 +104,7 @@
#include "packet-ssl.h"
#include "packet-ssl-utils.h"
#include "packet-smb-common.h"
+#include "packet-gssapi.h"
#include "packet-ber.h"
#include "packet-per.h"
@@ -1213,6 +1214,7 @@ static void
tvbuff_t *gssapi_tvb, *plain_tvb = NULL, *decr_tvb= NULL;
int ver_len;
int tmp_length;
+ gssapi_encrypt_info_t gssapi_encrypt;
/*
* This is GSS-API (using SPNEGO, but we should be done with
@@ -1228,22 +1230,18 @@ static void
gssapi_tvb = tvb_new_subset(sasl_tvb, 4, tmp_length, sasl_len);
/* Attempt decryption of the GSSAPI wrapped data if possible */
- pinfo->decrypt_gssapi_tvb=DECRYPT_GSSAPI_NORMAL;
- pinfo->gssapi_wrap_tvb=NULL;
- pinfo->gssapi_encrypted_tvb=NULL;
- pinfo->gssapi_decrypted_tvb=NULL;
- ver_len = call_dissector(gssapi_wrap_handle, gssapi_tvb, pinfo, sasl_tree);
+ gssapi_encrypt.gssapi_data_encrypted = FALSE;
+ gssapi_encrypt.decrypt_gssapi_tvb=DECRYPT_GSSAPI_NORMAL;
+ gssapi_encrypt.gssapi_wrap_tvb=NULL;
+ gssapi_encrypt.gssapi_encrypted_tvb=NULL;
+ gssapi_encrypt.gssapi_decrypted_tvb=NULL;
+ ver_len = call_dissector_with_data(gssapi_wrap_handle, gssapi_tvb, pinfo, sasl_tree, &gssapi_encrypt);
/* if we could unwrap, do a tvb shuffle */
- if(pinfo->gssapi_decrypted_tvb){
- decr_tvb=pinfo->gssapi_decrypted_tvb;
- } else if (pinfo->gssapi_wrap_tvb) {
- plain_tvb=pinfo->gssapi_wrap_tvb;
+ if(gssapi_encrypt.gssapi_decrypted_tvb){
+ decr_tvb=gssapi_encrypt.gssapi_decrypted_tvb;
+ } else if (gssapi_encrypt.gssapi_wrap_tvb) {
+ plain_tvb=gssapi_encrypt.gssapi_wrap_tvb;
}
- /* tidy up */
- pinfo->decrypt_gssapi_tvb=0;
- pinfo->gssapi_wrap_tvb=NULL;
- pinfo->gssapi_encrypted_tvb=NULL;
- pinfo->gssapi_decrypted_tvb=NULL;
/*
* if len is 0 it probably mean that we got a PDU that is not
@@ -1259,7 +1257,7 @@ static void
* data; if not, just use the plaintext data.
*/
if (!decr_tvb && !plain_tvb) {
- if(!pinfo->gssapi_data_encrypted){
+ if(!gssapi_encrypt.gssapi_data_encrypted){
plain_tvb = tvb_new_subset_remaining(gssapi_tvb, ver_len);
}
}