aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/pkix1explicit
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-11-29 08:43:19 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-11-29 08:43:19 +0000
commit8b4a9a21e1d627de11bd9625a075b06ef88e0b58 (patch)
tree7d3d3fdbb99fa58c427907084fad3a5f99544ac9 /asn1/pkix1explicit
parent748784dc6b3e6177da49c331075bc56ba1204e35 (diff)
export some more sympols from PKIX1EXPLICIT
svn path=/trunk/; revision=12617
Diffstat (limited to 'asn1/pkix1explicit')
-rw-r--r--asn1/pkix1explicit/PKIX1EXPLICIT93.asn34
-rw-r--r--asn1/pkix1explicit/packet-pkix1explicit-template.c15
-rw-r--r--asn1/pkix1explicit/packet-pkix1explicit-template.h1
-rw-r--r--asn1/pkix1explicit/pkix1explicit.cnf33
-rw-r--r--asn1/pkix1explicit/pkix1explicit_exp.cnf16
5 files changed, 71 insertions, 28 deletions
diff --git a/asn1/pkix1explicit/PKIX1EXPLICIT93.asn b/asn1/pkix1explicit/PKIX1EXPLICIT93.asn
index 002656a38e..b2adfebb6a 100644
--- a/asn1/pkix1explicit/PKIX1EXPLICIT93.asn
+++ b/asn1/pkix1explicit/PKIX1EXPLICIT93.asn
@@ -146,13 +146,14 @@ CertificateSerialNumber ::= INTEGER
+Extensions ::= SEQUENCE OF Extension
+
+Extension ::= SEQUENCE {
+ extnId OBJECT IDENTIFIER,
+ critical BOOLEAN DEFAULT FALSE,
+ extnValue OCTET STRING
+}
---Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
---
---Extension ::= SEQUENCE {
--- extnId EXTENSION.&id ({ExtensionSet}),
--- critical BOOLEAN DEFAULT FALSE,
--- extnValue OCTET STRING }
-- contains a DER encoding of a value of type
-- &ExtnType for the
-- extension object identified by extnId
@@ -360,11 +361,12 @@ ValidationParms ::= SEQUENCE {
-- type ATTRIBUTE.&id ({SupportedAttributes}),
-- values SET SIZE (1 .. MAX) OF ATTRIBUTE.&Type
-- ({SupportedAttributes}{@type})}
---
---AttributeTypeAndValue ::= SEQUENCE {
--- type ATTRIBUTE.&id ({SupportedAttributes}),
--- value ATTRIBUTE.&Type ({SupportedAttributes}{@type})}
---
+
+AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY
+}
+
-- naming data types --
--
@@ -376,12 +378,10 @@ ValidationParms ::= SEQUENCE {
--}
---
---RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
---
---RelativeDistinguishedName ::=
--- SET SIZE (1 .. MAX) OF AttributeTypeAndValue
---
+RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+
+RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
+
--ID ::= OBJECT IDENTIFIER
--
-- ATTRIBUTE information object class specification
diff --git a/asn1/pkix1explicit/packet-pkix1explicit-template.c b/asn1/pkix1explicit/packet-pkix1explicit-template.c
index 6ca53a394e..0361ac38b5 100644
--- a/asn1/pkix1explicit/packet-pkix1explicit-template.c
+++ b/asn1/pkix1explicit/packet-pkix1explicit-template.c
@@ -39,6 +39,7 @@
#include "packet-pkix1explicit.h"
#include "packet-x509af.h"
#include "packet-x509if.h"
+#include "packet-x509ce.h"
#define PNAME "PKIX1Explitit"
#define PSNAME "PKIX1EXPLICIT"
@@ -46,26 +47,27 @@
/* Initialize the protocol and registered fields */
static int proto_pkix1explicit = -1;
+static int hf_pkix1explicit_object_identifier_id = -1;
#include "packet-pkix1explicit-hf.c"
/* Initialize the subtree pointers */
#include "packet-pkix1explicit-ett.c"
+static char object_identifier_id[64]; /*64 chars should be long enough? */
+
int
-dissect_pkix1explicit_CertificateSerialNumber(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
- offset = dissect_x509af_CertificateSerialNumber(implicit_tag, tvb, offset, pinfo, tree, hf_index);
+dissect_pkix1explicit_GeneralName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
+ offset = dissect_x509ce_GeneralName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
return offset;
}
-
int
-dissect_pkix1explicit_Name(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
+dissect_pkix1explicit_Name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
offset = dissect_x509if_Name(implicit_tag, tvb, offset, pinfo, tree, hf_index);
return offset;
}
-
int
dissect_pkix1explicit_AlgorithmIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
offset = dissect_x509af_AlgorithmIdentifier(implicit_tag, tvb, offset, pinfo, tree, hf_index);
@@ -89,6 +91,9 @@ void proto_register_pkix1explicit(void) {
/* List of fields */
static hf_register_info hf[] = {
+ { &hf_pkix1explicit_object_identifier_id,
+ { "Id", "pkix1explicit.id", FT_STRING, BASE_NONE, NULL, 0,
+ "Object identifier Id", HFILL }},
#include "packet-pkix1explicit-hfarr.c"
};
diff --git a/asn1/pkix1explicit/packet-pkix1explicit-template.h b/asn1/pkix1explicit/packet-pkix1explicit-template.h
index 798ce7f066..fa18e98f12 100644
--- a/asn1/pkix1explicit/packet-pkix1explicit-template.h
+++ b/asn1/pkix1explicit/packet-pkix1explicit-template.h
@@ -27,6 +27,7 @@
int dissect_pkix1explicit_CertificateSerialNumber(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_pkix1explicit_Name(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
+int dissect_pkix1explicit_GeneralName(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_pkix1explicit_AlgorithmIdentifier(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index);
int dissect_pkix1explicit_SubjectPublicKeyInfo(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
diff --git a/asn1/pkix1explicit/pkix1explicit.cnf b/asn1/pkix1explicit/pkix1explicit.cnf
index cce859da1e..e19ea9d447 100644
--- a/asn1/pkix1explicit/pkix1explicit.cnf
+++ b/asn1/pkix1explicit/pkix1explicit.cnf
@@ -6,10 +6,15 @@
#.MODULE_IMPORT
#.EXPORTS
-
+AttributeTypeAndValue
+CertificateSerialNumber
+DirectoryString
+Extension
+Extensions
+RelativeDistinguishedName
+RDNSequence
TeletexDomainDefinedAttribute
TerminalType
-DirectoryString
#.REGISTER
DirectoryString B "1.3.6.1.5.5.7.2.1" "id-qt-cps"
@@ -19,8 +24,6 @@ DomainParameters B "1.2.840.10046.2.1" "dhpublicnumber"
#.NO_EMIT
-CertificateSerialNumber
-
#.TYPE_RENAME
#.FIELD_RENAME
@@ -28,5 +31,27 @@ CertificateSerialNumber
#.FN_BODY DirectoryString
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
+#.FN_BODY AttributeTypeAndValue/value
+ offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
+ hf_pkix1explicit_object_identifier_id, object_identifier_id);
+
+#.FN_BODY AttributeTypeAndValue/value
+ offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+
+#.FN_BODY Extension/extnId
+ offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
+ hf_pkix1explicit_object_identifier_id, object_identifier_id);
+
+#.FN_BODY Extension/extnValue
+ guint8 class;
+ gboolean pc, ind;
+ guint32 tag;
+ guint32 len;
+ /* skip past the T and L */
+ offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
+ offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
+ offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+
+
#.END
diff --git a/asn1/pkix1explicit/pkix1explicit_exp.cnf b/asn1/pkix1explicit/pkix1explicit_exp.cnf
index 8066c06ba2..7bcd97ecd0 100644
--- a/asn1/pkix1explicit/pkix1explicit_exp.cnf
+++ b/asn1/pkix1explicit/pkix1explicit_exp.cnf
@@ -1,20 +1,32 @@
#.IMPORT_TAG
AlgorithmIdentifier BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
+AttributeTypeAndValue BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
CertificateSerialNumber BER_CLASS_UNI BER_UNI_TAG_INTEGER
+DirectoryString BER_CLASS_UNI BER_UNI_TAG_PrintableString
+Extension BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
+Extensions BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
+GeneralName BER_CLASS_CON -1/*choice*/
Name BER_CLASS_ANY -1
+RDNSequence BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
+RelativeDistinguishedName BER_CLASS_UNI BER_UNI_TAG_SET
SubjectPublicKeyInfo BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
TeletexDomainDefinedAttribute BER_CLASS_UNI BER_UNI_TAG_SEQUENCE
TerminalType BER_CLASS_UNI BER_UNI_TAG_INTEGER
-DirectoryString BER_CLASS_UNI BER_UNI_TAG_PrintableString
#.END
#.TYPE_ATTR
+AttributeTypeAndValue TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
CertificateSerialNumber TYPE = FT_INT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
+DirectoryString TYPE = FT_STRING DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
+Extension TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
+Extensions TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
+GeneralName TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
Name TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
+RDNSequence TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
+RelativeDistinguishedName TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
SubjectPublicKeyInfo TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
TeletexDomainDefinedAttribute TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
TerminalType TYPE = FT_INT32 DISPLAY = BASE_DEC STRINGS = NULL BITMASK = 0
#.END
-