Record Class CertificateRevocationList
java.lang.Object
java.lang.Record
net.fabricmc.loom.configuration.providers.minecraft.verify.CertificateRevocationList
public record CertificateRevocationList(Collection<X509CRL> crls, boolean downloadFailure)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCertificateRevocationList(Collection<X509CRL> crls, boolean downloadFailure) Creates an instance of aCertificateRevocationListrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CertificateRevocationListAttempt to download the CRL from the given URL, if we fail to get it its not the end of the world.crls()Returns the value of thecrlsrecord component.booleanReturns the value of thedownloadFailurerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.voidverify(CertificateChain certificateChain) Verify that none of the certs in the chain are revoked.
-
Field Details
-
CSC3_2010
Hardcoded CRLs for Mojang's certificate, we don't want to add a large dependency just to parse this each time.
-
-
Constructor Details
-
CertificateRevocationList
Creates an instance of aCertificateRevocationListrecord class.- Parameters:
crls- the value for thecrlsrecord componentdownloadFailure- the value for thedownloadFailurerecord component
-
-
Method Details
-
create
public static CertificateRevocationList create(org.gradle.api.Project project, List<String> urls) throws IOException Attempt to download the CRL from the given URL, if we fail to get it its not the end of the world.- Throws:
IOException
-
verify
Verify that none of the certs in the chain are revoked.- Throws:
SignatureVerificationFailure- if the certificate is revoked
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
crls
Returns the value of thecrlsrecord component.- Returns:
- the value of the
crlsrecord component
-
downloadFailure
public boolean downloadFailure()Returns the value of thedownloadFailurerecord component.- Returns:
- the value of the
downloadFailurerecord component
-