libtasn1-commit
[Top][All Lists]
Advanced

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

[SCM] GNU libtasn1 branch, libtasn1_3_x, updated. libtasn1_3_9-1-g36457d


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU libtasn1 branch, libtasn1_3_x, updated. libtasn1_3_9-1-g36457dc
Date: Fri, 14 Nov 2014 19:46:50 +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=36457dc778839f4a28c81dbddce50db8cfeef88f

The branch, libtasn1_3_x has been updated
       via  36457dc778839f4a28c81dbddce50db8cfeef88f (commit)
      from  fb358bfef2ead85a3e3426e2b810ec2c644b37a2 (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 36457dc778839f4a28c81dbddce50db8cfeef88f
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Nov 14 20:46:24 2014 +0100

    Added test for ResponseData decoding-encoding issue

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

Summary of changes:
 tests/Makefile.am   |    6 +++---
 tests/Test_choice.c |    2 +-
 tests/ocsp.der      |  Bin 0 -> 163 bytes
 tests/pkix.asn      |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 50 insertions(+), 4 deletions(-)
 create mode 100644 tests/ocsp.der

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 357fb50..25b4323 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -27,7 +27,7 @@ EXTRA_DIST = Test_parser.asn Test_tree.asn 
Test_tree_asn1_tab.c       \
        TestIndef2.p12 TestIndef3.der
 
 # For crlf.
-EXTRA_DIST += crlf.cer crl.der
+EXTRA_DIST += crlf.cer crl.der ocsp.der
 dist_check_SCRIPTS = crlf benchmark
 
 dist_check_SCRIPTS += threadsafety
@@ -36,11 +36,11 @@ MOSTLYCLEANFILES = Test_parser_ERROR.asn
 
 check_PROGRAMS = Test_parser Test_tree Test_encoding Test_indefinite \
        Test_errors Test_simple Test_overflow Test_strings Test_choice \
-       Test_encdec
+       Test_encdec Test_choice_ocsp
 
 TESTS = Test_parser Test_tree Test_encoding Test_indefinite    \
        Test_errors Test_simple Test_overflow crlf threadsafety \
-       Test_strings Test_choice Test_encdec
+       Test_strings Test_choice Test_encdec Test_choice_ocsp
 
 TESTS_ENVIRONMENT = \
        ASN1PARSER=$(srcdir)/Test_parser.asn \
diff --git a/tests/Test_choice.c b/tests/Test_choice.c
index 8a0b5c1..163cb08 100644
--- a/tests/Test_choice.c
+++ b/tests/Test_choice.c
@@ -14,7 +14,7 @@ main (int argc, char** argv)
   int data_size = sizeof (data);
 
   if (!choicefile)
-    choicefile = "choice.asn";
+    choicefile = "pkix.asn";
 
   /* Encode */
   result = asn1_parser2tree (choicefile, &definitions, errorDescription);
diff --git a/tests/ocsp.der b/tests/ocsp.der
new file mode 100644
index 0000000..3134309
Binary files /dev/null and b/tests/ocsp.der differ
diff --git a/tests/pkix.asn b/tests/pkix.asn
index 579dd57..7ce8abe 100644
--- a/tests/pkix.asn
+++ b/tests/pkix.asn
@@ -1238,6 +1238,51 @@ id-on-xmppAddr  OBJECT IDENTIFIER ::= { id-on 5 }
 
 XmppAddr ::= UTF8String
 
+-- ocsp
+
+BasicOCSPResponse       ::= SEQUENCE {
+   tbsResponseData      ResponseData,
+   signatureAlgorithm   AlgorithmIdentifier,
+   signature            BIT STRING,
+   certs                [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
+
+ResponseData ::= SEQUENCE {
+   version              [0] EXPLICIT INTEGER DEFAULT 0,
+   responderID              ResponderID,
+   producedAt               GeneralizedTime,
+   responses                SEQUENCE OF SingleResponse,
+   responseExtensions   [1] EXPLICIT Extensions OPTIONAL }
+
+ResponderID ::= CHOICE {
+-- Changed to work with the libtasn1 parser.
+   byName   [1] EXPLICIT RDNSequence, --Name
+   byKey    [2] OCTET STRING --SHA-1 hash of responder's public key 
+}
+
+CertID ::= SEQUENCE {
+    hashAlgorithm            AlgorithmIdentifier,
+    issuerNameHash     OCTET STRING, -- Hash of Issuer's DN
+    issuerKeyHash      OCTET STRING, -- Hash of Issuers public key
+    serialNumber       CertificateSerialNumber }
+
+CertStatus ::= CHOICE {
+    good                [0]     IMPLICIT NULL,
+    revoked             [1]     IMPLICIT RevokedInfo,
+    unknown             [2]     IMPLICIT UnknownInfo }
+
+SingleResponse ::= SEQUENCE {
+   certID                       CertID,
+   certStatus                   CertStatus,
+   thisUpdate                   GeneralizedTime,
+   nextUpdate           [0]     EXPLICIT GeneralizedTime OPTIONAL,
+   singleExtensions     [1]     EXPLICIT Extensions OPTIONAL }
+
+RevokedInfo ::= SEQUENCE {
+    revocationTime              GeneralizedTime,
+    revocationReason    [0]     EXPLICIT CRLReason OPTIONAL }
+
+UnknownInfo ::= NULL -- this can be replaced with an enumeration
+
 END
 
 -- Copyright (C) 2002-2014 Free Software Foundation, Inc.
@@ -1256,3 +1301,4 @@ END
 --
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+


hooks/post-receive
-- 
GNU libtasn1



reply via email to

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