rpms/dumpasn1/devel dumpasn1.c, NONE, 1.1 dumpasn1.cfg, NONE, 1.1 dumpasn1.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ville Skytta (scop) fedora-extras-commits at redhat.com
Mon Aug 15 20:12:58 UTC 2005


Author: scop

Update of /cvs/extras/rpms/dumpasn1/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30682/devel

Modified Files:
	.cvsignore sources 
Added Files:
	dumpasn1.c dumpasn1.cfg dumpasn1.spec 
Log Message:
auto-import dumpasn1-20050404-0.1 on branch devel from dumpasn1-20050404-0.1.src.rpm
Initial import (#165497).


--- NEW FILE dumpasn1.c ---
/* ASN.1 object dumping code, copyright Peter Gutmann
   <pgut001 at cs.auckland.ac.nz>, based on ASN.1 dump program by David Kemp
   <dpkemp at missi.ncsc.mil>, with contributions from various people including
   Matthew Hamrick <hamrick at rsa.com>, Bruno Couillard
   <bcouillard at chrysalis-its.com>, Hallvard Furuseth
   <h.b.furuseth at usit.uio.no>, Geoff Thorpe <geoff at raas.co.nz>, David Boyce
   <d.boyce at isode.com>, John Hughes <john.hughes at entegrity.com>, Life is hard,
   and then you die <ronald at trustpoint.com>, Hans-Olof Hermansson
   <hans-olof.hermansson at postnet.se>, Tor Rustad <Tor.Rustad at bbs.no>,
   Kjetil Barvik <kjetil.barvik at bbs.no>, James Sweeny <jsweeny at us.ibm.com>,
   Chris Ridd <chris.ridd at isode.com>, and several other people whose names
   I've misplaced.  This code grew slowly over time without much design or
   planning, with features being tacked on as required.  It's not
   representative of my normal coding style.

   Available from http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c.
   Last updated 22 February 2003 (version 20030222, if you prefer it that
   way).  To build under Windows, use 'cl /MD dumpasn1.c'.  To build on OS390
   or z/OS, use '/bin/c89 -D OS390 -o dumpasn1 dumpasn1.c'.

   This version of dumpasn1 requires a config file dumpasn1.cfg to be present
   in the same location as the program itself or in a standard directory
   where binaries live (it will run without it but will display a warning
   message, you can configure the path either by hardcoding it in or using an
   environment variable as explained further down).  The config file is
   available from http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.cfg.

   This code assumes that the input data is binary, having come from a MIME-
   aware mailer or been piped through a decoding utility if the original
   format used base64 encoding.  If you need to decode it, it's recommended
   that you use a utility like uudeview, which will strip virtually any kind
   of encoding (MIME, PEM, PGP, whatever) to recover the binary original.

   You can use this code in whatever way you want, as long as you don't try
   to claim you wrote it.

   Editing notes: Tabs to 4, phasers to stun (and in case anyone wants to
   complain about that, see "Program Indentation and Comprehensiblity",
   Richard Miara, Joyce Musselman, Juan Navarro, and Ben Shneiderman,
   Communications of the ACM, Vol.26, No.11 (November 1983), p.861) */

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef OS390
  #include <unistd.h>
#endif /* OS390 */

/* The update string, printed as part of the help screen */

#define UPDATE_STRING	"22 February 2003"

/* Useful defines */

#ifndef TRUE
  #define FALSE	0
  #define TRUE	( !FALSE )
#endif /* TRUE */

/* Tandem Guardian NonStop Kernel options */

#ifdef __TANDEM
  #pragma nolist		/* Spare us the source listing, no GUI... */
  #pragma nowarn (1506)	/* Implicit type conversion: int to char etc */
#endif /* __TANDEM */

/* SunOS 4.x doesn't define seek codes or exit codes or FILENAME_MAX (it does
   define _POSIX_MAX_PATH, but in funny locations and to different values
   depending on which include file you use).  Strictly speaking this code
   isn't right since we need to use PATH_MAX, however not all systems define
   this, some use _POSIX_PATH_MAX, and then there are all sorts of variations
   and other defines that you have to check, which require about a page of
   code to cover each OS, so we just use max( FILENAME_MAX, 512 ) which
   should work for everything */

#ifndef SEEK_SET
  #define SEEK_SET	0
  #define SEEK_CUR	2
#endif /* No fseek() codes defined */
#ifndef EXIT_FAILURE
  #define EXIT_FAILURE	1
  #define EXIT_SUCCESS	( !EXIT_FAILURE )
#endif /* No exit() codes defined */
#ifndef FILENAME_MAX
  #define FILENAME_MAX	512
#else
  #if FILENAME_MAX < 128
	#undef FILENAME_MAX
	#define FILENAME_MAX	512
  #endif /* FILENAME_MAX < 128 */
#endif /* FILENAME_MAX */

/* Under Windows we can do special-case handling for paths and Unicode
   strings (although in practice it can't really handle much except
   latin-1) */

#if ( defined( _WINDOWS ) || defined( WIN32 ) || defined( _WIN32 ) || \
	  defined( __WIN32__ ) )
  #define __WIN32__
