harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
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 GMT
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");
         }
     }
 



Mime
View raw message