summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/pkix1explicit
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
commitc4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch)
tree93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/asn1/pkix1explicit
parentAdding upstream version 4.2.6. (diff)
downloadwireshark-upstream.tar.xz
wireshark-upstream.zip
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/pkix1explicit')
-rw-r--r--epan/dissectors/asn1/pkix1explicit/PKIX1EXPLICIT93.asn56
-rw-r--r--epan/dissectors/asn1/pkix1explicit/packet-pkix1explicit-template.c13
-rw-r--r--epan/dissectors/asn1/pkix1explicit/pkix1explicit.cnf8
3 files changed, 39 insertions, 38 deletions
diff --git a/epan/dissectors/asn1/pkix1explicit/PKIX1EXPLICIT93.asn b/epan/dissectors/asn1/pkix1explicit/PKIX1EXPLICIT93.asn
index 6cc643e6..9ee85d60 100644
--- a/epan/dissectors/asn1/pkix1explicit/PKIX1EXPLICIT93.asn
+++ b/epan/dissectors/asn1/pkix1explicit/PKIX1EXPLICIT93.asn
@@ -32,18 +32,18 @@
--
--
--NOTE: This ASN1 definition have been significantly modified from the original
---version in RFC2459 in order to accomodate the featuresets available
+--version in RFC2459 in order to accommodate the feature sets available
--in the Wireshark projects asn2wrs compiler.
--It has also been modified and structures have been commented out that
--are already implemented in the X509 dissectors.
---Dissectors present already in the X509 dissectors should be implemented in
+--Dissectors present already in the X509 dissectors should be implemented in
--the template by hand as stubs that will just call the original
--dissector functions in X509 in order not to duplicate code.
--
---Structures and constructs in this definition are uncommented and
+--Structures and constructs in this definition are uncommented and
--implemented on-demand when someone needs them.
--
---If you export new types from this file, make sure to update the
+--If you export new types from this file, make sure to update the
--pkix1explicit_exp.cnf file with the proper definitions
@@ -151,7 +151,7 @@ Extensions ::= SEQUENCE OF Extension
Extension ::= SEQUENCE {
extnId OBJECT IDENTIFIER,
critical BOOLEAN DEFAULT FALSE,
- extnValue OCTET STRING
+ extnValue OCTET STRING
}
-- contains a DER encoding of a value of type
@@ -187,7 +187,7 @@ Extension ::= SEQUENCE {
-- Certificate Revocation List
--
--CertificateList ::= SIGNED { SEQUENCE {
--- version Version OPTIONAL,
+-- version Version OPTIONAL,
-- if present, shall be v2
-- signature AlgorithmIdentifier,
-- issuer Name,
@@ -207,7 +207,7 @@ Extension ::= SEQUENCE {
-- extnValue OCTET STRING }
-- contains a DER encoding of a value of type
-- &ExtnType for the
--- extension object identified by extnId
+-- extension object identified by extnId
--
-- The following information object set is defined to constrain the
-- set of legal CRL extensions.
@@ -228,7 +228,7 @@ Extension ::= SEQUENCE {
-- extnValue OCTET STRING }
-- contains a DER encoding of a value of type
-- &ExtnType for the
--- extension object identified by extnId
+-- extension object identified by extnId
--
-- The following information object set is defined to constrain the
-- set of legal CRL entry extensions.
@@ -238,10 +238,10 @@ Extension ::= SEQUENCE {
-- invalidityDate |
-- certificateIssuer }
--
--- information object classes used in the defintion
--- of certificates and CRLs
+-- information object classes used in the definition
+-- of certificates and CRLs
--
--- Parameterized Type SIGNED
+-- Parameterized Type SIGNED
--
-- SIGNED { ToBeSigned } ::= SEQUENCE {
-- toBeSigned ToBeSigned,
@@ -257,7 +257,7 @@ Extension ::= SEQUENCE {
--AlgorithmIdentifier ::= SEQUENCE {
-- algorithm ALGORITHM.&id({SupportedAlgorithms}),
-- parameters ALGORITHM.&Type({SupportedAlgorithms}
--- { @algorithm}) OPTIONAL
+-- { @algorithm}) OPTIONAL
--}
-- Definition of ALGORITHM
@@ -284,7 +284,7 @@ Extension ::= SEQUENCE {
-- the set is specified as extensible, since additional algorithms
-- may be supported
--
---SupportedAlgorithms ALGORITHM-ID ::= { ...,
+--SupportedAlgorithms ALGORITHM-ID ::= { ...,
-- rsaPublicKey |
-- rsaSHA-1 |
-- rsaMD5 |
@@ -334,9 +334,9 @@ dhpublicnumber OBJECT IDENTIFIER ::= {
iso(1) member-body(2) us(840) ansi-x942(10046) number-type(2) 1 }
DomainParameters ::= SEQUENCE {
- p INTEGER,
- g INTEGER,
- q INTEGER,
+ p INTEGER,
+ g INTEGER,
+ q INTEGER,
j INTEGER OPTIONAL,
validationParms ValidationParms OPTIONAL }
@@ -355,7 +355,7 @@ ValidationParms ::= SEQUENCE {
-- The ASN.1 in this section supports the Name type
-- and the directoryAttribute extension
--
--- attribute data types
+-- attribute data types
--
--Attribute ::= SEQUENCE {
-- type ATTRIBUTE.&id ({SupportedAttributes}),
@@ -378,8 +378,8 @@ AttributeTypeAndValue ::= SEQUENCE {
-- This one is implemented in the template as just a call to the
-- corresponding function in x509
---Name ::= CHOICE {
--- rdnSequence RDNSequence
+--Name ::= CHOICE {
+-- rdnSequence RDNSequence
--}
@@ -478,11 +478,11 @@ RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
--
-- object identifiers for Name type and directory attribute support
--
--- Object identifier assignments
+-- Object identifier assignments
--
--id-at OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 4}
--
--- Attributes
+-- Attributes
--
--id-at-commonName OBJECT IDENTIFIER ::= {id-at 3}
--id-at-surname OBJECT IDENTIFIER ::= {id-at 4}
@@ -498,8 +498,8 @@ RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
--id-at-generationQualifier OBJECT IDENTIFIER ::= {id-at 44}
--id-at-dnQualifier OBJECT IDENTIFIER ::= {id-at 46}
--
--- Directory string type, used extensively in Name types
---Make it a PrintableString will amke it look prettier
+-- Directory string type, used extensively in Name types
+--Make it a PrintableString will make it look prettier
DirectoryString ::= PrintableString
--DirectoryString { INTEGER:maxSize } ::= CHOICE {
-- teletexString TeletexString (SIZE (1..maxSize)),
@@ -509,11 +509,11 @@ DirectoryString ::= PrintableString
-- utf8String UTF8String (SIZE(1..maxSize))
-- }
--
--- End of ASN.1 for Name type and directory attribute support
+-- End of ASN.1 for Name type and directory attribute support
--
--- The ASN.1 in this section supports X.400 style names
--- for implementations that use the x400Address component
--- of GeneralName.
+-- The ASN.1 in this section supports X.400 style names
+-- for implementations that use the x400Address component
+-- of GeneralName.
--
--ORAddress ::= SEQUENCE {
-- built-in-standard-attributes BuiltInStandardAttributes,
@@ -542,7 +542,7 @@ DirectoryString ::= PrintableString
-- personal-name [5] PersonalName OPTIONAL,
-- see also teletex-personal-name
-- organizational-unit-names [6] OrganizationalUnitNames OPTIONAL
--- see also teletex-organizational-unit-names
+-- see also teletex-organizational-unit-names
-- }
--
--CountryName ::= [APPLICATION 1] CHOICE {
diff --git a/epan/dissectors/asn1/pkix1explicit/packet-pkix1explicit-template.c b/epan/dissectors/asn1/pkix1explicit/packet-pkix1explicit-template.c
index 4de46292..ee06c6bc 100644
--- a/epan/dissectors/asn1/pkix1explicit/packet-pkix1explicit-template.c
+++ b/epan/dissectors/asn1/pkix1explicit/packet-pkix1explicit-template.c
@@ -16,6 +16,7 @@
#include <epan/asn1.h>
#include <epan/oids.h>
#include <epan/afn.h>
+#include <wsutil/array.h>
#include "packet-ber.h"
#include "packet-pkix1explicit.h"
@@ -34,12 +35,12 @@ void proto_register_pkix1explicit(void);
void proto_reg_handoff_pkix1explicit(void);
/* Initialize the protocol and registered fields */
-static int proto_pkix1explicit = -1;
-static int hf_pkix1explicit_object_identifier_id = -1;
-static int hf_pkix1explicit_addressFamily_afn = -1;
-static int hf_pkix1explicit_addressFamily_safi = -1;
+static int proto_pkix1explicit;
+static int hf_pkix1explicit_object_identifier_id;
+static int hf_pkix1explicit_addressFamily_afn;
+static int hf_pkix1explicit_addressFamily_safi;
-static int ett_pkix1explicit_addressFamily = -1;
+static int ett_pkix1explicit_addressFamily;
#include "packet-pkix1explicit-hf.c"
@@ -108,7 +109,7 @@ void proto_register_pkix1explicit(void) {
};
/* List of subtrees */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pkix1explicit_addressFamily,
#include "packet-pkix1explicit-ettarr.c"
};
diff --git a/epan/dissectors/asn1/pkix1explicit/pkix1explicit.cnf b/epan/dissectors/asn1/pkix1explicit/pkix1explicit.cnf
index c40477d4..ab2cfff4 100644
--- a/epan/dissectors/asn1/pkix1explicit/pkix1explicit.cnf
+++ b/epan/dissectors/asn1/pkix1explicit/pkix1explicit.cnf
@@ -57,13 +57,13 @@ Extensions B "1.2.840.113549.1.9.14" "pkcs-9-at-extensionRequest"
#.FN_BODY Extension/extnId
%(DEFAULT_BODY)s
- actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE;
+ actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? true : false;
#.FN_BODY Extension/extnValue
- gint8 appclass;
+ int8_t appclass;
bool pc, ind;
- gint32 tag;
- guint32 len;
+ int32_t tag;
+ uint32_t len;
/* skip past the T and L */
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &appclass, &pc, &tag);
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);