#endif /* Win32 */

/* Under Unix we can do special-case handling for paths and Unicode strings.
   Detecting Unix systems is a bit tricky but the following should find most
   versions.  This define implicitly assumes that the system has wchar_t
   support, but this is almost always the case except for very old systems,
   so it's best to default to allow-all rather than deny-all */

#if defined( linux ) || defined( __linux__ ) || defined( sun ) || \
	defined( __bsdi__ ) || defined( __FreeBSD__ ) || defined( __NetBSD__ ) || \
	defined( __OpenBSD__ ) || defined( __hpux ) || defined( _M_XENIX ) || \
	defined( __osf__ ) || defined( _AIX ) || defined( __MACH__ )
  #define __UNIX__
#endif /* Every commonly-used Unix */
#if defined( linux ) || defined( __linux__ )
  #define __USE_ISOC99
  #include <wchar.h>
#endif /* Linux */

/* For IBM mainframe OSes we use the Posix environment, so it looks like
   Unix */

#ifdef OS390
  #define __OS390__
  #define __UNIX__
#endif /* OS390 / z/OS */

/* Tandem NSK: Don't tangle with Tandem OSS, which is almost UNIX */

#ifdef __TANDEM
  #ifdef _GUARDIAN_TARGET
	#define __TANDEM_NSK__
  #else
	#define __UNIX__
  #endif /* _GUARDIAN_TARGET */
#endif /* __TANDEM */

/* Some OS's don't define the min() macro */

#ifndef min
  #define min(a,b)		( ( a ) < ( b ) ? ( a ) : ( b ) )
#endif /* !min */

/* The level of recursion can get scary for deeply-nested structures so we
   use a larger-than-normal stack under DOS */

#ifdef  __TURBOC__
  extern unsigned _stklen = 16384;
#endif /* __TURBOC__ */

/* When we dump a nested data object encapsulated within a larger object, the
   length is initially set to a magic value which is adjusted to the actual
   length once we start parsing the object */

#define LENGTH_MAGIC	177545L

/* Tag classes */

#define CLASS_MASK		0xC0	/* Bits 8 and 7 */
#define UNIVERSAL		0x00	/* 0 = Universal (defined by ITU X.680) */
#define APPLICATION		0x40	/* 1 = Application */
#define CONTEXT			0x80	/* 2 = Context-specific */
#define PRIVATE			0xC0	/* 3 = Private */

/* Encoding type */

#define FORM_MASK		0x20	/* Bit 6 */
#define PRIMITIVE		0x00	/* 0 = primitive */
#define CONSTRUCTED		0x20	/* 1 = constructed */

/* Universal tags */

