forked from osmocom/wireshark
x509ce: fix indent (use 2 spaces)
Change-Id: I48c74126a57945033dbe5c81c9bb92012af6c719 Reviewed-on: https://code.wireshark.org/review/27129 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
69e2603c48
commit
0de109ef57
|
@ -42,46 +42,46 @@ static int hf_x509ce_IPAddress_ipv6 = -1;
|
|||
#include "packet-x509ce-fn.c"
|
||||
|
||||
/* CI+ (www.ci-plus.com) defines some X.509 certificate extensions
|
||||
that use OIDs which are not officially assigned
|
||||
that use OIDs which are not officially assigned
|
||||
dissection of these extensions can be enabled temporarily using the
|
||||
functions below */
|
||||
functions below */
|
||||
void
|
||||
x509ce_enable_ciplus(void)
|
||||
{
|
||||
dissector_handle_t dh25, dh26, dh27;
|
||||
dissector_handle_t dh25, dh26, dh27;
|
||||
|
||||
dh25 = create_dissector_handle(dissect_ScramblerCapabilities_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.25", dh25);
|
||||
dh26 = create_dissector_handle(dissect_CiplusInfo_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.26", dh26);
|
||||
dh27 = create_dissector_handle(dissect_CicamBrandId_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.27", dh27);
|
||||
dh25 = create_dissector_handle(dissect_ScramblerCapabilities_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.25", dh25);
|
||||
dh26 = create_dissector_handle(dissect_CiplusInfo_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.26", dh26);
|
||||
dh27 = create_dissector_handle(dissect_CicamBrandId_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.27", dh27);
|
||||
}
|
||||
|
||||
void
|
||||
x509ce_disable_ciplus(void)
|
||||
{
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.25");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.26");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.27");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.25");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.26");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.27");
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dissect_x509ce_invalidityDate_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
asn1_ctx_t asn1_ctx;
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
asn1_ctx_t asn1_ctx;
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
|
||||
return dissect_x509ce_GeneralizedTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509ce_id_ce_invalidityDate);
|
||||
return dissect_x509ce_GeneralizedTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509ce_id_ce_invalidityDate);
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_x509ce_baseUpdateTime_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
asn1_ctx_t asn1_ctx;
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
return dissect_x509ce_GeneralizedTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509ce_id_ce_baseUpdateTime);
|
||||
asn1_ctx_t asn1_ctx;
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
return dissect_x509ce_GeneralizedTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509ce_id_ce_baseUpdateTime);
|
||||
}
|
||||
|
||||
/*--- proto_register_x509ce ----------------------------------------------*/
|
||||
|
@ -99,7 +99,7 @@ void proto_register_x509ce(void) {
|
|||
NULL, HFILL }},
|
||||
{ &hf_x509ce_object_identifier_id,
|
||||
{ "Id", "x509ce.id", FT_OID, BASE_NONE, NULL, 0,
|
||||
"Object identifier Id", HFILL }},
|
||||
"Object identifier Id", HFILL }},
|
||||
{ &hf_x509ce_IPAddress_ipv4,
|
||||
{ "iPAddress", "x509ce.IPAddress.ipv4", FT_IPv4, BASE_NONE, NULL, 0,
|
||||
"IPv4 address", HFILL }},
|
||||
|
@ -128,7 +128,20 @@ void proto_register_x509ce(void) {
|
|||
/*--- proto_reg_handoff_x509ce -------------------------------------------*/
|
||||
void proto_reg_handoff_x509ce(void) {
|
||||
#include "packet-x509ce-dis-tab.c"
|
||||
register_ber_oid_dissector("2.5.29.24", dissect_x509ce_invalidityDate_callback, proto_x509ce, "id-ce-invalidityDate");
|
||||
register_ber_oid_dissector("2.5.29.51", dissect_x509ce_baseUpdateTime_callback, proto_x509ce, "id-ce-baseUpdateTime");
|
||||
register_ber_oid_dissector("2.5.29.24", dissect_x509ce_invalidityDate_callback, proto_x509ce, "id-ce-invalidityDate");
|
||||
register_ber_oid_dissector("2.5.29.51", dissect_x509ce_baseUpdateTime_callback, proto_x509ce, "id-ce-baseUpdateTime");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local Variables:
|
||||
* c-basic-offset: 2
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=2 tabstop=8 expandtab:
|
||||
* :indentSize=2:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
|
@ -19,3 +19,15 @@ void x509ce_disable_ciplus(void);
|
|||
|
||||
#endif /* PACKET_X509CE_H */
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local Variables:
|
||||
* c-basic-offset: 2
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=2 tabstop=8 expandtab:
|
||||
* :indentSize=2:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
|
@ -124,18 +124,18 @@ CRLDistPointsSyntax B "2.5.29.46" "id-ce-freshestCRL"
|
|||
OrderedListSyntax B "2.5.29.47" "id-ce-orderedList"
|
||||
DeltaInformation B "2.5.29.53" "id-ce-deltaInfo"
|
||||
SkipCerts B "2.5.29.54" "id-ce-inhibitAnyPolicy"
|
||||
ToBeRevokedSyntax B "2.5.29.58" "id-ce-toBeRevoked"
|
||||
RevokedGroupsSyntax B "2.5.29.59" "id-ce-RevokedGroups"
|
||||
ExpiredCertsOnCRL B "2.5.29.60" "id-ce-expiredCertsOnCRL"
|
||||
ToBeRevokedSyntax B "2.5.29.58" "id-ce-toBeRevoked"
|
||||
RevokedGroupsSyntax B "2.5.29.59" "id-ce-RevokedGroups"
|
||||
ExpiredCertsOnCRL B "2.5.29.60" "id-ce-expiredCertsOnCRL"
|
||||
AAIssuingDistPointSyntax B "2.5.29.61" "id-ce-aAissuingDistributionPoint"
|
||||
|
||||
CertificateAssertion B "2.5.13.35" "id-mr-certificateMatch"
|
||||
CertificatePairExactAssertion B "2.5.13.36" "id-mr-certificatePairExactMatch"
|
||||
CertificatePairAssertion B "2.5.13.37" "id-mr-certificatePairMatch"
|
||||
CertificateListExactAssertion B "2.5.13.38" "id-mr-certificateListExactMatch"
|
||||
CertificateListAssertion B "2.5.13.39" "id-mr-certificateListMatch"
|
||||
PkiPathMatchSyntax B "2.5.13.62" "id-mr-pkiPathMatch"
|
||||
EnhancedCertificateAssertion B "2.5.13.65" "id-mr-enhancedCertificateMatch"
|
||||
CertificateAssertion B "2.5.13.35" "id-mr-certificateMatch"
|
||||
CertificatePairExactAssertion B "2.5.13.36" "id-mr-certificatePairExactMatch"
|
||||
CertificatePairAssertion B "2.5.13.37" "id-mr-certificatePairMatch"
|
||||
CertificateListExactAssertion B "2.5.13.38" "id-mr-certificateListExactMatch"
|
||||
CertificateListAssertion B "2.5.13.39" "id-mr-certificateListMatch"
|
||||
PkiPathMatchSyntax B "2.5.13.62" "id-mr-pkiPathMatch"
|
||||
EnhancedCertificateAssertion B "2.5.13.65" "id-mr-enhancedCertificateMatch"
|
||||
|
||||
# These are obsolete???
|
||||
# The following OBJECT IDENTIFIERS are not used by this Specification:
|
||||
|
@ -144,23 +144,23 @@ EnhancedCertificateAssertion B "2.5.13.65" "id-mr-enhancedCertificateMatch"
|
|||
# {id-ce 22}, {id-ce 25}, {id-ce 26}
|
||||
|
||||
# Microsoft extensions
|
||||
CertificateTemplate B "1.3.6.1.4.1.311.21.7" "id-ms-certificate-template"
|
||||
CertificatePoliciesSyntax B "1.3.6.1.4.1.311.21.10" "id-ms-application-certificate-policies"
|
||||
CertificateTemplate B "1.3.6.1.4.1.311.21.7" "id-ms-certificate-template"
|
||||
CertificatePoliciesSyntax B "1.3.6.1.4.1.311.21.10" "id-ms-application-certificate-policies"
|
||||
|
||||
# Entrust extensions
|
||||
EntrustVersionInfo B "1.2.840.113533.7.65.0" "id-ce-entrustVersionInfo"
|
||||
EntrustVersionInfo B "1.2.840.113533.7.65.0" "id-ce-entrustVersionInfo"
|
||||
|
||||
#.NO_EMIT
|
||||
|
||||
#.TYPE_RENAME
|
||||
|
||||
#.FIELD_RENAME
|
||||
CRLReferral/issuer crlr_issuer
|
||||
CertificatePairExactAssertion/issuedToThisCAAssertion cpea_issuedToThisCAAssertion
|
||||
CertificatePairExactAssertion/issuedByThisCAAssertion cpea_issuedByThisCAAssertion
|
||||
CertificateGroup/serialNumberRange certificateGroupNumberRange
|
||||
CertificateAssertion/subjectAltName subjectAltNameType
|
||||
EnhancedCertificateAssertion/pathToName enhancedPathToName
|
||||
CRLReferral/issuer crlr_issuer
|
||||
CertificatePairExactAssertion/issuedToThisCAAssertion cpea_issuedToThisCAAssertion
|
||||
CertificatePairExactAssertion/issuedByThisCAAssertion cpea_issuedByThisCAAssertion
|
||||
CertificateGroup/serialNumberRange certificateGroupNumberRange
|
||||
CertificateAssertion/subjectAltName subjectAltNameType
|
||||
EnhancedCertificateAssertion/pathToName enhancedPathToName
|
||||
|
||||
#.FN_PARS PolicyQualifierInfo/policyQualifierId
|
||||
FN_VARIANT = _str HF_INDEX = hf_x509ce_object_identifier_id VAL_PTR = &actx->external.direct_reference
|
||||
|
@ -170,11 +170,11 @@ EnhancedCertificateAssertion/pathToName enhancedPathToName
|
|||
|
||||
#.FN_BODY GeneralName/iPAddress
|
||||
switch (tvb_reported_length(tvb)) {
|
||||
case 4: /* IPv4 */
|
||||
case 4: /* IPv4 */
|
||||
proto_tree_add_item(tree, hf_x509ce_IPAddress_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
offset += 4;
|
||||
break;
|
||||
case 16: /* IPv6 */
|
||||
case 16: /* IPv6 */
|
||||
proto_tree_add_item(tree, hf_x509ce_IPAddress_ipv6, tvb, offset, 16, ENC_NA);
|
||||
offset += 16;
|
||||
break;
|
||||
|
@ -188,7 +188,19 @@ EnhancedCertificateAssertion/pathToName enhancedPathToName
|
|||
|
||||
#.FN_FTR GeneralName/uniformResourceIdentifier
|
||||
|
||||
PROTO_ITEM_SET_URL(actx->created_item);
|
||||
PROTO_ITEM_SET_URL(actx->created_item);
|
||||
|
||||
#.END
|
||||
|
||||
#
|
||||
# Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
#
|
||||
# Local variables:
|
||||
# c-basic-offset: 2
|
||||
# tab-width: 8
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
#
|
||||
# vi: set shiftwidth=2 tabstop=8 expandtab:
|
||||
# :indentSize=2:tabSize=8:noTabs=true:
|
||||
#
|
||||
|
|
|
@ -399,7 +399,7 @@ dissect_x509ce_T_uniformResourceIdentifier(gboolean implicit_tag _U_, tvbuff_t *
|
|||
|
||||
#line 190 "./asn1/x509ce/x509ce.cnf"
|
||||
|
||||
PROTO_ITEM_SET_URL(actx->created_item);
|
||||
PROTO_ITEM_SET_URL(actx->created_item);
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -411,11 +411,11 @@ static int
|
|||
dissect_x509ce_T_iPAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 172 "./asn1/x509ce/x509ce.cnf"
|
||||
switch (tvb_reported_length(tvb)) {
|
||||
case 4: /* IPv4 */
|
||||
case 4: /* IPv4 */
|
||||
proto_tree_add_item(tree, hf_x509ce_IPAddress_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
offset += 4;
|
||||
break;
|
||||
case 16: /* IPv6 */
|
||||
case 16: /* IPv6 */
|
||||
proto_tree_add_item(tree, hf_x509ce_IPAddress_ipv6, tvb, offset, 16, ENC_NA);
|
||||
offset += 16;
|
||||
break;
|
||||
|
@ -1946,46 +1946,46 @@ static int dissect_CicamBrandId_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, p
|
|||
#line 43 "./asn1/x509ce/packet-x509ce-template.c"
|
||||
|
||||
/* CI+ (www.ci-plus.com) defines some X.509 certificate extensions
|
||||
that use OIDs which are not officially assigned
|
||||
that use OIDs which are not officially assigned
|
||||
dissection of these extensions can be enabled temporarily using the
|
||||
functions below */
|
||||
functions below */
|
||||
void
|
||||
x509ce_enable_ciplus(void)
|
||||
{
|
||||
dissector_handle_t dh25, dh26, dh27;
|
||||
dissector_handle_t dh25, dh26, dh27;
|
||||
|
||||
dh25 = create_dissector_handle(dissect_ScramblerCapabilities_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.25", dh25);
|
||||
dh26 = create_dissector_handle(dissect_CiplusInfo_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.26", dh26);
|
||||
dh27 = create_dissector_handle(dissect_CicamBrandId_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.27", dh27);
|
||||
dh25 = create_dissector_handle(dissect_ScramblerCapabilities_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.25", dh25);
|
||||
dh26 = create_dissector_handle(dissect_CiplusInfo_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.26", dh26);
|
||||
dh27 = create_dissector_handle(dissect_CicamBrandId_PDU, proto_x509ce);
|
||||
dissector_change_string("ber.oid", "1.3.6.1.5.5.7.1.27", dh27);
|
||||
}
|
||||
|
||||
void
|
||||
x509ce_disable_ciplus(void)
|
||||
{
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.25");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.26");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.27");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.25");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.26");
|
||||
dissector_reset_string("ber.oid", "1.3.6.1.5.5.7.1.27");
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dissect_x509ce_invalidityDate_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
asn1_ctx_t asn1_ctx;
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
asn1_ctx_t asn1_ctx;
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
|
||||
return dissect_x509ce_GeneralizedTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509ce_id_ce_invalidityDate);
|
||||
return dissect_x509ce_GeneralizedTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509ce_id_ce_invalidityDate);
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_x509ce_baseUpdateTime_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
asn1_ctx_t asn1_ctx;
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
return dissect_x509ce_GeneralizedTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509ce_id_ce_baseUpdateTime);
|
||||
asn1_ctx_t asn1_ctx;
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
return dissect_x509ce_GeneralizedTime(FALSE, tvb, 0, &asn1_ctx, tree, hf_x509ce_id_ce_baseUpdateTime);
|
||||
}
|
||||
|
||||
/*--- proto_register_x509ce ----------------------------------------------*/
|
||||
|
@ -2003,7 +2003,7 @@ void proto_register_x509ce(void) {
|
|||
NULL, HFILL }},
|
||||
{ &hf_x509ce_object_identifier_id,
|
||||
{ "Id", "x509ce.id", FT_OID, BASE_NONE, NULL, 0,
|
||||
"Object identifier Id", HFILL }},
|
||||
"Object identifier Id", HFILL }},
|
||||
{ &hf_x509ce_IPAddress_ipv4,
|
||||
{ "iPAddress", "x509ce.IPAddress.ipv4", FT_IPv4, BASE_NONE, NULL, 0,
|
||||
"IPv4 address", HFILL }},
|
||||
|
@ -2934,7 +2934,20 @@ void proto_reg_handoff_x509ce(void) {
|
|||
|
||||
/*--- End of included file: packet-x509ce-dis-tab.c ---*/
|
||||
#line 131 "./asn1/x509ce/packet-x509ce-template.c"
|
||||
register_ber_oid_dissector("2.5.29.24", dissect_x509ce_invalidityDate_callback, proto_x509ce, "id-ce-invalidityDate");
|
||||
register_ber_oid_dissector("2.5.29.51", dissect_x509ce_baseUpdateTime_callback, proto_x509ce, "id-ce-baseUpdateTime");
|
||||
register_ber_oid_dissector("2.5.29.24", dissect_x509ce_invalidityDate_callback, proto_x509ce, "id-ce-invalidityDate");
|
||||
register_ber_oid_dissector("2.5.29.51", dissect_x509ce_baseUpdateTime_callback, proto_x509ce, "id-ce-baseUpdateTime");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local Variables:
|
||||
* c-basic-offset: 2
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=2 tabstop=8 expandtab:
|
||||
* :indentSize=2:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
|
@ -93,3 +93,15 @@ void x509ce_disable_ciplus(void);
|
|||
|
||||
#endif /* PACKET_X509CE_H */
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local Variables:
|
||||
* c-basic-offset: 2
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=2 tabstop=8 expandtab:
|
||||
* :indentSize=2:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue