mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8296742: Illegal X509 Extension should not be created
Reviewed-by: mullan
This commit is contained in:
parent
a6c418eaf8
commit
e174558cad
28 changed files with 303 additions and 92 deletions
|
@ -78,7 +78,7 @@ public class CRLNumberExtension extends Extension {
|
|||
* Create a CRLNumberExtension with the BigInteger value .
|
||||
* The criticality is set to false.
|
||||
*
|
||||
* @param crlNum the value to be set for the extension.
|
||||
* @param crlNum the value to be set for the extension, cannot be null
|
||||
*/
|
||||
public CRLNumberExtension(BigInteger crlNum) throws IOException {
|
||||
this(PKIXExtensions.CRLNumber_Id, false, crlNum, NAME, LABEL);
|
||||
|
@ -91,6 +91,9 @@ public class CRLNumberExtension extends Extension {
|
|||
boolean isCritical, BigInteger crlNum, String extensionName,
|
||||
String extensionLabel) throws IOException {
|
||||
|
||||
if (crlNum == null) {
|
||||
throw new IllegalArgumentException("CRL number cannot be null");
|
||||
}
|
||||
this.extensionId = extensionId;
|
||||
this.critical = isCritical;
|
||||
this.crlNumber = crlNum;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue