mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +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
|
@ -69,10 +69,13 @@ public class CRLReasonCodeExtension extends Extension {
|
|||
* Create a CRLReasonCodeExtension with the passed in reason.
|
||||
*
|
||||
* @param critical true if the extension is to be treated as critical.
|
||||
* @param reason the enumerated value for the reason code.
|
||||
* @param reason the enumerated value for the reason code, must be positive.
|
||||
*/
|
||||
public CRLReasonCodeExtension(boolean critical, int reason)
|
||||
throws IOException {
|
||||
throws IOException {
|
||||
if (reason <= 0) {
|
||||
throw new IllegalArgumentException("reason code must be positive");
|
||||
}
|
||||
this.extensionId = PKIXExtensions.ReasonCode_Id;
|
||||
this.critical = critical;
|
||||
this.reasonCode = reason;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue