debian/0000755000000000000000000000000012251321347007166 5ustar debian/manpages0000644000000000000000000000002212251315435010677 0ustar debian/dumpasn1.1 debian/rules0000755000000000000000000000143312251321331010240 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 %: dh $@ --parallel dumpasn1: dumpasn1.o $(CC) -o dumpasn1 dumpasn1.o $(CFLAGS) $(LDFLAGS) dumpasn1.o: dumpasn1.c $(CC) -o dumpasn1.o -DDEBIAN $(CPPFLAGS) $(CFLAGS) -c dumpasn1.c override_dh_auto_build: dumpasn1 override_dh_clean: dh_clean dumpasn1.o override_dh_install: dh_install dumpasn1 $(DESTDIR)/usr/bin/ dh_install dumpasn1.cfg $(DESTDIR)/etc/dumpasn1/ get-orig-source: ./debian/get-orig-source #debian/dumpasn1.1: debian/dumpasn1.1.xml # xmltoman $< > $@ VER_FULL = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-) debian/dumpasn1.1: debian/dumpasn1.1.in help2man --include=$< --output=$@ \ --name="ASN.1 object dump/syntax check program" \ --no-info `basename $@ .1` --version-string=$(VER_FULL) debian/changelog0000644000000000000000000000434112251321331011033 0ustar dumpasn1 (20130608-1) unstable; urgency=low * New upstream release: 20130608 * Refresh patches * Redo man page generation (use help2man) -- Mathieu Malaterre Mon, 09 Dec 2013 11:31:19 +0100 dumpasn1 (20120521-1) unstable; urgency=low * New upstream release: 20120521 * Really use hardening flags. Thanks to Simon Ruderich for patch. Closes: #672709 * Remove d/patches/bug429961.patch another fix has been applied upstream. * Apply patch to get UNICODE printing working. Closes: #348856 * d/rules fix clean rule -- Mathieu Malaterre Wed, 13 Jun 2012 11:11:47 +0200 dumpasn1 (20101112-2) unstable; urgency=low * Take over dumpasn1 maintenance. Closes: #672300 Thanks Pierre Habouzit for the hard work ! * Move to collab-maint (svn). Update VCS urls * Add Homepage in d/control * Bump Std-Vers to 3.9.3, no changes needed * Fix Off-By-One overflow. Closes: #429961 * Use hardening flags (d/compat: 9) -- Mathieu Malaterre Fri, 11 May 2012 18:42:50 +0200 dumpasn1 (20101112-1) unstable; urgency=low * New upstream release (Closes: #610934): + Large numbers are now printed properly (Closes: #573813). * Migrate to dh 8. * Bump standards version to 3.9.1. * Switch to dpkg-source 3.0 (quilt) format. -- Pierre Habouzit Sat, 19 Mar 2011 09:49:14 +0100 dumpasn1 (20030222-3) unstable; urgency=low * QA upload. * Set Maintainer to QA Group. The previous Maintainer email is bouncing. -- Lucas Nussbaum Thu, 10 Jan 2008 09:25:41 +0100 dumpasn1 (20030222-2) unstable; urgency=low * change maintainer in debian/control to debian address -- Oliver Kurth Mon, 05 Sep 2005 12:25:48 -0700 dumpasn1 (20030222-1) unstable; urgency=low * new upstream version. * fix directory permissions (closes: #239718) -- Oliver Kurth Fri, 16 Apr 2004 15:54:40 +0200 dumpasn1 (20021007-1) unstable; urgency=low * new upstream version. * added a man page. -- Oliver Kurth Tue, 15 Oct 2002 22:36:52 +0200 dumpasn1 (20020612-1) unstable; urgency=low * Initial Release. -- Oliver Kurth Mon, 2 Sep 2002 17:13:04 +0200 debian/control0000644000000000000000000000143512251315435010575 0ustar Source: dumpasn1 Section: utils Priority: optional Maintainer: Mathieu Malaterre Build-Depends: debhelper (>= 9) Homepage: http://www.cs.auckland.ac.nz/~pgut001/ Vcs-Browser: http://anonscm.debian.org/viewvc/collab-maint/deb-maint/dumpasn1/trunk/ Vcs-Svn: svn://svn.debian.org/collab-maint/deb-maint/dumpasn1/trunk Standards-Version: 3.9.3 Package: dumpasn1 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: ASN.1 object dump program An ASN.1 object dump program which will dump data encoded using any of the ASN.1 encoding rules in a variety of user-specified formats. . dumpasn1 employs a user-editable configuration file dumpasn1.cfg which provides information on ASN.1 object identifiers. Currently it covers all known security-related OIDs. debian/get-orig-source0000755000000000000000000000127012251315435012130 0ustar #!/bin/sh VER_FULL=`dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-` DEBIAN_SRC_DIR=dumpasn1-${VER_FULL} DEBIAN_SRC_TAR=dumpasn1_${VER_FULL}.orig.tar.gz mkdir $DEBIAN_SRC_DIR cd $DEBIAN_SRC_DIR wget -c http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c wget -c http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.cfg cd .. VERSION_STRING=`grep "if you prefer it that way" $DEBIAN_SRC_DIR/dumpasn1.c` VERSION=`echo $VERSION_STRING | sed -e 's/^.*\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*$/\1/'` GZIP="--best --no-name" tar czf $DEBIAN_SRC_TAR $DEBIAN_SRC_DIR rm -rf $DEBIAN_SRC_DIR if [ "$VERSION" != "$VER_FULL" ]; then echo "$VERSION vs $VER_FULL" rm $DEBIAN_SRC_TAR fi debian/clean0000644000000000000000000000002212251315435010166 0ustar dumpasn1 Makefile debian/copyright0000644000000000000000000000215312251315435011123 0ustar This package was debianized by Oliver Kurth on Mon, 2 Sep 2002 17:13:04 +0200. It was downloaded from http://www.cs.auckland.ac.nz/~pgut001/ Upstream Author: Peter Gutmann Copyright: 1997 - 2010 Peter Gutmann Excerpts from dumpasn1.c: ASN.1 object dumping code, copyright Peter Gutmann , based on ASN.1 dump program by David Kemp , with contributions from various people including Matthew Hamrick , Bruno Couillard , Hallvard Furuseth , Geoff Thorpe , David Boyce , John Hughes , Life is hard, and then you die , Hans-Olof Hermansson , Tor Rustad , Kjetil Barvik , James Sweeny , and several other people whose names I've misplaced. ... You can use this code in whatever way you want, as long as you don't try to claim you wrote it. debian/dumpasn1.1.xml0000644000000000000000000001165312251315435011606 0ustar dumpasn1 [options] file

