fixed possible NPE in CertTemplate.
@@ -90,11 +90,21 @@ else if (o != null)
return null;
}
+ /**
+ * Return Version - -1 if not set.
+ *
+ * @return Version value.
+ */
public int getVersion()
+ {
+ if (version != null)
{
return version.getValue().intValue();
}
+ return -1;
+ }
+
public ASN1Integer getSerialNumber()
{
return serialNumber;