#define TAG_MASK		0x1F	/* Bits 5 - 1 */
#define EOC				0x00	/*  0: End-of-contents octets */
#define BOOLEAN			0x01	/*  1: Boolean */
#define INTEGER			0x02	/*  2: Integer */
#define BITSTRING		0x03	/*  2: Bit string */
#define OCTETSTRING		0x04	/*  4: Byte string */
#define NULLTAG			0x05	/*  5: NULL */
#define OID				0x06	/*  6: Object Identifier */
#define OBJDESCRIPTOR	0x07	/*  7: Object Descriptor */
#define EXTERNAL		0x08	/*  8: External */
#define REAL			0x09	/*  9: Real */
#define ENUMERATED		0x0A	/* 10: Enumerated */
#define EMBEDDED_PDV	0x0B	/* 11: Embedded Presentation Data Value */
#define UTF8STRING		0x0C	/* 12: UTF8 string */
#define SEQUENCE		0x10	/* 16: Sequence/sequence of */
#define SET				0x11	/* 17: Set/set of */
#define NUMERICSTRING	0x12	/* 18: Numeric string */
#define PRINTABLESTRING	0x13	/* 19: Printable string (ASCII subset) */
#define T61STRING		0x14	/* 20: T61/Teletex string */
#define VIDEOTEXSTRING	0x15	/* 21: Videotex string */
#define IA5STRING		0x16	/* 22: IA5/ASCII string */
#define UTCTIME			0x17	/* 23: UTC time */
#define GENERALIZEDTIME	0x18	/* 24: Generalized time */
#define GRAPHICSTRING	0x19	/* 25: Graphic string */
#define VISIBLESTRING	0x1A	/* 26: Visible string (ASCII subset) */
#define GENERALSTRING	0x1B	/* 27: General string */
#define UNIVERSALSTRING	0x1C	/* 28: Universal string */
[...1970 lines suppressed...]
	/* Check for arguments */
	while( argc && *argv[ 0 ] == '-' && moreArgs )
		{
		char *argPtr = argv[ 0 ] + 1;

		if( !*argPtr )
			useStdin = TRUE;
		while( *argPtr )
			{
			if( isdigit( *argPtr ) )
				{
				offset = atol( argPtr );
				break;
				}
			switch( toupper( *argPtr ) )
				{
				case '-':
					moreArgs = FALSE;	/* GNU-style end-of-args flag */
					break;

				case 'A':
					printAllData = TRUE;
					break;

				case 'C':
					if( !readConfig( argPtr + 1, FALSE ) )
						exit( EXIT_FAILURE );
					while( argPtr[ 1 ] )
						argPtr++;	/* Skip rest of arg */
					break;

				case 'D':
					printDots = TRUE;
					break;

				case 'E':
					checkEncaps = FALSE;
					break;

				case 'F':
					if( ( outFile = fopen( argPtr + 1, "wb" ) ) == NULL )
						{
						perror( argPtr + 1 );
						exit( EXIT_FAILURE );
						}
					while( argPtr[ 1 ] )
						argPtr++;	/* Skip rest of arg */
					break;

				case 'I':
					shallowIndent = TRUE;
					break;

				case 'L':
					extraOIDinfo = TRUE;
					break;

				case 'H':
					doDumpHeader++;
					break;

				case 'O':
					checkCharset = TRUE;
					break;

				case 'P':
					doPure = TRUE;
					break;

				case 'R':
					reverseBitString = !reverseBitString;
					break;

				case 'S':
					doCheckOnly = TRUE;
#if defined( __WIN32__ )
					/* Under Windows we can't fclose( stdout ) because the
					   VC++ runtime reassigns the stdout handle to the next
					   open file (which is valid) but then scribbles stdout
					   garbage all over it for files larger than about 16K
					   (which isn't), so we have to make sure that the
					   stdout handle is pointed to something somewhere */
					freopen( "nul", "w", stdout );
#elif defined( __UNIX__ )
					/* Safety feature in case any Unix libc is as broken
					   as the Win32 version */
					freopen( "/dev/null", "w", stdout );
#else
					fclose( stdout );
#endif /* OS-specific bypassing of stdout */
					break;

				case 'T':
					dumpText = TRUE;
					break;

				case 'U':
					rawTimeString = TRUE;
					break;

				case 'X':
					doHexValues = TRUE;
					break;

				case 'Z':
					zeroLengthAllowed = TRUE;
					break;

				default:
					printf( "Unknown argument '%c'.\n", *argPtr );
					return( EXIT_SUCCESS );
				}
			argPtr++;
			}
		argv++;
		argc--;
		}

	/* We can't use options that perform an fseek() if reading from stdin */
	if( useStdin && ( doDumpHeader || outFile != NULL ) )
		{
		puts( "Can't use -f or -h when taking input from stdin" );
		exit( EXIT_FAILURE );
		}

	/* Check args and read the config file.  We don't bother weeding out
	   dups during the read because (a) the linear search would make the
	   process n^2, (b) during the dump process the search will terminate on
	   the first match so dups aren't that serious, and (c) there should be
	   very few dups present */
	if( argc != 1 && !useStdin )
		usageExit();
	if( !readGlobalConfig( pathPtr ) )
		exit( EXIT_FAILURE );

	/* Dump the given file */
	if( useStdin )
		inFile = stdin;
	else
		if( ( inFile = fopen( argv[ 0 ], "rb" ) ) == NULL )
			{
			perror( argv[ 0 ] );
			exit( EXIT_FAILURE );
			}
	if( useStdin )
		{
		while( offset-- )
			getc( inFile );
		}
	else
		fseek( inFile, offset, SEEK_SET );
	if( outFile != NULL )
		{
		ASN1_ITEM item;
		long length;
		int i, status;

		/* Make sure there's something there, and that it has a definite
		   length */
		status = getItem( inFile, &item );
		if( status == -1 )
			{
			puts( "Non-ASN.1 data encountered." );
			exit( EXIT_FAILURE );
			}
		if( status == 0 )
			{
			puts( "Nothing to read." );
			exit( EXIT_FAILURE );
			}
		if( item.indefinite )
			{
			puts( "Cannot process indefinite-length item." );
			exit( EXIT_FAILURE );
			}

		/* Copy the item across, first the header and then the data */
		for( i = 0; i < item.headerSize; i++ )
			putc( item.header[ i ], outFile );
		for( length = 0; length < item.length && !feof( inFile ); length++ )
			putc( getc( inFile ), outFile );
		fclose( outFile );

		fseek( inFile, offset, SEEK_SET );
		}
	printAsn1( inFile, 0, LENGTH_MAGIC, 0 );
	fclose( inFile );

	/* Print a summary of warnings/errors if it's required or appropriate */
	if( !doPure )
		{
		if( !doCheckOnly )
			fputc( '\n', stderr );
		fprintf( stderr, "%d warning%s, %d error%s.\n", noWarnings,
				( noWarnings != 1 ) ? "s" : "", noErrors,
				( noErrors != 1 ) ? "s" : "" );
		}

	return( ( noErrors ) ? noErrors : EXIT_SUCCESS );
	}


--- NEW FILE dumpasn1.cfg ---
# dumpasn1 Object Identifier configuration file, available from
# http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.cfg.  This is read by
# dumpasn1.c and is used to display information on Object Identifiers found in
# ASN.1 objects.  This is merely a list of things that you might conceivably
# find in use somewhere, and should in no way be taken as a guide to which OIDs
# to use - many of these will never been seen in the wild, or should be shot on
# sight if encountered.
#
# The format of this file is as follows:
#
# - All blank lines and lines beginning with a '#' are ignored.
# - OIDs are described by a set of attributes, of which at least the 'OID' and
#   'Description' must be present.  Optional attributes are a 'Comment' and a
#   'Warning' (to indicate that dumpasn1 will display a warning if this OID is
#   encountered).
# - Attributes are listed one per line.  The first attribute should be an 'OID'
#   attribute since this is used to denote the start of a new OID description.
#   The other attributes may be given in any order.
#
# See the rest of this file for examples of what an OID description should look
# like.

# Deutsche Telekom/Telesec

OID = 06 05 02 82 06 01 0A
Comment = Deutsche Telekom
Description = Telesec (0 2 262 1 10)

OID = 06 06 02 82 06 01 0A 00
Comment = Telesec
Description = extension (0 2 262 1 10 0)

OID = 06 06 02 82 06 01 0A 01
Comment = Telesec
Description = mechanism (0 2 262 1 10 1)

OID = 06 07 02 82 06 01 0A 01 00
Comment = Telesec mechanism
Description = authentication (0 2 262 1 10 1 0)

OID = 06 08 02 82 06 01 0A 01 00 01
Comment = Telesec authentication
Description = passwordAuthentication (0 2 262 1 10 1 0 1)

OID = 06 08 02 82 06 01 0A 01 00 02
Comment = Telesec authentication
Description = protectedPasswordAuthentication (0 2 262 1 10 1 0 2)

OID = 06 08 02 82 06 01 0A 01 00 03
Comment = Telesec authentication
Description = oneWayX509Authentication (0 2 262 1 10 1 0 3)

OID = 06 08 02 82 06 01 0A 01 00 04
Comment = Telesec authentication
Description = twoWayX509Authentication (0 2 262 1 10 1 0 4)

OID = 06 08 02 82 06 01 0A 01 00 05
Comment = Telesec authentication
Description = threeWayX509Authentication (0 2 262 1 10 1 0 5)

OID = 06 08 02 82 06 01 0A 01 00 06
Comment = Telesec authentication
Description = oneWayISO9798Authentication (0 2 262 1 10 1 0 6)

OID = 06 08 02 82 06 01 0A 01 00 07
Comment = Telesec authentication
Description = twoWayISO9798Authentication (0 2 262 1 10 1 0 7)

OID = 06 08 02 82 06 01 0A 01 00 08
Comment = Telesec authentication
Description = telekomAuthentication (0 2 262 1 10 1 0 8)

OID = 06 07 02 82 06 01 0A 01 01
Comment = Telesec mechanism
Description = signature (0 2 262 1 10 1 1)

OID = 06 08 02 82 06 01 0A 01 01 01
Comment = Telesec mechanism
Description = md4WithRSAAndISO9697 (0 2 262 1 10 1 1 1)

OID = 06 08 02 82 06 01 0A 01 01 02
Comment = Telesec mechanism
Description = md4WithRSAAndTelesecSignatureStandard (0 2 262 1 10 1 1 2)

OID = 06 08 02 82 06 01 0A 01 01 03
Comment = Telesec mechanism
Description = md5WithRSAAndISO9697 (0 2 262 1 10 1 1 3)

OID = 06 08 02 82 06 01 0A 01 01 04
Comment = Telesec mechanism
Description = md5WithRSAAndTelesecSignatureStandard (0 2 262 1 10 1 1 4)

# PKCS #1 signature with RIPEMD-160
OID = 06 08 02 82 06 01 0A 01 01 05
Comment = Telesec mechanism
Description = ripemd160WithRSAAndTelekomSignatureStandard (0 2 262 1 10 1 1 5)

# RIPEMD-160 with raw RSA (ie no padding, just 160 bytes encrypted) signature
OID = 06 08 02 82 06 01 0A 01 01 09
Comment = Telesec signature
Description = hbciRsaSignature (0 2 262 1 10 1 1 9)

OID = 06 07 02 82 06 01 0A 01 02
Comment = Telesec mechanism
Description = encryption (0 2 262 1 10 1 2)

# Specially recommended by the NSA for German use
OID = 06 08 02 82 06 01 0A 01 02 00
Comment = Telesec encryption
Description = none (0 2 262 1 10 1 2 0)

OID = 06 08 02 82 06 01 0A 01 02 01
Comment = Telesec encryption
Description = rsaTelesec (0 2 262 1 10 1 2 1)

OID = 06 08 02 82 06 01 0A 01 02 02
Comment = Telesec encryption
Description = des (0 2 262 1 10 1 2 2)

