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:
Casey Marshall
2005-04-22 18:15:15 +00:00
committed by Michael Koch
parent d4b477843a
commit 9231c02497
3 changed files with 17 additions and 2 deletions
@@ -71,14 +71,14 @@ public class PrivateKeyUsagePeriod extends Extension.Value
val = der.read();
if (val.getTagClass() == DER.APPLICATION || val.getTag() == 0)
{
notBefore = (Date) val.getValue();
notBefore = (Date) val.getValueAs (DER.GENERALIZED_TIME);
val = der.read();
}
else
notBefore = null;
if (val.getTagClass() == DER.APPLICATION || val.getTag() == 1)
{
notAfter = (Date) val.getValue();
notAfter = (Date) val.getValueAs (DER.GENERALIZED_TIME);
}
else
notAfter = null;