aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2004-11-26 00:56:22 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2004-11-26 00:56:22 +0000
commitaffcce099a94306a36504aeb12128e24939c7e3d (patch)
tree7f130ff7c9de02e55560498e711fb7bd4527872f /asn1
parent92b8ca036b0dce5afa2dec4321444f22502eaac6 (diff)
New protocol: RFC3709 LogotypeCertificateExtensions
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12606 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1')
-rw-r--r--asn1/logotype-cert-extn/LogotypeCertExtn.asn119
-rwxr-xr-xasn1/logotype-cert-extn/Makefile5
-rw-r--r--asn1/logotype-cert-extn/logotype-cert-extn.cnf27
-rw-r--r--asn1/logotype-cert-extn/packet-logotype-cert-extn-template.c82
-rw-r--r--asn1/logotype-cert-extn/packet-logotype-cert-extn-template.h32
5 files changed, 265 insertions, 0 deletions
diff --git a/asn1/logotype-cert-extn/LogotypeCertExtn.asn b/asn1/logotype-cert-extn/LogotypeCertExtn.asn
new file mode 100644
index 0000000000..c55b0ed9bb
--- /dev/null
+++ b/asn1/logotype-cert-extn/LogotypeCertExtn.asn
@@ -0,0 +1,119 @@
+-- This ASN.1 module was taken from RFC3709 and modified to fit through Ethereals
+-- ANS2ETH compiler
+--
+-- The copyright statement of the RFC as follows :
+--
+-- Full Copyright Statement
+--
+-- Copyright (C) The Internet Society (2004). This document is subject
+-- to the rights, licenses and restrictions contained in BCP 78 and
+-- except as set forth therein, the authors retain all their rights.
+--
+-- This document and the information contained herein are provided on an
+-- "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
+-- REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
+-- INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
+-- IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+-- THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+-- WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+LogotypeCertExtn
+ { iso(1) identified-organization(3) dod(6) internet(1)
+ security(5) mechanisms(5) pkix(7) id-mod(0)
+ id-mod-logotype(22) }
+
+DEFINITIONS IMPLICIT TAGS ::=
+BEGIN
+
+IMPORTS
+ AlgorithmIdentifier FROM AuthenticationFramework -- RFC 3280
+ { iso(1) identified-organization(3) dod(6) internet(1)
+ security(5) mechanisms(5) pkix(7) id-mod(0)
+ id-pkix1-explicit(18) };
+
+
+-- Logotype Extension OID
+--
+--id-pe-logotype OBJECT IDENTIFIER ::=
+-- { iso(1) identified-organization(3) dod(6) internet(1)
+-- security(5) mechanisms(5) pkix(7) id-pe(1) 12 }
+--
+
+-- Logotype Extension Syntax
+
+LogotypeExtn ::= SEQUENCE {
+ communityLogos [0] EXPLICIT SEQUENCE OF LogotypeInfo OPTIONAL,
+ issuerLogo [1] EXPLICIT LogotypeInfo OPTIONAL,
+ subjectLogo [2] EXPLICIT LogotypeInfo OPTIONAL,
+ otherLogos [3] EXPLICIT SEQUENCE OF OtherLogotypeInfo OPTIONAL }
+
+LogotypeInfo ::= CHOICE {
+ direct [0] LogotypeData,
+ indirect [1] LogotypeReference }
+
+LogotypeData ::= SEQUENCE {
+ image SEQUENCE OF LogotypeImage OPTIONAL,
+ audio [1] SEQUENCE OF LogotypeAudio OPTIONAL }
+
+LogotypeImage ::= SEQUENCE {
+ imageDetails LogotypeDetails,
+ imageInfo LogotypeImageInfo OPTIONAL }
+
+LogotypeAudio ::= SEQUENCE {
+ audioDetails LogotypeDetails,
+ audioInfo LogotypeAudioInfo OPTIONAL }
+
+LogotypeDetails ::= SEQUENCE {
+ mediaType IA5String, -- MIME media type name and optional
+ -- parameters
+ logotypeHash SEQUENCE SIZE (1..MAX) OF HashAlgAndValue,
+ logotypeURI SEQUENCE SIZE (1..MAX) OF IA5String }
+
+LogotypeImageInfo ::= SEQUENCE {
+ type [0] LogotypeImageType DEFAULT color,
+ fileSize INTEGER, -- In octets
+ xSize INTEGER, -- Horizontal size in pixels
+ ySize INTEGER, -- Vertical size in pixels
+ resolution LogotypeImageResolution OPTIONAL,
+ language [4] IA5String OPTIONAL } -- RFC 3066 Language Tag
+
+LogotypeImageType ::= INTEGER { grayScale(0), color(1) }
+
+LogotypeImageResolution ::= CHOICE {
+ numBits [1] INTEGER, -- Resolution in bits
+ tableSize [2] INTEGER } -- Number of colors or grey tones
+
+LogotypeAudioInfo ::= SEQUENCE {
+ fileSize INTEGER, -- In octets
+ playTime INTEGER, -- In milliseconds
+ channels INTEGER, -- 1=mono, 2=stereo, 4=quad
+ sampleRate [3] INTEGER OPTIONAL, -- Samples per second
+ language [4] IA5String OPTIONAL } -- RFC 3066 Language Tag
+
+OtherLogotypeInfo ::= SEQUENCE {
+ logotypeType OBJECT IDENTIFIER,
+ info LogotypeInfo }
+
+LogotypeReference ::= SEQUENCE {
+ refStructHash SEQUENCE SIZE (1..MAX) OF HashAlgAndValue,
+ refStructURI SEQUENCE SIZE (1..MAX) OF IA5String }
+ -- Places to get the same "LTD" file
+
+-- Note: The content of referenced "LTD" files is defined by the
+-- LogotypeData type
+
+HashAlgAndValue ::= SEQUENCE {
+ hashAlg AlgorithmIdentifier,
+ hashValue OCTET STRING }
+
+-- Other logotype type OIDs
+--
+--id-logo OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
+-- dod(6) internet(1) security(5) mechanisms(5) pkix(7) 20 }
+--
+--id-logo-loyalty OBJECT IDENTIFIER ::= { id-logo 1 }
+--
+--id-logo-background OBJECT IDENTIFIER ::= { id-logo 2 }
+--
+
+END
diff --git a/asn1/logotype-cert-extn/Makefile b/asn1/logotype-cert-extn/Makefile
new file mode 100755
index 0000000000..ec035418cf
--- /dev/null
+++ b/asn1/logotype-cert-extn/Makefile
@@ -0,0 +1,5 @@
+
+../../epan/dissectors/packet-ess.c : ../../tools/asn2eth.py LogotypeCertExtn.asn packet-logotype-cert-extn-template.c packet-logotype-cert-extn-template.h logotype-cert-extn.cnf
+ python ../../tools/asn2eth.py -X -b -k -e -p logotypecertextn -c logotype-cert-extn.cnf -s packet-logotype-cert-extn-template LogotypeCertExtn.asn
+ cp packet-logotypecertextn.* ../../epan/dissectors
+
diff --git a/asn1/logotype-cert-extn/logotype-cert-extn.cnf b/asn1/logotype-cert-extn/logotype-cert-extn.cnf
new file mode 100644
index 0000000000..82557f07b4
--- /dev/null
+++ b/asn1/logotype-cert-extn/logotype-cert-extn.cnf
@@ -0,0 +1,27 @@
+# logotype-cert-extn.cnf
+# LogotypeCertExtn conformation file
+
+# $Id: logotype-cert-extn.cnf 12558 2004-11-21 10:16:06Z sahlberg $
+
+#.MODULE_IMPORT
+AuthenticationFramework x509af
+
+#.INCLUDE ../x509af/x509af-exp.cnf
+
+#.EXPORTS
+
+#.PDU
+
+#.REGISTER
+LogotypeExtn B "1.3.6.1.5.5.7.1.12" "id-pe-logotype"
+LogotypeExtn B "1.3.6.1.5.5.7.20.1" "id-pe-logo-loyalty"
+LogotypeExtn B "1.3.6.1.5.5.7.20.2" "id-pe-logo-background"
+
+#.NO_EMIT
+
+#.TYPE_RENAME
+
+#.FIELD_RENAME
+
+#.END
+
diff --git a/asn1/logotype-cert-extn/packet-logotype-cert-extn-template.c b/asn1/logotype-cert-extn/packet-logotype-cert-extn-template.c
new file mode 100644
index 0000000000..c891fb9ecf
--- /dev/null
+++ b/asn1/logotype-cert-extn/packet-logotype-cert-extn-template.c
@@ -0,0 +1,82 @@
+/* packet-logotype-cert-extn.c
+ * Routines for RFC3709 Logotype Certificate Extensions packet dissection
+ * Ronnie Sahlberg 2004
+ *
+ * $Id: packet-logotype-cert-extn-template.c 12438 2004-10-30 02:36:58Z sahlberg $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-ber.h"
+#include "packet-logotypecertextn.h"
+#include "packet-x509af.h"
+
+#define PNAME "Logotype Certificate Extensions"
+#define PSNAME "LogotypeCertExtn"
+#define PFNAME "logotypecertextn"
+
+/* Initialize the protocol and registered fields */
+static int proto_logotypecertextn = -1;
+#include "packet-logotypecertextn-hf.c"
+
+/* Initialize the subtree pointers */
+#include "packet-logotypecertextn-ett.c"
+
+
+#include "packet-logotypecertextn-fn.c"
+
+
+/*--- proto_register_logotypecertextn ----------------------------------------------*/
+void proto_register_logotypecertextn(void) {
+
+ /* List of fields */
+ static hf_register_info hf[] = {
+#include "packet-logotypecertextn-hfarr.c"
+ };
+
+ /* List of subtrees */
+ static gint *ett[] = {
+#include "packet-logotypecertextn-ettarr.c"
+ };
+
+ /* Register protocol */
+ proto_logotypecertextn = proto_register_protocol(PNAME, PSNAME, PFNAME);
+
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_logotypecertextn, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+}
+
+
+/*--- proto_reg_handoff_logotypecertextn -------------------------------------------*/
+void proto_reg_handoff_logotypecertextn(void) {
+#include "packet-logotypecertextn-dis-tab.c"
+}
+
diff --git a/asn1/logotype-cert-extn/packet-logotype-cert-extn-template.h b/asn1/logotype-cert-extn/packet-logotype-cert-extn-template.h
new file mode 100644
index 0000000000..c7ecbd09a0
--- /dev/null
+++ b/asn1/logotype-cert-extn/packet-logotype-cert-extn-template.h
@@ -0,0 +1,32 @@
+/* packet-logotype-cert-extn.h
+ * Routines for RFC3907 Logotype Certificate Extensions packet dissection
+ * Ronnie Sahlberg 2004
+ *
+ * $Id: packet-logotype-cert-extn-template.h 12437 2004-10-30 02:18:44Z sahlberg $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef PACKET_LOGOTYPE_CERT_EXTN_H
+#define PACKET_LOGOTYPE_CERT_EXTN_H
+
+/*#include "packet-logotypecertextn-exp.h"*/
+
+#endif /* PACKET_LOGOTYPE_CERT_EXTN_H */
+