OID = 06 09 02 82 06 01 0A 01 02 02 01
Comment = Telesec encryption
Description = desECB (0 2 262 1 10 1 2 2 1)

OID = 06 09 02 82 06 01 0A 01 02 02 02
Comment = Telesec encryption
Description = desCBC (0 2 262 1 10 1 2 2 2)

OID = 06 09 02 82 06 01 0A 01 02 02 03
Comment = Telesec encryption
Description = desOFB (0 2 262 1 10 1 2 2 3)

OID = 06 09 02 82 06 01 0A 01 02 02 04
Comment = Telesec encryption
Description = desCFB8 (0 2 262 1 10 1 2 2 4)

OID = 06 09 02 82 06 01 0A 01 02 02 05
Comment = Telesec encryption
Description = desCFB64 (0 2 262 1 10 1 2 2 5)

OID = 06 08 02 82 06 01 0A 01 02 03
Comment = Telesec encryption
Description = des3 (0 2 262 1 10 1 2 3)

OID = 06 09 02 82 06 01 0A 01 02 03 01
Comment = Telesec encryption
Description = des3ECB (0 2 262 1 10 1 2 3 1)

OID = 06 09 02 82 06 01 0A 01 02 03 02
Comment = Telesec encryption
Description = des3CBC (0 2 262 1 10 1 2 3 2)

OID = 06 09 02 82 06 01 0A 01 02 03 03
Comment = Telesec encryption
Description = des3OFB (0 2 262 1 10 1 2 3 3)

OID = 06 09 02 82 06 01 0A 01 02 03 04
Comment = Telesec encryption
Description = des3CFB8 (0 2 262 1 10 1 2 3 4)

OID = 06 09 02 82 06 01 0A 01 02 03 05
Comment = Telesec encryption
Description = des3CFB64 (0 2 262 1 10 1 2 3 5)

OID = 06 08 02 82 06 01 0A 01 02 04
Comment = Telesec encryption
Description = magenta (0 2 262 1 10 1 2 4)

OID = 06 08 02 82 06 01 0A 01 02 05
Comment = Telesec encryption
Description = idea (0 2 262 1 10 1 2 5)

OID = 06 09 02 82 06 01 0A 01 02 05 01
Comment = Telesec encryption
Description = ideaECB (0 2 262 1 10 1 2 5 1)

OID = 06 09 02 82 06 01 0A 01 02 05 02
Comment = Telesec encryption
Description = ideaCBC (0 2 262 1 10 1 2 5 2)

OID = 06 09 02 82 06 01 0A 01 02 05 03
Comment = Telesec encryption
Description = ideaOFB (0 2 262 1 10 1 2 5 3)

OID = 06 09 02 82 06 01 0A 01 02 05 04
Comment = Telesec encryption
Description = ideaCFB8 (0 2 262 1 10 1 2 5 4)

OID = 06 09 02 82 06 01 0A 01 02 05 05
Comment = Telesec encryption
Description = ideaCFB64 (0 2 262 1 10 1 2 5 5)

OID = 06 07 02 82 06 01 0A 01 03
Comment = Telesec mechanism
Description = oneWayFunction (0 2 262 1 10 1 3)

OID = 06 08 02 82 06 01 0A 01 03 01
Comment = Telesec one-way function
Description = md4 (0 2 262 1 10 1 3 1)

[...5297 lines suppressed...]

OID = 06 04 67 2A 09 01
Comment = SET vendor
Description = IBM (2 23 42 9 1)

OID = 06 04 67 2A 09 02
Comment = SET vendor
Description = CyberCash (2 23 42 9 2)

OID = 06 04 67 2A 09 03
Comment = SET vendor
Description = Terisa (2 23 42 9 3)

OID = 06 04 67 2A 09 04
Comment = SET vendor
Description = RSADSI (2 23 42 9 4)

OID = 06 04 67 2A 09 05
Comment = SET vendor
Description = VeriFone (2 23 42 9 5)

