Record Class BasicConstraints
java.lang.Object
java.lang.Record
zeroecho.pkix.BasicConstraints
- Record Components:
certificateAuthority- whether the subject is a CApathLenConstraint- maximum number of subordinate CAs, present only whencertificateAuthorityistrue
public record BasicConstraints(boolean certificateAuthority, OptionalInt pathLenConstraint)
extends Record
The X.509
BasicConstraints extension value (RFC 5280, 4.2.1.9).-
Constructor Summary
ConstructorsConstructorDescriptionBasicConstraints(boolean certificateAuthority, OptionalInt pathLenConstraint) Canonicalizing constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic BasicConstraintsca()A CA basic constraints value with no path-length limit.static BasicConstraintsca(int pathLen) A CA basic constraints value with the given path-length limit.booleanReturns the value of thecertificateAuthorityrecord component.static BasicConstraintsAn end-entity (non-CA) basic constraints value.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepathLenConstraintrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BasicConstraints
Canonicalizing constructor.
-
-
Method Details
-
endEntity
An end-entity (non-CA) basic constraints value.- Returns:
- end-entity basic constraints
-
ca
A CA basic constraints value with no path-length limit.- Returns:
- unconstrained CA basic constraints
-
ca
A CA basic constraints value with the given path-length limit.- Parameters:
pathLen- maximum number of subordinate CAs (non-negative)- Returns:
- path-limited CA basic constraints
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
certificateAuthority
public boolean certificateAuthority()Returns the value of thecertificateAuthorityrecord component.- Returns:
- the value of the
certificateAuthorityrecord component
-
pathLenConstraint
Returns the value of thepathLenConstraintrecord component.- Returns:
- the value of the
pathLenConstraintrecord component
-