Class X509v3Extensions
java.lang.Object
security.whisper.javastix.coo.types.X509v3Extensions
- All Implemented Interfaces:
Serializable,StixCustomProperties,X509v3ExtensionsObj,GenericValidation,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class X509v3Extensions
extends Object
implements X509v3ExtensionsObj
x509-certificate
The X509 Certificate Object represents the properties of an X.509 certificate. Note that the X.509 v3 Extensions type is not a STIX Cyber Observables extension, it is a type that describes X.509 extensions.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionstatic X509v3Extensions.Builderbuilder()Creates a builder forX509v3Extensions.static X509v3ExtensionscopyOf(X509v3ExtensionsObj instance) Creates an immutable copy of aX509v3ExtensionsObjvalue.booleanThis instance is equal to all instances ofX509v3Extensionsthat have equal attribute values.Custom Properties for STIX Objects.inthashCode()Computes a hash code from attributes:basicConstraints,nameConstraints,policyConstraints,keyUsage,extendedKeyUsage,subjectKeyIdentifier,authorityKeyIdentifier,subjectAlternativeName,issuerAlternativeName,subjectDirectoryAttributes,crlDistributionPoints,inhibitAnyPolicy,privateKeyUsagePeriodNotBefore,privateKeyUsagePeriodNotAfter,certificatePolicies,policyMappings,customProperties.toString()Prints the immutable valueX509v3Extensionswith attribute values.final X509v3ExtensionswithAuthorityKeyIdentifier(String value) Copy the current immutable object by setting a present value for the optionalauthorityKeyIdentifierattribute.final X509v3ExtensionswithAuthorityKeyIdentifier(Optional<String> optional) Copy the current immutable object by setting an optional value for theauthorityKeyIdentifierattribute.final X509v3ExtensionswithBasicConstraints(String value) Copy the current immutable object by setting a present value for the optionalbasicConstraintsattribute.final X509v3ExtensionswithBasicConstraints(Optional<String> optional) Copy the current immutable object by setting an optional value for thebasicConstraintsattribute.final X509v3ExtensionswithCertificatePolicies(String value) Copy the current immutable object by setting a present value for the optionalcertificatePoliciesattribute.final X509v3ExtensionswithCertificatePolicies(Optional<String> optional) Copy the current immutable object by setting an optional value for thecertificatePoliciesattribute.final X509v3ExtensionswithCrlDistributionPoints(String value) Copy the current immutable object by setting a present value for the optionalcrlDistributionPointsattribute.final X509v3ExtensionswithCrlDistributionPoints(Optional<String> optional) Copy the current immutable object by setting an optional value for thecrlDistributionPointsattribute.final X509v3ExtensionswithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final X509v3ExtensionswithExtendedKeyUsage(String value) Copy the current immutable object by setting a present value for the optionalextendedKeyUsageattribute.final X509v3ExtensionswithExtendedKeyUsage(Optional<String> optional) Copy the current immutable object by setting an optional value for theextendedKeyUsageattribute.final X509v3ExtensionswithInhibitAnyPolicy(String value) Copy the current immutable object by setting a present value for the optionalinhibitAnyPolicyattribute.final X509v3ExtensionswithInhibitAnyPolicy(Optional<String> optional) Copy the current immutable object by setting an optional value for theinhibitAnyPolicyattribute.final X509v3ExtensionswithIssuerAlternativeName(String value) Copy the current immutable object by setting a present value for the optionalissuerAlternativeNameattribute.final X509v3ExtensionswithIssuerAlternativeName(Optional<String> optional) Copy the current immutable object by setting an optional value for theissuerAlternativeNameattribute.final X509v3ExtensionswithKeyUsage(String value) Copy the current immutable object by setting a present value for the optionalkeyUsageattribute.final X509v3ExtensionswithKeyUsage(Optional<String> optional) Copy the current immutable object by setting an optional value for thekeyUsageattribute.final X509v3ExtensionswithNameConstraints(String value) Copy the current immutable object by setting a present value for the optionalnameConstraintsattribute.final X509v3ExtensionswithNameConstraints(Optional<String> optional) Copy the current immutable object by setting an optional value for thenameConstraintsattribute.final X509v3ExtensionswithPolicyConstraints(String value) Copy the current immutable object by setting a present value for the optionalpolicyConstraintsattribute.final X509v3ExtensionswithPolicyConstraints(Optional<String> optional) Copy the current immutable object by setting an optional value for thepolicyConstraintsattribute.final X509v3ExtensionswithPolicyMappings(String value) Copy the current immutable object by setting a present value for the optionalpolicyMappingsattribute.final X509v3ExtensionswithPolicyMappings(Optional<String> optional) Copy the current immutable object by setting an optional value for thepolicyMappingsattribute.final X509v3ExtensionswithPrivateKeyUsagePeriodNotAfter(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theprivateKeyUsagePeriodNotAfterattribute.final X509v3ExtensionsCopy the current immutable object by setting a present value for the optionalprivateKeyUsagePeriodNotAfterattribute.final X509v3ExtensionswithPrivateKeyUsagePeriodNotBefore(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theprivateKeyUsagePeriodNotBeforeattribute.final X509v3ExtensionsCopy the current immutable object by setting a present value for the optionalprivateKeyUsagePeriodNotBeforeattribute.final X509v3ExtensionswithSubjectAlternativeName(String value) Copy the current immutable object by setting a present value for the optionalsubjectAlternativeNameattribute.final X509v3ExtensionswithSubjectAlternativeName(Optional<String> optional) Copy the current immutable object by setting an optional value for thesubjectAlternativeNameattribute.final X509v3ExtensionsCopy the current immutable object by setting a present value for the optionalsubjectDirectoryAttributesattribute.final X509v3ExtensionswithSubjectDirectoryAttributes(Optional<String> optional) Copy the current immutable object by setting an optional value for thesubjectDirectoryAttributesattribute.final X509v3ExtensionswithSubjectKeyIdentifier(String value) Copy the current immutable object by setting a present value for the optionalsubjectKeyIdentifierattribute.final X509v3ExtensionswithSubjectKeyIdentifier(Optional<String> optional) Copy the current immutable object by setting an optional value for thesubjectKeyIdentifierattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.validation.GenericValidation
validateEntityMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyId
-
Method Details
-
getBasicConstraints
@JsonPropertyDescription("Specifies a multi-valued extension which indicates whether a certificate is a CA certificate.") public Optional<String> getBasicConstraints()- Specified by:
getBasicConstraintsin interfaceX509v3ExtensionsObj- Returns:
- The value of the
basicConstraintsattribute
-
getNameConstraints
@JsonPropertyDescription("Specifies a namespace within which all subject names in subsequent certificates in a certification path MUST be located.") public Optional<String> getNameConstraints()- Specified by:
getNameConstraintsin interfaceX509v3ExtensionsObj- Returns:
- The value of the
nameConstraintsattribute
-
getPolicyConstraints
@JsonPropertyDescription("Specifies any constraints on path validation for certificates issued to CAs.") public Optional<String> getPolicyConstraints()- Specified by:
getPolicyConstraintsin interfaceX509v3ExtensionsObj- Returns:
- The value of the
policyConstraintsattribute
-
getKeyUsage
@JsonPropertyDescription("Specifies a multi-valued extension consisting of a list of names of the permitted key usages.") public Optional<String> getKeyUsage()- Specified by:
getKeyUsagein interfaceX509v3ExtensionsObj- Returns:
- The value of the
keyUsageattribute
-
getExtendedKeyUsage
@JsonPropertyDescription("Specifies a list of usages indicating purposes for which the certificate public key can be used for.") public Optional<String> getExtendedKeyUsage()- Specified by:
getExtendedKeyUsagein interfaceX509v3ExtensionsObj- Returns:
- The value of the
extendedKeyUsageattribute
-
getSubjectKeyIdentifier
@JsonPropertyDescription("Specifies the identifier that provides a means of identifying certificates that contain a particular public key.") public Optional<String> getSubjectKeyIdentifier()- Specified by:
getSubjectKeyIdentifierin interfaceX509v3ExtensionsObj- Returns:
- The value of the
subjectKeyIdentifierattribute
-
getAuthorityKeyIdentifier
@JsonPropertyDescription("Specifies the identifier that provides a means of identifying the public key corresponding to the key used to sign a certificate.") public Optional<String> getAuthorityKeyIdentifier()- Specified by:
getAuthorityKeyIdentifierin interfaceX509v3ExtensionsObj- Returns:
- The value of the
authorityKeyIdentifierattribute
-
getSubjectAlternativeName
@JsonPropertyDescription("Specifies the additional identities to be bound to the subject of the certificate.") public Optional<String> getSubjectAlternativeName()- Specified by:
getSubjectAlternativeNamein interfaceX509v3ExtensionsObj- Returns:
- The value of the
subjectAlternativeNameattribute
-
getIssuerAlternativeName
@JsonPropertyDescription("Specifies the additional identities to be bound to the issuer of the certificate.") public Optional<String> getIssuerAlternativeName()- Specified by:
getIssuerAlternativeNamein interfaceX509v3ExtensionsObj- Returns:
- The value of the
issuerAlternativeNameattribute
-
getSubjectDirectoryAttributes
@JsonPropertyDescription("Specifies the identification attributes (e.g., nationality) of the subject.") public Optional<String> getSubjectDirectoryAttributes()- Specified by:
getSubjectDirectoryAttributesin interfaceX509v3ExtensionsObj- Returns:
- The value of the
subjectDirectoryAttributesattribute
-
getCrlDistributionPoints
@JsonPropertyDescription("Specifies how CRL information is obtained.") public Optional<String> getCrlDistributionPoints()- Specified by:
getCrlDistributionPointsin interfaceX509v3ExtensionsObj- Returns:
- The value of the
crlDistributionPointsattribute
-
getInhibitAnyPolicy
@JsonPropertyDescription("Specifies the number of additional certificates that may appear in the path before anyPolicy is no longer permitted.") public Optional<String> getInhibitAnyPolicy()- Specified by:
getInhibitAnyPolicyin interfaceX509v3ExtensionsObj- Returns:
- The value of the
inhibitAnyPolicyattribute
-
getPrivateKeyUsagePeriodNotBefore
@JsonPropertyDescription("Specifies the date on which the validity period begins for the key, if it is different from the validity period of the certificate.") public Optional<StixInstant> getPrivateKeyUsagePeriodNotBefore()- Specified by:
getPrivateKeyUsagePeriodNotBeforein interfaceX509v3ExtensionsObj- Returns:
- The value of the
privateKeyUsagePeriodNotBeforeattribute
-
getPrivateKeyUsagePeriodNotAfter
@JsonPropertyDescription("Specifies the date on which the validity period ends for the key, if it is different from the validity period of the certificate.") public Optional<StixInstant> getPrivateKeyUsagePeriodNotAfter()- Specified by:
getPrivateKeyUsagePeriodNotAfterin interfaceX509v3ExtensionsObj- Returns:
- The value of the
privateKeyUsagePeriodNotAfterattribute
-
getCertificatePolicies
@JsonPropertyDescription("Specifies a sequence of one or more policy information terms, each of which consists of an object identifier (OID) and optional qualifiers.") public Optional<String> getCertificatePolicies()- Specified by:
getCertificatePoliciesin interfaceX509v3ExtensionsObj- Returns:
- The value of the
certificatePoliciesattribute
-
getPolicyMappings
@JsonPropertyDescription("Specifies one or more pairs of OIDs(); each pair includes an issuerDomainPolicy and a subjectDomainPolicy") public Optional<String> getPolicyMappings()- Specified by:
getPolicyMappingsin interfaceX509v3ExtensionsObj- Returns:
- The value of the
policyMappingsattribute
-
getCustomProperties
Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.- Specified by:
getCustomPropertiesin interfaceStixCustomProperties- Returns:
- Map of custom properties
Map<String, Object>
-
withBasicConstraints
Copy the current immutable object by setting a present value for the optionalbasicConstraintsattribute.- Parameters:
value- The value for basicConstraints- Returns:
- A modified copy of
thisobject
-
withBasicConstraints
Copy the current immutable object by setting an optional value for thebasicConstraintsattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for basicConstraints- Returns:
- A modified copy of
thisobject
-
withNameConstraints
Copy the current immutable object by setting a present value for the optionalnameConstraintsattribute.- Parameters:
value- The value for nameConstraints- Returns:
- A modified copy of
thisobject
-
withNameConstraints
Copy the current immutable object by setting an optional value for thenameConstraintsattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for nameConstraints- Returns:
- A modified copy of
thisobject
-
withPolicyConstraints
Copy the current immutable object by setting a present value for the optionalpolicyConstraintsattribute.- Parameters:
value- The value for policyConstraints- Returns:
- A modified copy of
thisobject
-
withPolicyConstraints
Copy the current immutable object by setting an optional value for thepolicyConstraintsattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for policyConstraints- Returns:
- A modified copy of
thisobject
-
withKeyUsage
Copy the current immutable object by setting a present value for the optionalkeyUsageattribute.- Parameters:
value- The value for keyUsage- Returns:
- A modified copy of
thisobject
-
withKeyUsage
Copy the current immutable object by setting an optional value for thekeyUsageattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for keyUsage- Returns:
- A modified copy of
thisobject
-
withExtendedKeyUsage
Copy the current immutable object by setting a present value for the optionalextendedKeyUsageattribute.- Parameters:
value- The value for extendedKeyUsage- Returns:
- A modified copy of
thisobject
-
withExtendedKeyUsage
Copy the current immutable object by setting an optional value for theextendedKeyUsageattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for extendedKeyUsage- Returns:
- A modified copy of
thisobject
-
withSubjectKeyIdentifier
Copy the current immutable object by setting a present value for the optionalsubjectKeyIdentifierattribute.- Parameters:
value- The value for subjectKeyIdentifier- Returns:
- A modified copy of
thisobject
-
withSubjectKeyIdentifier
Copy the current immutable object by setting an optional value for thesubjectKeyIdentifierattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for subjectKeyIdentifier- Returns:
- A modified copy of
thisobject
-
withAuthorityKeyIdentifier
Copy the current immutable object by setting a present value for the optionalauthorityKeyIdentifierattribute.- Parameters:
value- The value for authorityKeyIdentifier- Returns:
- A modified copy of
thisobject
-
withAuthorityKeyIdentifier
Copy the current immutable object by setting an optional value for theauthorityKeyIdentifierattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for authorityKeyIdentifier- Returns:
- A modified copy of
thisobject
-
withSubjectAlternativeName
Copy the current immutable object by setting a present value for the optionalsubjectAlternativeNameattribute.- Parameters:
value- The value for subjectAlternativeName- Returns:
- A modified copy of
thisobject
-
withSubjectAlternativeName
Copy the current immutable object by setting an optional value for thesubjectAlternativeNameattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for subjectAlternativeName- Returns:
- A modified copy of
thisobject
-
withIssuerAlternativeName
Copy the current immutable object by setting a present value for the optionalissuerAlternativeNameattribute.- Parameters:
value- The value for issuerAlternativeName- Returns:
- A modified copy of
thisobject
-
withIssuerAlternativeName
Copy the current immutable object by setting an optional value for theissuerAlternativeNameattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for issuerAlternativeName- Returns:
- A modified copy of
thisobject
-
withSubjectDirectoryAttributes
Copy the current immutable object by setting a present value for the optionalsubjectDirectoryAttributesattribute.- Parameters:
value- The value for subjectDirectoryAttributes- Returns:
- A modified copy of
thisobject
-
withSubjectDirectoryAttributes
Copy the current immutable object by setting an optional value for thesubjectDirectoryAttributesattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for subjectDirectoryAttributes- Returns:
- A modified copy of
thisobject
-
withCrlDistributionPoints
Copy the current immutable object by setting a present value for the optionalcrlDistributionPointsattribute.- Parameters:
value- The value for crlDistributionPoints- Returns:
- A modified copy of
thisobject
-
withCrlDistributionPoints
Copy the current immutable object by setting an optional value for thecrlDistributionPointsattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for crlDistributionPoints- Returns:
- A modified copy of
thisobject
-
withInhibitAnyPolicy
Copy the current immutable object by setting a present value for the optionalinhibitAnyPolicyattribute.- Parameters:
value- The value for inhibitAnyPolicy- Returns:
- A modified copy of
thisobject
-
withInhibitAnyPolicy
Copy the current immutable object by setting an optional value for theinhibitAnyPolicyattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for inhibitAnyPolicy- Returns:
- A modified copy of
thisobject
-
withPrivateKeyUsagePeriodNotBefore
Copy the current immutable object by setting a present value for the optionalprivateKeyUsagePeriodNotBeforeattribute.- Parameters:
value- The value for privateKeyUsagePeriodNotBefore- Returns:
- A modified copy of
thisobject
-
withPrivateKeyUsagePeriodNotBefore
public final X509v3Extensions withPrivateKeyUsagePeriodNotBefore(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theprivateKeyUsagePeriodNotBeforeattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for privateKeyUsagePeriodNotBefore- Returns:
- A modified copy of
thisobject
-
withPrivateKeyUsagePeriodNotAfter
Copy the current immutable object by setting a present value for the optionalprivateKeyUsagePeriodNotAfterattribute.- Parameters:
value- The value for privateKeyUsagePeriodNotAfter- Returns:
- A modified copy of
thisobject
-
withPrivateKeyUsagePeriodNotAfter
public final X509v3Extensions withPrivateKeyUsagePeriodNotAfter(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theprivateKeyUsagePeriodNotAfterattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for privateKeyUsagePeriodNotAfter- Returns:
- A modified copy of
thisobject
-
withCertificatePolicies
Copy the current immutable object by setting a present value for the optionalcertificatePoliciesattribute.- Parameters:
value- The value for certificatePolicies- Returns:
- A modified copy of
thisobject
-
withCertificatePolicies
Copy the current immutable object by setting an optional value for thecertificatePoliciesattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for certificatePolicies- Returns:
- A modified copy of
thisobject
-
withPolicyMappings
Copy the current immutable object by setting a present value for the optionalpolicyMappingsattribute.- Parameters:
value- The value for policyMappings- Returns:
- A modified copy of
thisobject
-
withPolicyMappings
Copy the current immutable object by setting an optional value for thepolicyMappingsattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for policyMappings- Returns:
- A modified copy of
thisobject
-
withCustomProperties
Copy the current immutable object by replacing thecustomPropertiesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the customProperties map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofX509v3Extensionsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:basicConstraints,nameConstraints,policyConstraints,keyUsage,extendedKeyUsage,subjectKeyIdentifier,authorityKeyIdentifier,subjectAlternativeName,issuerAlternativeName,subjectDirectoryAttributes,crlDistributionPoints,inhibitAnyPolicy,privateKeyUsagePeriodNotBefore,privateKeyUsagePeriodNotAfter,certificatePolicies,policyMappings,customProperties. -
toString
Prints the immutable valueX509v3Extensionswith attribute values. -
copyOf
Creates an immutable copy of aX509v3ExtensionsObjvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable X509v3Extensions instance
-
builder
Creates a builder forX509v3Extensions.- Returns:
- A new X509v3Extensions builder
-