[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rpm-cvs
Subject:    [CVS] RPM: rpm/rpmio/ .cvsignore Makefile.am tasn.c
From:       "Jeff Johnson" <jbj () rpm5 ! org>
Date:       2010-06-30 22:05:27
Message-ID: 20100630220527.7997EBFA55 () rpm5 ! org
[Download RAW message or body]

  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   01-Jul-2010 00:05:27
  Branch: HEAD                             Handle: 2010063022052600

  Added files:
    rpm/rpmio               tasn.c
  Modified files:
    rpm/rpmio               .cvsignore Makefile.am

  Log:
    - asn: stub-in a toy test harness.

  Summary:
    Revision    Changes     Path
    1.40        +1  -0      rpm/rpmio/.cvsignore
    1.279       +4  -1      rpm/rpmio/Makefile.am
    2.1         +47 -0      rpm/rpmio/tasn.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/.cvsignore
  ============================================================================
  $ cvs diff -u -r1.39 -r1.40 .cvsignore
  --- rpm/rpmio/.cvsignore	4 Jun 2010 14:00:21 -0000	1.39
  +++ rpm/rpmio/.cvsignore	30 Jun 2010 22:05:26 -0000	1.40
  @@ -33,6 +33,7 @@
   rpmz
   teststderr
   testtry
  +tasn
   tdigest
   tdir
   tfts
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.278 -r1.279 Makefile.am
  --- rpm/rpmio/Makefile.am	30 Jun 2010 17:38:33 -0000	1.278
  +++ rpm/rpmio/Makefile.am	30 Jun 2010 22:05:26 -0000	1.279
  @@ -18,7 +18,7 @@
   EXTRA_PROGRAMS = bsdiff bspatch rpmborg rpmcpio rpmcurl rpmdpkg \
   	rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
   	rpmpbzip2 rpmpigz rpmtar rpmz \
  -	tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic tmire \
  +	tasn tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic tmire \
   	tperl tpython tput tpw trpmio tsexp tsw ttcl dumpasn1 lookup3
   
   bin_PROGRAMS =
  @@ -314,6 +314,9 @@
   rpmz_SOURCES = rpmz.c
   rpmz_LDADD = $(RPMIO_LDADD_COMMON)
   
  +tasn_SOURCES = tasn.c
  +tasn_LDADD = $(RPMIO_LDADD_COMMON) -ltasn1
  +
   tdir_SOURCES = tdir.c
   tdir_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/tasn.c
  ============================================================================
  $ cvs diff -u -r0 -r2.1 tasn.c
  --- /dev/null	2010-07-01 00:05:24.000000000 +0200
  +++ tasn.c	2010-07-01 00:05:27.291698985 +0200
  @@ -0,0 +1,47 @@
  +
  +/** \ingroup rpmio signature
  + * \file rpmio/tkey.c
  + * Routines to handle RFC-2440 detached signatures.
  + */
  +
  +#include "system.h"
  +
  +#include <rpmio.h>
  +#define	_RPMASN_INTERNAL
  +#include <rpmasn.h>
  +#include <poptIO.h>
  +
  +#include "debug.h"
  +
  +
  +static struct poptOption rpmasnOptionsTable[] = {
  +
  + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmioAllPoptTable, 0,
  +	N_(" Common options for all rpmio executables:"), NULL },
  +
  +  POPT_AUTOALIAS
  +  POPT_AUTOHELP
  +
  +  { NULL, (char)-1, POPT_ARG_INCLUDE_TABLE, NULL, 0,
  +        N_("\
  +"), NULL },
  +
  +  POPT_TABLEEND
  +};
  +
  +int
  +main(int argc, char *argv[])
  +{
  +    poptContext con = rpmioInit(argc, argv, rpmasnOptionsTable);
  +    static const char * _fn = "pkix.asn";
  +    rpmasn asn = rpmasnNew(_fn, 0);
  +    int ec = 0;
  +
  +    asn1_print_structure(stdout, asn->tree, "PKIX1", ASN1_PRINT_ALL);
  +
  +    asn = rpmasnFree(asn);
  +
  +    con = rpmioFini(con);
  +
  +    return ec;
  +}
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic