Module iu.util.crypt.impl
Package iu.crypt
Class JsonCertificateReference<R extends JsonCertificateReference<R>>
java.lang.Object
iu.crypt.JsonCertificateReference<R>
- Type Parameters:
R- reference type
- All Implemented Interfaces:
WebCertificateReference
- Direct Known Subclasses:
JsonKeyReference
class JsonCertificateReference<R extends JsonCertificateReference<R>>
extends Object
implements WebCertificateReference
Encapsulates JSON properties that refer to or verify an X.509 certificate
chain.
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.iu.crypt.WebCertificateReference
WebCertificateReference.Builder<B extends WebCertificateReference.Builder<B>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the certificate chain.byte[]Gets the certificate SHA-256 thumbprint.byte[]Gets the certificate thumbprint.Gets the URI where X.509 certificate associated with this key can be retrieved.inthashCode()(package private) booleanrepresents(R key) Determines whether or not the known components of this key match the known components of another key.(package private) JsonObjectBuilderserializeTo(JsonObjectBuilder jwkBuilder) Adds serialized JWK attributes to a JSON object builder.toString()(package private) X509Certificate[]Gets the verified certificate chain resolved by this reference.
-
Constructor Details
-
JsonCertificateReference
JsonCertificateReference(JsonValue certRef) Constructor.- Parameters:
certRef-JsonObject
-
-
Method Details
-
getCertificateUri
Description copied from interface:WebCertificateReferenceGets the URI where X.509 certificate associated with this key can be retrieved.The protocol used to acquire the resource MUST provide integrity protection; an HTTP GET request to retrieve the certificate MUST use TLS [RFC2818] [RFC5246]; the identity of the server MUST be validated, as per Section 6 of RFC 6125 [RFC6125].
- Specified by:
getCertificateUriin interfaceWebCertificateReference- Returns:
URI
-
getCertificateChain
Description copied from interface:WebCertificateReferenceGets the certificate chain.- Specified by:
getCertificateChainin interfaceWebCertificateReference- Returns:
- parsed JSON x5c attribute value
-
getCertificateThumbprint
public byte[] getCertificateThumbprint()Description copied from interface:WebCertificateReferenceGets the certificate thumbprint.- Specified by:
getCertificateThumbprintin interfaceWebCertificateReference- Returns:
- JSON x5t attribute value
-
getCertificateSha256Thumbprint
public byte[] getCertificateSha256Thumbprint()Description copied from interface:WebCertificateReferenceGets the certificate SHA-256 thumbprint.- Specified by:
getCertificateSha256Thumbprintin interfaceWebCertificateReference- Returns:
- JSON x5t#S256 attribute value
-
hashCode
public int hashCode() -
equals
-
toString
-
verifiedCertificateChain
X509Certificate[] verifiedCertificateChain()Gets the verified certificate chain resolved by this reference.- Returns:
- Array of
X509Certificate; verified as consistent with the other parameters in this reference, at minimumWebCertificateReference.verify(WebCertificateReference)
-
serializeTo
Adds serialized JWK attributes to a JSON object builder.- Parameters:
jwkBuilder-JsonObjectBuilder- Returns:
- jwkBuilder
-
represents
Determines whether or not the known components of this key match the known components of another key.- Parameters:
key-WebKey- Returns:
- true if all non-null components of both keys match
-