Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 12149 invoked from network); 5 Jun 2006 04:28:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jun 2006 04:28:19 -0000 Received: (qmail 37348 invoked by uid 500); 5 Jun 2006 04:28:19 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 37254 invoked by uid 500); 5 Jun 2006 04:28:19 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 37243 invoked by uid 99); 5 Jun 2006 04:28:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2006 21:28:19 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2006 21:28:18 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 5128A1A983A; Sun, 4 Jun 2006 21:27:58 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r411656 - /incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/asn1/DerInputStream.java Date: Mon, 05 Jun 2006 04:27:57 -0000 To: harmony-commits@incubator.apache.org From: smishura@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060605042758.5128A1A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: smishura Date: Sun Jun 4 21:27:57 2006 New Revision: 411656 URL: http://svn.apache.org/viewvc?rev=411656&view=rev Log: Minor update: constructor optimization + error message Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/asn1/DerInputStream.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/asn1/DerInputStream.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/asn1/DerInputStream.java?rev=411656&r1=411655&r2=411656&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/asn1/DerInputStream.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/asn1/DerInputStream.java Sun Jun 4 21:27:57 2006 @@ -33,7 +33,7 @@ public final class DerInputStream extends BerInputStream { public DerInputStream(byte[] encoded) throws IOException { - super(encoded); + super(encoded, 0, encoded.length); } public DerInputStream(byte[] encoded, int offset, int encodingLen) @@ -71,9 +71,8 @@ // check encoded content if (buffer[contentOffset] != 0 && buffer[contentOffset] != (byte) 0xFF) { - throw new ASN1Exception( - "DER: ASN.1 boolean type wrong content at [" - + contentOffset + "]"); + throw new ASN1Exception("ASN.1 boolean: wrong content at [" + + contentOffset + "]. DER allows only 0x00 or 0xFF values"); } }