From be2c91c111db173fb330feeb0da4157c0e68c9af Mon Sep 17 00:00:00 2001 From: krj Date: Sat, 10 Oct 2009 12:43:47 +0000 Subject: logotype-cert-extn -> logotypecertextn to make directory name consistent with filenames git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30471 f5534014-38df-0310-8fa8-9805f1628bb7 --- asn1/logotypecertextn/LogotypeCertExtn.asn | 117 +++++++++++++++++++++ asn1/logotypecertextn/Makefile.am | 26 +++++ asn1/logotypecertextn/Makefile.common | 54 ++++++++++ asn1/logotypecertextn/Makefile.nmake | 29 +++++ asn1/logotypecertextn/logotypecertextn.cnf | 30 ++++++ .../packet-logotypecertextn-template.c | 82 +++++++++++++++ .../packet-logotypecertextn-template.h | 32 ++++++ 7 files changed, 370 insertions(+) create mode 100644 asn1/logotypecertextn/LogotypeCertExtn.asn create mode 100644 asn1/logotypecertextn/Makefile.am create mode 100644 asn1/logotypecertextn/Makefile.common create mode 100644 asn1/logotypecertextn/Makefile.nmake create mode 100644 asn1/logotypecertextn/logotypecertextn.cnf create mode 100644 asn1/logotypecertextn/packet-logotypecertextn-template.c create mode 100644 asn1/logotypecertextn/packet-logotypecertextn-template.h (limited to 'asn1/logotypecertextn') diff --git a/asn1/logotypecertextn/LogotypeCertExtn.asn b/asn1/logotypecertextn/LogotypeCertExtn.asn new file mode 100644 index 0000000000..babaaa20f8 --- /dev/null +++ b/asn1/logotypecertextn/LogotypeCertExtn.asn @@ -0,0 +1,117 @@ +-- This ASN.1 module was taken from RFC3709. +-- +-- 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/logotypecertextn/Makefile.am b/asn1/logotypecertextn/Makefile.am new file mode 100644 index 0000000000..462af31e88 --- /dev/null +++ b/asn1/logotypecertextn/Makefile.am @@ -0,0 +1,26 @@ +# $Id$ +# +# +# Wireshark - Network traffic analyzer +# By Gerald Combs +# 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. + + +include ../Makefile.preinc +include Makefile.common +include ../Makefile.inc + diff --git a/asn1/logotypecertextn/Makefile.common b/asn1/logotypecertextn/Makefile.common new file mode 100644 index 0000000000..f712e85eec --- /dev/null +++ b/asn1/logotypecertextn/Makefile.common @@ -0,0 +1,54 @@ +# $Id$ +# +# +# Wireshark - Network traffic analyzer +# By Gerald Combs +# 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. + + +PROTOCOL_NAME=logotypecertextn + +DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c \ + packet-$(PROTOCOL_NAME).h + + +EXT_ASN_FILE_LIST = + +ASN_FILE_LIST = \ + LogotypeCertExtn.asn + +# The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn +# files do not exist # for all protocols: Please add/remove as required. +EXTRA_DIST = \ + Makefile.nmake \ + $(ASN_FILE_LIST) \ + packet-$(PROTOCOL_NAME)-template.c \ + packet-$(PROTOCOL_NAME)-template.h \ + $(PROTOCOL_NAME).cnf + +SRC_FILES = \ + $(EXTRA_DIST) \ + $(EXT_ASN_FILE_LIST) + +A2W_FLAGS= -b + +EXTRA_CNF= \ + ../x509af/x509af-exp.cnf + +../x509af/x509af-exp.cnf: + (cd ../x509af && $(MAKE_CNF_EXPORT)) + diff --git a/asn1/logotypecertextn/Makefile.nmake b/asn1/logotypecertextn/Makefile.nmake new file mode 100644 index 0000000000..5a32997c60 --- /dev/null +++ b/asn1/logotypecertextn/Makefile.nmake @@ -0,0 +1,29 @@ +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id$ +# +# +# Wireshark - Network traffic analyzer +# By Gerald Combs +# 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. + + +include ../../config.nmake +include ../Makefile.preinc.nmake +include Makefile.common +include ../Makefile.inc.nmake + diff --git a/asn1/logotypecertextn/logotypecertextn.cnf b/asn1/logotypecertextn/logotypecertextn.cnf new file mode 100644 index 0000000000..576126346c --- /dev/null +++ b/asn1/logotypecertextn/logotypecertextn.cnf @@ -0,0 +1,30 @@ +# logotypecertextn.cnf +# LogotypeCertExtn conformation file + +# $Id$ + +#.IMPORT ../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" + +#.FN_FTR LogotypeDetails/logotypeURI/_item + PROTO_ITEM_SET_URL(actx->created_item); + +#.FN_FTR LogotypeReference/refStructURI/_item + PROTO_ITEM_SET_URL(actx->created_item); + +#.NO_EMIT + +#.TYPE_RENAME + +#.FIELD_RENAME + +#.END + diff --git a/asn1/logotypecertextn/packet-logotypecertextn-template.c b/asn1/logotypecertextn/packet-logotypecertextn-template.c new file mode 100644 index 0000000000..d4a08b2ccf --- /dev/null +++ b/asn1/logotypecertextn/packet-logotypecertextn-template.c @@ -0,0 +1,82 @@ +/* packet-logotypecertextn.c + * Routines for RFC3709 Logotype Certificate Extensions packet dissection + * Ronnie Sahlberg 2004 + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * 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 +#include + +#include +#include + +#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/logotypecertextn/packet-logotypecertextn-template.h b/asn1/logotypecertextn/packet-logotypecertextn-template.h new file mode 100644 index 0000000000..e129edcdc0 --- /dev/null +++ b/asn1/logotypecertextn/packet-logotypecertextn-template.h @@ -0,0 +1,32 @@ +/* packet-logotypecertextn.h + * Routines for RFC3907 Logotype Certificate Extensions packet dissection + * Ronnie Sahlberg 2004 + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * 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 */ + -- cgit v1.2.3