forked from osmocom/wireshark
![Anders Broman](/assets/img/avatar_default.png)
Here are a number of small patches for asn1 based dissectors: acse: release request/response column information (many X.400/X.500 unbinds are empty) "standardised" PNAME to "ISO 8650-1 OSI Association Control Service" fix for crash when using EXTERNAL dissector rtse: column information when attempting a resume x509if: generation of LDAP-style DNs from RDNSequences new function x509if_get_last_dn() to get the last DN generated. x509af: DSS parameters certificate extension naming subject naming of certificate x509sat: Guide syntax (as SET now supported) PDU exports. cms: verification of message digest attribute (SHA-1 and MD5) ess: enumerated/restrictive/permissive/informative security categories x411: generation of string encoding of X.400 addresses, trace information and message identifiers. s4406: separate types for primary and copy precedence to allow better filtering (e.g. primary precedence = flash) priority-level-qualifier svn path=/trunk/; revision=16508
165 lines
4.4 KiB
INI
165 lines
4.4 KiB
INI
#.EXPORTS
|
|
RTORQapdu
|
|
RTOACapdu
|
|
RTORJapdu
|
|
RTABapdu
|
|
EXTERNAL
|
|
|
|
#.FN_BODY RTORJapdu/userDataRJ
|
|
char *oid = NULL;
|
|
|
|
switch(app_proto) {
|
|
case 1: /* mts-transfer-protocol-1984 */
|
|
oid = "applicationProtocol.1";
|
|
break;
|
|
case 12: /* mts-transfer-protocol */
|
|
oid = "applicationProtocol.12";
|
|
break;
|
|
default:
|
|
if(session && session->pres_ctx_id)
|
|
oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id);
|
|
break;
|
|
}
|
|
|
|
if(!oid) /* XXX: problem here is we haven't decoded the applicationProtocol yet - so we make assumptions! */
|
|
oid = "applicationProtocol.12";
|
|
|
|
if(oid) {
|
|
if((session = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data)) != NULL)
|
|
session->ros_op = (ROS_OP_BIND | ROS_OP_ERROR);
|
|
|
|
offset = call_rtse_oid_callback(oid, tvb, offset, pinfo, top_tree ? top_tree : tree);
|
|
}
|
|
|
|
#.FN_BODY RTABapdu/userdataAB
|
|
/*XXX not implemented yet */
|
|
|
|
#.FN_BODY RTORQapdu
|
|
|
|
if((session = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data)) != NULL)
|
|
session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT);
|
|
open_request=TRUE;
|
|
%(DEFAULT_BODY)s
|
|
open_request=FALSE;
|
|
|
|
#.FN_BODY RTOACapdu
|
|
|
|
if((session = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data)) != NULL)
|
|
session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT);
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
#.FN_BODY T_open
|
|
|
|
char *oid = NULL;
|
|
|
|
switch(app_proto) {
|
|
case 1: /* mts-transfer-protocol-1984 */
|
|
oid = "applicationProtocol.1";
|
|
break;
|
|
case 12: /* mts-transfer-protocol */
|
|
oid = "applicationProtocol.12";
|
|
break;
|
|
default:
|
|
if(session && session->pres_ctx_id)
|
|
oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id);
|
|
break;
|
|
}
|
|
|
|
if(!oid) /* XXX: problem here is we haven't decoded the applicationProtocol yet - so we make assumptions! */
|
|
oid = "applicationProtocol.12";
|
|
|
|
if(oid) {
|
|
|
|
offset = call_rtse_oid_callback(oid, tvb, offset, pinfo, top_tree ? top_tree : tree);
|
|
}
|
|
|
|
/* else XXX: need to flag we can't find the presentation context */
|
|
|
|
#.FN_BODY RTTRapdu
|
|
tvbuff_t *next_tvb = NULL;
|
|
|
|
offset = dissect_ber_octet_string(FALSE, pinfo, tree, tvb, offset, hf_index, &next_tvb);
|
|
|
|
if(next_tvb) {
|
|
|
|
/* XXX: we should check is this is an EXTERNAL first */
|
|
|
|
/* ROS won't do this for us */
|
|
if(session)
|
|
session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT);
|
|
|
|
offset = dissect_rtse_EXTERNAL(FALSE, next_tvb, 0, pinfo, tree, -1);
|
|
|
|
}
|
|
|
|
#.FN_BODY EXTERNAL
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag) {
|
|
/* XXX asn2eth can not yet handle tagged assignment so for the
|
|
* time being just remove this tag manually inside the EXTERNAL
|
|
* dissector.
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
|
|
offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
|
|
EXTERNAL_sequence, hf_index, ett_rtse_EXTERNAL);
|
|
|
|
#.FN_BODY EXTERNAL/indirect-reference
|
|
char *oid;
|
|
|
|
offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset,
|
|
hf_rtse_indirect_reference,
|
|
&indir_ref);
|
|
|
|
/* look up the indirect reference */
|
|
if((oid = find_oid_by_pres_ctx_id(pinfo, indir_ref)) != NULL) {
|
|
g_snprintf(object_identifier_id, MAX_OID_STR_LEN, "%%s", oid);
|
|
}
|
|
|
|
|
|
#.FN_BODY EXTERNAL/encoding/single-ASN1-type
|
|
offset=call_rtse_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree);
|
|
|
|
|
|
#.FN_BODY T_applicationProtocol
|
|
|
|
offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index, &app_proto);
|
|
|
|
#.FN_BODY SessionConnectionIdentifier
|
|
if(open_request && check_col(pinfo->cinfo, COL_INFO))
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, "Recover");
|
|
%(DEFAULT_BODY)s
|
|
|
|
#.FN_PARS T61String
|
|
VAL_PTR=&string
|
|
#.FN_BODY T61String
|
|
tvbuff_t *string = NULL;
|
|
%(DEFAULT_BODY)s
|
|
if(open_request && string && check_col(pinfo->cinfo, COL_INFO))
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
|
|
|
|
#.FN_PARS CommonReference
|
|
VAL_PTR=&string
|
|
#.FN_BODY CommonReference
|
|
tvbuff_t *string = NULL;
|
|
%(DEFAULT_BODY)s
|
|
if(open_request && string && check_col(pinfo->cinfo, COL_INFO))
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
|
|
|
|
#.FN_PARS OCTET_STRING
|
|
VAL_PTR=&string
|
|
#.FN_BODY OCTET_STRING
|
|
tvbuff_t *string = NULL;
|
|
%(DEFAULT_BODY)s
|
|
if(open_request && string && check_col(pinfo->cinfo, COL_INFO))
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
|
|
|
|
#.END
|