[SCM] GNU gnutls branch, master, updated. gnutls_3_0_15-30-g88138dc

"Nikos Mavrogiannopoulos" <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gnutls.cvs
Message-ID <[email protected]>
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 gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=88138dc44fc00f2887956d71e0febd2656e1fd9f

The branch, master has been updated
       via  88138dc44fc00f2887956d71e0febd2656e1fd9f (commit)
       via  e071bf46de0d7eb91dbea46b13a196c7f5dd1ec7 (commit)
      from  a737805640a8d362db34e0176d19441cba7bb08f (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 88138dc44fc00f2887956d71e0febd2656e1fd9f
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Tue Mar 13 22:44:59 2012 +0100

    Added test on an invalid certificate.

commit e071bf46de0d7eb91dbea46b13a196c7f5dd1ec7
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Tue Mar 13 22:37:26 2012 +0100

    updated.

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

Summary of changes:
 lib/minitasn1/decoding.c                           |    4 ++--
 tests/suite/Makefile.am                            |    4 ++--
 .../pem-decoding => suite/invalid-cert}            |    7 +++----
 tests/suite/invalid-cert.der                       |  Bin 0 -> 687 bytes
 4 files changed, 7 insertions(+), 8 deletions(-)
 copy tests/{cert-tests/pem-decoding => suite/invalid-cert} (89%)
 create mode 100644 tests/suite/invalid-cert.der

diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c
index 57e7b2b..9cd5a34 100644
--- a/lib/minitasn1/decoding.c
+++ b/lib/minitasn1/decoding.c
@@ -111,8 +111,8 @@ int ret, tot;
     return ret;
   
   tot = ret + *len;
-  
-  if (tot < 0 || tot > der_len)
+
+  if (tot < ret || tot > der_len)
     return -3;
 
   return ret;
diff --git a/tests/suite/Makefile.am b/tests/suite/Makefile.am
index 047933a..c938e9a 100644
--- a/tests/suite/Makefile.am
+++ b/tests/suite/Makefile.am
@@ -86,6 +86,6 @@ nodist_eagain_cli_SOURCES = mini-eagain2.c
 
 noinst_PROGRAMS = eagain-cli
 
-nodist_check_SCRIPTS = eagain testsrn testcompat chain
+nodist_check_SCRIPTS = eagain testsrn testcompat chain invalid-cert
 
-TESTS = eagain testsrn testcompat chain
+TESTS = eagain testsrn testcompat chain invalid-cert
diff --git a/tests/cert-tests/pem-decoding b/tests/suite/invalid-cert
similarity index 89%
copy from tests/cert-tests/pem-decoding
copy to tests/suite/invalid-cert
index 62cc0ee..85e26d7 100755
--- a/tests/cert-tests/pem-decoding
+++ b/tests/suite/invalid-cert
@@ -20,16 +20,15 @@
 # along with GnuTLS; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-set -e
-
 srcdir=${srcdir:-.}
 CERTTOOL=${CERTTOOL:-../../src/certtool$EXEEXT}
 
-$CERTTOOL --certificate-info --infile $srcdir/funny-spacing.pem >/dev/null 2>&1
+$CERTTOOL --certificate-info --inder --infile $srcdir/invalid-cert.der 2>/dev/null
+
 rc=$?
 
 # We're done.
-if test "$rc" != "0"; then
+if test "$rc" != "1"; then
   exit $rc
 fi
 
diff --git a/tests/suite/invalid-cert.der b/tests/suite/invalid-cert.der
new file mode 100644
index 0000000..3556e6f
Binary files /dev/null and b/tests/suite/invalid-cert.der differ


hooks/post-receive
-- 
GNU gnutls
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.