OID = 06 04 67 2A 09 06
Comment = SET vendor
Description = TrinTech (2 23 42 9 6)

OID = 06 04 67 2A 09 07
Comment = SET vendor
Description = BankGate (2 23 42 9 7)

OID = 06 04 67 2A 09 08
Comment = SET vendor
Description = GTE (2 23 42 9 8)

OID = 06 04 67 2A 09 09
Comment = SET vendor
Description = CompuSource (2 23 42 9 9)

OID = 06 04 67 2A 09 0A
Comment = SET vendor
Description = Griffin (2 23 42 9 10)

OID = 06 04 67 2A 09 0B
Comment = SET vendor
Description = Certicom (2 23 42 9 11)

OID = 06 04 67 2A 09 0C
Comment = SET vendor
Description = OSS (2 23 42 9 12)

OID = 06 04 67 2A 09 0D
Comment = SET vendor
Description = TenthMountain (2 23 42 9 13)

OID = 06 04 67 2A 09 0E
Comment = SET vendor
Description = Antares (2 23 42 9 14)

OID = 06 04 67 2A 09 0F
Comment = SET vendor
Description = ECC (2 23 42 9 15)

OID = 06 04 67 2A 09 10
Comment = SET vendor
Description = Maithean (2 23 42 9 16)

OID = 06 04 67 2A 09 11
Comment = SET vendor
Description = Netscape (2 23 42 9 17)

OID = 06 04 67 2A 09 12
Comment = SET vendor
Description = Verisign (2 23 42 9 18)

OID = 06 04 67 2A 09 13
Comment = SET vendor
Description = BlueMoney (2 23 42 9 19)

OID = 06 04 67 2A 09 14
Comment = SET vendor
Description = Lacerte (2 23 42 9 20)

OID = 06 04 67 2A 09 15
Comment = SET vendor
Description = Fujitsu (2 23 42 9 21)

OID = 06 04 67 2A 09 16
Comment = SET vendor
Description = eLab (2 23 42 9 22)

OID = 06 04 67 2A 09 17
Comment = SET vendor
Description = Entrust (2 23 42 9 23)

OID = 06 04 67 2A 09 18
Comment = SET vendor
Description = VIAnet (2 23 42 9 24)

OID = 06 04 67 2A 09 19
Comment = SET vendor
Description = III (2 23 42 9 25)

OID = 06 04 67 2A 09 1A
Comment = SET vendor
Description = OpenMarket (2 23 42 9 26)

OID = 06 04 67 2A 09 1B
Comment = SET vendor
Description = Lexem (2 23 42 9 27)

OID = 06 04 67 2A 09 1C
Comment = SET vendor
Description = Intertrader (2 23 42 9 28)

OID = 06 04 67 2A 09 1D
Comment = SET vendor
Description = Persimmon (2 23 42 9 29)

OID = 06 04 67 2A 09 1E
Comment = SET vendor
Description = NABLE (2 23 42 9 30)

OID = 06 04 67 2A 09 1F
Comment = SET vendor
Description = espace-net (2 23 42 9 31)

OID = 06 04 67 2A 09 20
Comment = SET vendor
Description = Hitachi (2 23 42 9 32)

OID = 06 04 67 2A 09 21
Comment = SET vendor
Description = Microsoft (2 23 42 9 33)

OID = 06 04 67 2A 09 22
Comment = SET vendor
Description = NEC (2 23 42 9 34)

OID = 06 04 67 2A 09 23
Comment = SET vendor
Description = Mitsubishi (2 23 42 9 35)

OID = 06 04 67 2A 09 24
Comment = SET vendor
Description = NCR (2 23 42 9 36)

OID = 06 04 67 2A 09 25
Comment = SET vendor
Description = e-COMM (2 23 42 9 37)

OID = 06 04 67 2A 09 26
Comment = SET vendor
Description = Gemplus (2 23 42 9 38)

OID = 06 03 67 2A 0A
Comment = SET
Description = national (2 23 42 10)

