libtasn1-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU libtasn1 branch, master, updated. libtasn1_3_0-7-g05945e2


From: Simon Josefsson
Subject: [SCM] GNU libtasn1 branch, master, updated. libtasn1_3_0-7-g05945e2
Date: Tue, 06 Nov 2012 14:53:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".

http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=05945e2cc4b3bf1af7af21589cd377310b03f9dd

The branch, master has been updated
       via  05945e2cc4b3bf1af7af21589cd377310b03f9dd (commit)
       via  20c6a0120d22a3e6024319f8cfe4a97b2d8df88a (commit)
       via  c9944365bbd4e957e7df8f05dd5cf386ce7824a1 (commit)
       via  6ec5b1f5915f8c425ea5a436af01518fcb6eb04a (commit)
      from  62852408cf7e7afafcb9baa01cf7b2740cc46680 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 05945e2cc4b3bf1af7af21589cd377310b03f9dd
Author: Ivan Shmakov <address@hidden>
Date:   Tue Nov 6 12:47:48 2012 +0700

    Typographical and wording fixes to doc/libtasn1.texi
    
    doc/libtasn1.texi: A bunch of typographical and wording fixes
    and improvements.
    
    Signed-off-by: Simon Josefsson <address@hidden>

commit 20c6a0120d22a3e6024319f8cfe4a97b2d8df88a
Author: Simon Josefsson <address@hidden>
Date:   Tue Nov 6 15:49:59 2012 +0100

    Ignore more.

commit c9944365bbd4e957e7df8f05dd5cf386ce7824a1
Author: Simon Josefsson <address@hidden>
Date:   Tue Nov 6 15:49:29 2012 +0100

    Don't overload the 'time' global name.

commit 6ec5b1f5915f8c425ea5a436af01518fcb6eb04a
Author: Simon Josefsson <address@hidden>
Date:   Tue Nov 6 15:49:02 2012 +0100

    Generated.

-----------------------------------------------------------------------

Summary of changes:
 .gitignore        |   10 +++
 doc/Makefile.am   |    6 +-
 doc/libtasn1.texi |  158 +++++++++++++++++++++++++++++++---------------------
 src/benchmark.c   |   10 ++--
 4 files changed, 111 insertions(+), 73 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9c56412..e6f9fc5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,13 @@
 *.gcda
 *.gcno
 *.gcov
+ChangeLog
 INSTALL
 Makefile
 Makefile.in
 aclocal.m4
 autom4te.cache/
+build-aux/ar-lib
 build-aux/config.guess
 build-aux/config.sub
 build-aux/depcomp
@@ -100,6 +102,8 @@ gl/getopt.lo
 gl/getopt.o
 gl/getopt1.lo
 gl/getopt1.o
+gl/gettime.lo
+gl/gettime.o
 gl/libgnu.la
 gl/progname.lo
 gl/progname.o
@@ -107,8 +111,11 @@ gl/read-file.lo
 gl/read-file.o
 gl/stdio.h
 gl/stdlib.h
+gl/sys/
 gl/sys/stat.h
 gl/time.h
+gl/timespec.lo
+gl/timespec.o
 gl/unistd.h
 gl/version-etc-fsf.lo
 gl/version-etc-fsf.o
@@ -139,6 +146,8 @@ lib/gllib/arg-nonnull.h
 lib/gllib/c++defs.h
 lib/gllib/dummy.lo
 lib/gllib/dummy.o
+lib/gllib/hash-pjw-bare.lo
+lib/gllib/hash-pjw-bare.o
 lib/gllib/libgnu.la
 lib/gllib/string.h
 lib/gllib/warn-on-use.h
@@ -172,6 +181,7 @@ src/asn1Decoding
 src/asn1Decoding.o
 src/asn1Parser
 src/asn1Parser.o
+src/benchmark.o
 stamp-h1
 tests/.deps/
 tests/Makefile
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 037890b..71f4b69 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -63,8 +63,6 @@ gdoc_MANS += man/asn1_expand_any_defined_by.3
 gdoc_MANS += man/asn1_expand_octet_string.3
 gdoc_MANS += man/asn1_perror.3
 gdoc_MANS += man/asn1_strerror.3
-gdoc_MANS += man/libtasn1_perror.3
-gdoc_MANS += man/libtasn1_strerror.3
 gdoc_MANS += man/asn1_find_node.3
 gdoc_MANS += man/asn1_length_der.3
 gdoc_MANS += man/asn1_octet_der.3
@@ -73,6 +71,7 @@ gdoc_MANS += man/asn1_der_coding.3
 gdoc_MANS += man/asn1_write_value.3
 gdoc_MANS += man/asn1_read_value.3
 gdoc_MANS += man/asn1_read_tag.3
+gdoc_MANS += man/asn1_read_node_value.3
 gdoc_MANS += man/asn1_array2tree.3
 gdoc_MANS += man/asn1_delete_structure.3
 gdoc_MANS += man/asn1_delete_element.3
@@ -106,8 +105,6 @@ gdoc_TEXINFOS += texi/asn1_expand_any_defined_by.texi
 gdoc_TEXINFOS += texi/asn1_expand_octet_string.texi
 gdoc_TEXINFOS += texi/asn1_perror.texi
 gdoc_TEXINFOS += texi/asn1_strerror.texi
-gdoc_TEXINFOS += texi/libtasn1_perror.texi
-gdoc_TEXINFOS += texi/libtasn1_strerror.texi
 gdoc_TEXINFOS += texi/asn1_find_node.texi
 gdoc_TEXINFOS += texi/asn1_length_der.texi
 gdoc_TEXINFOS += texi/asn1_octet_der.texi
@@ -116,6 +113,7 @@ gdoc_TEXINFOS += texi/asn1_der_coding.texi
 gdoc_TEXINFOS += texi/asn1_write_value.texi
 gdoc_TEXINFOS += texi/asn1_read_value.texi
 gdoc_TEXINFOS += texi/asn1_read_tag.texi
+gdoc_TEXINFOS += texi/asn1_read_node_value.texi
 gdoc_TEXINFOS += texi/asn1_array2tree.texi
 gdoc_TEXINFOS += texi/asn1_delete_structure.texi
 gdoc_TEXINFOS += texi/asn1_delete_element.texi
diff --git a/doc/libtasn1.texi b/doc/libtasn1.texi
index 13238aa..799f71f 100644
--- a/doc/libtasn1.texi
+++ b/doc/libtasn1.texi
@@ -13,7 +13,7 @@
 This manual is for GNU Libtasn1
 (version @value{VERSION}, @value{UPDATED}),
 which is a library for Abstract Syntax Notation One (ASN.1) and
-Distinguish Encoding Rules (DER) manipulation.
+Distinguished Encoding Rules (DER) manipulation.
 
 Copyright @copyright{} 2001-2012 Free Software Foundation, Inc.
 
@@ -68,21 +68,23 @@ Indices
 @node Introduction
 @chapter Introduction
 
-This document describes the Libtasn1 library developed for ASN.1
-(Abstract Syntax Notation One) structures management and DER
-(Distinguished Encoding Rules) encoding functions.
+This document describes the Libtasn1 library that provides
+Abstract Syntax Notation One (ASN.1, as specified by the X.680 ITU-T
+recommendation) parsing and structures management,
+and Distinguished Encoding Rules (DER, as per X.690) encoding and
+decoding functions.
 
 The main features of this library are:
 
 @itemize @bullet
 
address@hidden On line ASN1 structure management that doesn't require any
address@hidden On-line ASN.1 structure management that doesn't require any
 C code file generation.
 
address@hidden Off line ASN1 structure management with C code file generation
address@hidden Off-line ASN.1 structure management with C code file generation
 containing an array.
 
address@hidden DER (Distinguish Encoding Rules) encoding.
address@hidden Distinguished Encoding Rules (DER) encoding support.
 
 @item No limits for INTEGER and ENUMERATED values.
 
@@ -92,14 +94,14 @@ of the GNU Lesser General Public License version 2.1 or 
later.  The
 command line tools, self-tests and build infrastructure are licensed
 under the GNU General Public License version 3.0 or later.
 
address@hidden It's thread-safe.
address@hidden Thread-safety.
 @cindex threads
 No global variables are used and multiple library handles and session
 handles may be used in parallel.
 
address@hidden It's portable.
address@hidden Portability.
 @cindex Porting
-It should work on all Unix like operating systems, including Windows.
+The code should work on all Unix like operating systems, and Windows.
 The library itself should be portable to any C89 system, not even
 POSIX is required.
 @end itemize
@@ -119,9 +121,15 @@ POSIX is required.
 
 @cindex ASN.1 schema
 
-The parser is case sensitive. The comments begin with "-- " and end at
-the end of lines.  An example is in "pkix.asn" file.  ASN.1
-definitions must have this syntax:
+The parser is case sensitive.  The comments begin with @code{--} and
+end either with another @code{--}, or at the end of the respective
+line, whichever comes first.  The C-style @code{/*}, @code{*/}
+comments are not supported.
+
+For an example of the syntax, check the @file{pkix.asn} file
+distributed with the library.
+
+ASN.1 definitions must follow the syntax below:
 
 @verbatim
       definitions_name {<object definition>}
@@ -135,15 +143,15 @@ definitions must have this syntax:
       END
 @end verbatim
 
-The token "::=" must be separate from others elements, so this is a
-wrong declaration:
+The @code{::=} token must be separate from other elements, so the
+following declaration is invalid:
 
 @example
-      ;; INCORRECT
-      Version ::=INTEGER
+   -- INCORRECT
+   Version ::=INTEGER
 @end example
 
-the correct form is:
+The correct form is:
 
 @example
    Version ::= INTEGER
@@ -155,30 +163,31 @@ Here is the list of types that the parser can manage:
 
 @itemize @bullet
 
address@hidden INTEGER
address@hidden ENUMERATED
address@hidden BOOLEAN
address@hidden OBJECT IDENTIFIER
address@hidden NULL
address@hidden BIT STRING
address@hidden OCTET STRING
address@hidden UTCTime
address@hidden GeneralizedTime
address@hidden GeneralString
address@hidden SEQUENCE
address@hidden SEQUENCE OF
address@hidden SET
address@hidden SET OF
address@hidden CHOICE
address@hidden ANY
address@hidden ANY DEFINED BY
address@hidden @code{INTEGER};
address@hidden @code{ENUMERATED};
address@hidden @code{BOOLEAN};
address@hidden @code{OBJECT IDENTIFIER};
address@hidden @code{NULL};
address@hidden @code{BIT STRING};
address@hidden @code{OCTET STRING};
address@hidden @code{UTCTime};
address@hidden @code{GeneralizedTime};
address@hidden @code{GeneralString};
address@hidden @code{SEQUENCE};
address@hidden @code{SEQUENCE OF};
address@hidden @code{SET};
address@hidden @code{SET OF};
address@hidden @code{CHOICE};
address@hidden @code{ANY};
address@hidden @code{ANY DEFINED BY}.
 
 @end itemize
 
-This version doesn't manage REAL type. It doesn't allow the "EXPORT"
-and "IMPORT" sections too.
+This version doesn't handle the @code{REAL} type.  It doesn't support
+the @code{AUTOMATIC TAGS} option, and the @code{EXPORT} and
address@hidden sections, either.
 
-The SIZE constraints are allowed, but no check is done on them.
+The @code{SIZE} constraints are allowed, but no check is done on them.
 
 @node Naming
 @section Naming
@@ -205,22 +214,26 @@ Consider this definition:
       END
 @end verbatim
 
-To identify the type 'Group' you have to use the null terminated
-string "Example.Group".  These strings are used in functions that are
-described below.
+The notation to access the @samp{Group} type of the @samp{Example}
+definition above is @samp{Example.Group} (as a NUL-terminated string.)
+Such strings are used in the functions described below.
 
 Others examples:
 
-Field 'id' in 'Group' type : "Example.Group.id".
address@hidden @bullet
+
address@hidden field @samp{id} of the @samp{Group} type: 
@samp{Example.Group.id};
+
address@hidden field @samp{value1} of the @samp{value} field of the @samp{Group}
+type: @samp{Example.Group.value.value1}.
 
-Field 'value1' in field 'value' in type 'Group':
-"Example.Group.value.value1".
address@hidden itemize
 
-Elements of structured types that don't have a name, receive the name
-"?1","?2", and so on.
+Elements of structured types unnamed by the respective definition
+receive the names @code{?1}, @code{?2}, and so on.
 
-The name "?LAST" indicates the last element of a @code{SET_OF} or
address@hidden
+The @code{?LAST} name indicates the last element of a @code{SET OF} or
address@hidden OF}.
 
 @node Library Notes
 @section Library Notes
@@ -234,20 +247,20 @@ The header file of this library is @file{libtasn1.h}.
 The main type used in it is @code{asn1_node}, and it's used to store
 the ASN.1 definitions and structures (instances).
 
-The constant @code{NULL} can be used for the variable
+The @code{NULL} constant can be used for the variable
 initialization.  For example:
 
 @example
- asn1_node definitions=NULL;
+ asn1_node definitions = NULL;
 @end example
 
-Some functions require a parameter named errorDescription of char*
-type.  The array must be already allocated and must have at least
address@hidden bytes (E.g, as in @code{char
-Description[ASN1_MAX_ERROR_DESCRIPTION_SIZE];}).
+Some functions require an @code{errorDescription} argument of type
address@hidden *}, pointing to a pre-allocated buffer of at least
address@hidden bytes size (e.g., as in
address@hidden description[ASN1_MAX_ERROR_DESCRIPTION_SIZE];}).
 
address@hidden indicates the maximum number of characters of a
-name inside a file with ASN1 definitions.
address@hidden is the maximum number of characters allowed
+for an ASN.1 identifier.
 
 @node Future developments
 @section Future developments
@@ -258,7 +271,7 @@ name inside a file with ASN1 definitions.
 @item Add functions for a C code file generation containing equivalent
 data structures (not a single array like now).
 
address@hidden Type REAL.
address@hidden The @code{REAL} type.
 
 @end itemize
 
@@ -275,7 +288,8 @@ data structures (not a single array like now).
 @section Invoking asn1Parser
 @cindex asn1Parser program
 
address@hidden reads one file with ASN1 definitions and generates a
address@hidden reads a single file with ASN.1 definitions and
+generates a
 file with an array to use with libtasn1 functions.
 
 @verbatim
@@ -293,7 +307,7 @@ Options:
 @section Invoking asn1Coding
 @cindex asn1Coding program
 
address@hidden generates a DER encoding from a file with ASN1
address@hidden generates a DER encoding from a file with ASN.1
 definitions and another one with assignments.
 
 The file with assignments must have this syntax:
@@ -307,6 +321,11 @@ nameString  value
 ...
 @end verbatim
 
+To specify the field of a @code{CHOICE} to be used, specify its name
+as a value to the @code{CHOICE} element itself.  Use @code{''} to
+denote the root element itself.
+(as in the example below.)
+
 The output file is a binary file with the DER encoding.
 
 @verbatim
@@ -320,7 +339,7 @@ Options:
  -o file : output file.
 @end verbatim
 
-For example, consider a ASN.1 definitions file as follows:
+For example, consider an ASN.1 definitions file as follows:
 
 @verbatim
 PKIX1 { }
@@ -346,18 +365,28 @@ r 42
 s 47
 @end verbatim
 
-Running the command below will generate a file @file{assign.out}
+Running the command below will generate a @file{assign.out} file,
 containing the DER encoding of @code{PKIX1.Dss-Sig-Value}.
 
 @verbatim
 $ asn1Coding pkix.asn assign.asn1
 @end verbatim
 
+If the root element is of the @code{CHOICE} type, the assignment file
+may be like (using the types defined in @file{pkix.asn}):
address@hidden
+elt PKIX1Implicit88.GeneralName
+
+''      dNSName
+dNSName example.org
address@hidden verbatim
+
 @node Invoking asn1Decoding
 @section Invoking asn1Decoding
 @cindex asn1Decoding program
 
address@hidden generates an ASN1 structure from a file with ASN1
address@hidden generates an ASN.1 structure from a file with
+ASN.1
 definitions and a binary file with a DER encoding.
 
 @verbatim
@@ -371,8 +400,9 @@ Options:
  -o file : output file.
 @end verbatim
 
-For example, after generating the file @file{assign.out} from the
-example section of the @code{asn1Coding} command, the following
+For example, after generating the @file{assign.out} file from the
+example section of the @command{asn1Coding} command above, the
+following
 invocation will decode the DER data.
 
 @verbatim
diff --git a/src/benchmark.c b/src/benchmark.c
index f18ed1c..1ebf6b6 100644
--- a/src/benchmark.c
+++ b/src/benchmark.c
@@ -47,34 +47,34 @@ alarm_handler (int signo)
 #endif
 
 static void
-value2human (unsigned long bytes, double time, double *data, double *speed,
+value2human (unsigned long bytes, double secs, double *data, double *speed,
              char *metric)
 {
   if (bytes > 1000 && bytes < 1000 * 1000)
     {
       *data = ((double) bytes) / 1000;
-      *speed = *data / time;
+      *speed = *data / secs;
       strcpy (metric, "KB");
       return;
     }
   else if (bytes >= 1000 * 1000 && bytes < 1000 * 1000 * 1000)
     {
       *data = ((double) bytes) / (1000 * 1000);
-      *speed = *data / time;
+      *speed = *data / secs;
       strcpy (metric, "MB");
       return;
     }
   else if (bytes >= 1000 * 1000 * 1000)
     {
       *data = ((double) bytes) / (1000 * 1000 * 1000);
-      *speed = *data / time;
+      *speed = *data / secs;
       strcpy (metric, "GB");
       return;
     }
   else
     {
       *data = (double) bytes;
-      *speed = *data / time;
+      *speed = *data / secs;
       strcpy (metric, "bytes");
       return;
     }


hooks/post-receive
-- 
GNU libtasn1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]