An ASN.1 object dump program which will dump data encoded using any of the ASN.1 encoding rules in a variety of user-specified formats.

./dumpasn1.cfg, $HOME/.dumpasn1.cfg, /etc/dumpasn1/dumpasn1.cfg: This is the configuration file, it will be searched in this order. It contains OIDs commonly used.

quote from Peter Gutmann:

ASN.1 object dumping code, copyright Peter Gutmann <pgut001@cs.auckland.ac.nz>, based on ASN.1 dump program by David Kemp <dpkemp@missi.ncsc.mil>, with contributions from various people including Matthew Hamrick <hamrick@rsa.com>, Bruno Couillard <bcouillard@chrysalis-its.com>, Hallvard Furuseth <h.b.furuseth@usit.uio.no>, Geoff Thorpe <geoff@raas.co.nz>, David Boyce <d.boyce@isode.com>, John Hughes <john.hughes@entegrity.com>, Life is hard, and then you die <ronald@trustpoint.com>, Hans-Olof Hermansson <hans-olof.hermansson@postnet.se>, Tor Rustad <Tor.Rustad@bbs.no>, Kjetil Barvik <kjetil.barvik@bbs.no>, James Sweeny <jsweeny@us.ibm.com>, and several other people whose names I've misplaced.

dumpasn1 is available at

This man page was written using by Oliver Kurth for Debian.

debian/source/0000755000000000000000000000000012251321347010466 5ustar debian/source/format0000644000000000000000000000001412251315435011675 0ustar 3.0 (quilt) debian/dumpasn1.10000644000000000000000000000712712251321331011000 0ustar .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. .TH DUMPASN1 "1" "December 2013" "dumpasn1 20130608" "User Commands" .SH NAME dumpasn1 \- ASN.1 object dump/syntax check program .SH SYNOPSIS .B dumpasn1 [\fI-acdefghilmoprstuvwxz\fR] \fI\fR .SH DESCRIPTION An ASN.1 object dump program which will dump data encoded using any of the ASN.1 encoding rules in a variety of user-specified formats. .PP DumpASN1 \- ASN.1 object dump/syntax check program. Copyright Peter Gutmann 1997 \- 2012. Last updated 8 June 2013. .IP Input options: .IP \- = Take input from stdin (some options may not work properly) \- = Start bytes into the file \fB\-\-\fR = End of arg list \fB\-c\fR = Read Object Identifier info from alternate config file .IP (values will override equivalents in global config file) .IP Output options: .HP \fB\-f\fR = Dump object at offset \- to file (allows data to be .IP extracted from encapsulating objects) .HP \fB\-w\fR = Set width of output, default = 80 columns .IP Display options: .HP \fB\-a\fR = Print all data in long data blocks, not just the first 128 bytes .HP \fB\-d\fR = Print dots to show column alignment .HP \fB\-g\fR = Display ASN.1 structure outline only (no primitive objects) .HP \fB\-h\fR = Hex dump object header (tag+length) before the decoded output .HP \fB\-hh\fR = Same as \fB\-h\fR but display more of the object as hex data .HP \fB\-i\fR = Use shallow indenting, for deeply\-nested objects .HP \fB\-l\fR = Long format, display extra info about Object Identifiers .TP \fB\-m\fR = Maximum nesting level for which to display content .HP \fB\-p\fR = Pure ASN.1 output without encoding information .HP \fB\-t\fR = Display text values next to hex dump of data .HP \fB\-v\fR = Verbose mode, equivalent to \fB\-ahlt\fR .IP Format options: .HP \fB\-e\fR = Don't print encapsulated data inside OCTET/BIT STRINGs .HP \fB\-r\fR = Print bits in BIT STRING as encoded in reverse order .HP \fB\-u\fR = Don't format UTCTime/GeneralizedTime string data .HP \fB\-x\fR = Display size and offset in hex not decimal .IP Checking options: .HP \fB\-o\fR = Don't check validity of character strings hidden in octet strings .HP \fB\-s\fR = Syntax check only, don't dump ASN.1 structures .HP \fB\-z\fR = Allow zero\-length items .PP Warnings generated by deprecated OIDs require the use of '\-l' to be displayed. Program return code is the number of errors found or EXIT_SUCCESS. .SH FILES .ul $HOME/.dumpasn1.cfg, /etc/dumpasn1/dumpasn1.cfg: This is the configuration file, it will be searched in this order. It contains OIDs commonly used. .SH COMMENT This manual page was written by Mathieu Malaterre for the Debian GNU/Linux system, but may be used by others. .SH AUTHOR quote from Peter Gutmann: ASN.1 object dumping code, copyright Peter Gutmann , based on ASN.1 dump program by David Kemp , with contributions from various people including Matthew Hamrick , Bruno Couillard , Hallvard Furuseth , Geoff Thorpe , David Boyce , John Hughes , Life is hard, and then you die , Hans-Olof Hermansson , Tor Rustad , Kjetil Barvik , James Sweeny , and several other people whose names I've misplaced. dumpasn1 is available at http://www.cs.auckland.ac.nz/~pgut001/ .SH COPYRIGHT Copyright Peter Gutmann 1997 - 2012. Last updated 8 June 2013. debian/compat0000644000000000000000000000000212251315435010365 0ustar 9 debian/dirs0000644000000000000000000000002512251315435010050 0ustar usr/bin etc/dumpasn1 debian/patches/0000755000000000000000000000000012251321347010615 5ustar debian/patches/series0000644000000000000000000000004012251315435012025 0ustar bug348856.patch fixprintf.patch debian/patches/bug348856.patch0000644000000000000000000000434212251317420013115 0ustar Description: dumpasn1 doesn't properly display localized BMPString Author: Victor B. Wagner Bug-Debian: http://bugs.debian.org/348856 Reviewed-By: Mathieu Malaterre Forwarded: http://bugs.debian.org/348856#59 Index: dumpasn1-20130608/dumpasn1.c =================================================================== --- dumpasn1-20130608.orig/dumpasn1.c 2013-08-11 05:48:44.000000000 +0200 +++ dumpasn1-20130608/dumpasn1.c 2013-12-09 11:30:08.710451775 +0100 @@ -50,6 +50,7 @@ #include #include #include +#include #ifdef OS390 #include #endif /* OS390 */ @@ -1299,13 +1300,13 @@ use wcstombs() to see if anything can be displayed, if it can't we drop back to trying to display the data as non-Unicode */ -static int displayUnicode( const wchar_t wCh, const int level ) +static int displayUnicode( const wchar_t wCh[], const int level ) { char outBuf[ 8 ]; int outLen; /* Check whether we can display this character */ - outLen = wcstombs( outBuf, &wCh, 1 ); + outLen = wcstombs( outBuf, wCh, 8 ); if( outLen < 1 ) { /* Tell the caller that this can't be displayed as Unicode */ @@ -1352,13 +1353,7 @@ wChString[ 1 ] = 0; fprintf( output, "%ls", wChString ); #else - if( fwide( output, 1 ) > 0 ) - { - fputwc( wCh, output ); - fwide( output, -1 ); - } - else - fputc( wCh, output ); + fprintf( output, "%s", outBuf ); #endif } #else @@ -1843,7 +1838,7 @@ } else { - const wchar_t wCh = ( ch << 8 ) | getc( inFile ); + const wchar_t wCh[2] ={ ( ch << 8 ) | getc( inFile ),0}; if( displayUnicode( wCh, level ) ) { @@ -1855,7 +1850,7 @@ /* The value can't be displayed as Unicode, fall back to displaying it as normal text */ - ungetc( wCh & 0xFF, inFile ); + ungetc( wCh[0] & 0xFF, inFile ); } } #endif /* __WIN32__ || __UNIX__ || __OS390__ */ @@ -3026,7 +3021,14 @@ #endif /* __OS390__ */ long offset = 0; int moreArgs = TRUE, doCheckOnly = FALSE; - + + setlocale(LC_ALL, +#ifdef __WIN32__ + ".OCP" +#else + "" +#endif +); #ifdef __OS390__ memset( pathPtr, '\0', sizeof( pathPtr ) ); getcwd( pathPtr, sizeof( pathPtr ) ); debian/patches/fixprintf.patch0000644000000000000000000000376412251317420013656 0ustar Description: dumpasn1: error: format not a string literal and no format arguments >I believe we are not looking at the same file. So here is my log again: > >$ wget http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c >$ gcc -Wformat -Werror=3Dformat-security -DDEBIAN dumpasn1.c -o dummy >dumpasn1.c: In function =91complain=92: >dumpasn1.c:1181: error: format not a string literal and no format arguments >$ head -1181 dumpasn1.c | tail -1 > fprintf( output, INDENT_STRING ); It is the same file, INDENT_STRING is a macro that expands into a reference into the const, static string of spaces I quoted. >I believe fprintf needs explicit format specifier to please the gcc security >option. In that case you could change it to something like: fprintf( output, "%s", INDENT_STRING ); Peter. Author: Mathieu Malaterre Forwarded: not-needed Index: dumpasn1-20130608/dumpasn1.c =================================================================== --- dumpasn1-20130608.orig/dumpasn1.c 2013-12-09 11:32:40.266449746 +0100 +++ dumpasn1-20130608/dumpasn1.c 2013-12-09 11:33:59.942448677 +0100 @@ -1207,7 +1207,7 @@ if( level < maxNestLevel ) { if( !doPure ) - fprintf( output, INDENT_STRING ); + fprintf( output, "%s", INDENT_STRING ); doIndent( level + 1 ); } fputs( "Error: ", output ); @@ -1225,7 +1225,7 @@ if( level < maxNestLevel ) { if( !doPure ) - fprintf( output, INDENT_STRING ); + fprintf( output, "%s", INDENT_STRING ); doIndent( level + 1 ); } #endif /* 0 */ @@ -1245,7 +1245,7 @@ if( level < maxNestLevel ) { if( !doPure ) - fprintf( output, INDENT_STRING ); + fprintf( output, "%s", INDENT_STRING ); doIndent( level + 1 ); } #endif /* 0 */ @@ -1265,7 +1265,7 @@ if( level < maxNestLevel ) { if( !doPure ) - fprintf( output, INDENT_STRING ); + fprintf( output,"%s", INDENT_STRING ); doIndent( level + 1 ); } fprintf( output, "Error: Integer '%02X %02X ...' has non-DER encoding.\n",