2005-04-22 Casey Marshall <csm@gnu.org>
* gnu/java/security/der/DERValue.java (getValueAs): new method. * gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java (<init>): read both dates with 'DERValue.getValueAs', with 'GENERALIZED_TIME' as the argument. From-SVN: r98578
This commit is contained in:
committed by
Michael Koch
parent
d4b477843a
commit
9231c02497
@@ -119,6 +119,13 @@ public class DERValue implements DER
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getValueAs (final int derType) throws IOException
|
||||
{
|
||||
byte[] encoded = getEncoded ();
|
||||
encoded[0] = (byte) derType;
|
||||
return DERReader.read (encoded).getValue ();
|
||||
}
|
||||
|
||||
public byte[] getEncoded()
|
||||
{
|
||||
if (encoded == null)
|
||||
|
||||
Reference in New Issue
Block a user