OID = 06 05 67 2A 0A E2 00
Comment = SET national
Description = Japan (2 23 42 10 392)

# Draft SET.  These were invented for testing in pre-1.0 drafts, but have
# been used nonetheless by implementors

OID = 06 04 86 8D 6F 02
Comment = SET.  Deprecated, use (2 23 42 7 0) instead
Description = hashedRootKey (2 54 1775 2)
Warning

OID = 06 04 86 8D 6F 03
Comment = SET.  Deprecated, use (2 23 42 7 0) instead
Description = certificateType (2 54 1775 3)
Warning

OID = 06 04 86 8D 6F 04
Comment = SET.  Deprecated, use (2 23 42 7 0) instead
Description = merchantData (2 54 1775 4)
Warning

OID = 06 04 86 8D 6F 05
Comment = SET.  Deprecated, use (2 23 42 7 0) instead
Description = cardCertRequired (2 54 1775 5)
Warning

OID = 06 04 86 8D 6F 06
Comment = SET.  Deprecated, use (2 23 42 7 0) instead
Description = tunneling (2 54 1775 6)
Warning

OID = 06 04 86 8D 6F 07
Comment = SET.  Deprecated, use (2 23 42 7 0) instead
Description = setQualifier (2 54 1775 7)
Warning

OID = 06 04 86 8D 6F 63
Comment = SET.  Deprecated, use (2 23 42 7 0) instead
Description = set-data (2 54 1775 99)
Warning

# End of Fahnenstange


--- NEW FILE dumpasn1.spec ---
Name:           dumpasn1
Version:        20050404
Release:        0.1
Summary:        ASN.1 object dump utility

Group:          Development/Tools
License:        Public Domain
URL:            http://www.cs.auckland.ac.nz/~pgut001/
Source0:        http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c
Source1:        http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.cfg
Patch0:         http://ftp.debian.org/debian/pool/main/d/dumpasn1/%{name}_20030222-1.diff.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  sed >= 3.95

%description
dumpasn1 is an ASN.1 object dump program that will dump data encoded
using any of the ASN.1 encoding rules in a variety of user-specified
formats.


%prep
%setup -q -c -T
install -pm 644 %{SOURCE0} .
%patch0 -p1
sed -i -e 's|\bgcc |\$(CC) \$(RPM_OPT_FLAGS) |' Makefile
sed -i -e 's|/etc/dumpasn1/|%{_sysconfdir}/dumpasn1/|' dumpasn1.{c,1*}


%build
make %{?_smp_mflags} CC="%{__cc}"


%install
rm -rf $RPM_BUILD_ROOT
install -Dpm 755 dumpasn1 $RPM_BUILD_ROOT%{_bindir}/dumpasn1
install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/dumpasn1/dumpasn1.cfg
install -Dpm 644 dumpasn1.1 $RPM_BUILD_ROOT%{_mandir}/man1/dumpasn1.1


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc debian/README.Debian debian/copyright
%config(noreplace) %{_sysconfdir}/dumpasn1/
%{_bindir}/dumpasn1
%{_mandir}/man1/dumpasn1.1*


%changelog
* Tue Aug  9 2005 Ville Skyttä <ville.skytta at iki.fi> - 20050404-0.1
- Update to 20050404.

* Sun May 29 2005 Ville Skyttä <ville.skytta at iki.fi> - 20030222-0.1
- Rebuild for FC4.

* Mon Aug 30 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:20030222-0.fdr.1
- First build, based on Debian package.


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/dumpasn1/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	15 Aug 2005 20:12:04 -0000	1.1
+++ .cvsignore	15 Aug 2005 20:12:56 -0000	1.2
@@ -0,0 +1 @@
+dumpasn1_20030222-1.diff.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/dumpasn1/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	15 Aug 2005 20:12:04 -0000	1.1
+++ sources	15 Aug 2005 20:12:56 -0000	1.2
@@ -0,0 +1 @@
+4d3bff6213cc455af94846a0485ca743  dumpasn1_20030222-1.diff.gz




More information about the scm-commits mailing list