aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-07-22 13:11:13 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-07-22 13:11:13 +0000
commit744387f3cae9a381c87a23efab49a10b8ba7fce4 (patch)
treeded7036769863998b233702ebf6d1312e36c0c69 /asn1
parentf42a958398daccf62c08ee0836b68fda1c33998b (diff)
add the countryname attribute
svn path=/trunk/; revision=11470
Diffstat (limited to 'asn1')
-rw-r--r--asn1/x509if/packet-x509if-template.c7
-rw-r--r--asn1/x509sat/SelectedAttributeTypes.asn12
-rw-r--r--asn1/x509sat/packet-x509sat-template.c15
3 files changed, 29 insertions, 5 deletions
diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c
index 524e78750d..ad72e71737 100644
--- a/asn1/x509if/packet-x509if-template.c
+++ b/asn1/x509if/packet-x509if-template.c
@@ -74,9 +74,16 @@ dissect_hf_x509if_ATADV_attribute_id(packet_info *pinfo, proto_tree *tree, tvbuf
hf_x509if_ATADV_attribute_id, ATADV_attribute_id);
return offset;
}
+static int
+dissect_hf_x509if_ATADV_attribute_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset)
+{
+ offset=call_ber_oid_callback(ATADV_attribute_id, tvb, offset, pinfo, tree);
+ return offset;
+}
static ber_sequence AttributeTypeAndDistinguishedValue_sequence[] = {
{ BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_hf_x509if_ATADV_attribute_id },
+ { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_hf_x509if_ATADV_attribute_value },
/*XXX missing stuff here */
{ 0, 0, 0, NULL }
};
diff --git a/asn1/x509sat/SelectedAttributeTypes.asn b/asn1/x509sat/SelectedAttributeTypes.asn
index 01fd8a8161..c9b5bee61d 100644
--- a/asn1/x509sat/SelectedAttributeTypes.asn
+++ b/asn1/x509sat/SelectedAttributeTypes.asn
@@ -10,7 +10,7 @@ BEGIN
-- Directory services. Other applications may use them for their own purposes, but this will not constrain
-- extensions and modifications needed to maintain or improve the Directory service.
IMPORTS
- informationFramework, upperBounds, id-at, id-mr, id-avc,
+ informationFramework, upperBounds, id-mr, id-avc,
directoryAbstractService, id-pr, id-not, id-cat
FROM UsefulDefinitions {joint-iso-itu-t ds(5) module(1)
usefulDefinitions(0) 3}
@@ -944,10 +944,12 @@ CriteriaItem ::= CHOICE {
-- Object identifier assignments -
-- object identifiers assigned in other modules are shown in comments
-- Attributes
+-- (id-at copied in from UsefulDefinitions)
+id-at OBJECT IDENTIFIER ::= {joint-iso-itu-t ds(5) 4}
-- id-at-objectClass OBJECT IDENTIFIER ::= {id-at 0}
-- id-at-aliasedEntryName OBJECT IDENTIFIER ::= {id-at 1}
-- id-at-encryptedAliasedEntryName OBJECT IDENTIFIER ::=
--- {id-at 1 2}
+-- {id-at 1 2}
--
-- id-at-knowledgeInformation OBJECT IDENTIFIER ::= {id-at 2}
--
@@ -962,9 +964,9 @@ CriteriaItem ::= CHOICE {
-- id-at-serialNumber OBJECT IDENTIFIER ::= {id-at 5}
--
-- id-at-encryptedSerialNumber OBJECT IDENTIFIER ::= {id-at 5 2}
---
--- id-at-countryName OBJECT IDENTIFIER ::= {id-at 6}
---
+
+id-at-countryName OBJECT IDENTIFIER ::= {id-at 6}
+
-- id-at-encryptedCountryName OBJECT IDENTIFIER ::= {id-at 6 2}
--
-- id-at-localityName OBJECT IDENTIFIER ::= {id-at 7}
diff --git a/asn1/x509sat/packet-x509sat-template.c b/asn1/x509sat/packet-x509sat-template.c
index e0abc07264..8722808daf 100644
--- a/asn1/x509sat/packet-x509sat-template.c
+++ b/asn1/x509sat/packet-x509sat-template.c
@@ -43,6 +43,7 @@
/* Initialize the protocol and registered fields */
int proto_x509sat = -1;
+int hf_x509sat_countryName = -1;
#include "packet-x509sat-hf.c"
/* Initialize the subtree pointers */
@@ -51,11 +52,21 @@ int proto_x509sat = -1;
#include "packet-x509sat-fn.c"
+static void
+dissect_x509sat_countryName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ dissect_x509sat_CountryName(FALSE, tvb, 0, pinfo, tree, hf_x509sat_countryName);
+}
+
/*--- proto_register_x509sat ----------------------------------------------*/
void proto_register_x509sat(void) {
/* List of fields */
static hf_register_info hf[] = {
+ { &hf_x509sat_countryName,
+ { "countryName", "x509sat.countryName",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "Country Name", HFILL }},
#include "packet-x509sat-hfarr.c"
};
@@ -76,5 +87,9 @@ void proto_register_x509sat(void) {
/*--- proto_reg_handoff_x509sat -------------------------------------------*/
void proto_reg_handoff_x509sat(void) {
+ dissector_handle_t dissector_handle;
+
+ dissector_handle=create_dissector_handle(dissect_x509sat_countryName_callback, proto_x509sat);
+ dissector_add_string("ber.oid", "2.5.4.6", dissector_handle);
}