diff options
| author | Casey Marshall <csm@gnu.org> | 2006-02-02 07:06:35 +0000 |
|---|---|---|
| committer | Casey Marshall <csm@gnu.org> | 2006-02-02 07:06:35 +0000 |
| commit | 74ff5e9c98f8009788ac6d3a76957e7dc9fd3a0e (patch) | |
| tree | 626908ce83fc2bcc01a49028cb3609b5589e69d4 /gnu/java/security/der/DERWriter.java | |
| parent | 11897b807cc10d95684b1090e62a2217c5d0a61a (diff) | |
| download | classpath-74ff5e9c98f8009788ac6d3a76957e7dc9fd3a0e.tar.gz | |
2006-02-01 Casey Marshall <csm@gnu.org>
toString fix suggested by ???.
* gnu/java/security/der/DERValue.java
(getLength, getEncoded, getEncodedLength): throw an exception,
don't initialize `encoded' to a bogus value.
(toString): return a more helpful string.
Partial fix for PR classpath/25144.
* gnu/java/security/der/DERWriter.java (write): if the value is
the pseudo-value used for CONSTRUCTED, write the encoded value
directly.
Diffstat (limited to 'gnu/java/security/der/DERWriter.java')
| -rw-r--r-- | gnu/java/security/der/DERWriter.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/java/security/der/DERWriter.java b/gnu/java/security/der/DERWriter.java index 78524fc94..4298151e0 100644 --- a/gnu/java/security/der/DERWriter.java +++ b/gnu/java/security/der/DERWriter.java @@ -84,6 +84,12 @@ public class DERWriter implements DER public static int write(OutputStream out, DERValue object) throws IOException { + if (DER.CONSTRUCTED_VALUE.equals (object.getValue ())) + { + out.write (object.getEncoded ()); + return object.getLength (); + } + out.write(object.getExternalTag()); Object value = object.getValue(); if (value == null) |
