Package org.bouncycastle.est
Class TlsUniqueAttributeUtil
- java.lang.Object
-
- org.bouncycastle.est.TlsUniqueAttributeUtil
-
public class TlsUniqueAttributeUtil extends java.lang.ObjectHelper for emitting the EST transport-identity-linking attribute (RFC 7030 §3.5) into a PKCS#10 certification request, with RFC 7894-aware selection of the attribute type.RFC 7030 §3.5 originally tunnelled the
tls-uniquevalue through the overloaded PKCS#9challengePasswordattribute. RFC 7894 §3.3 introducedid-aa-estIdentityLinkingas the unambiguous attribute for the same purpose. Per RFC 7894 §4, clients that seeestIdentityLinkingin the server's CSR-Attributes response SHOULD prefer it and SHOULD NOT also includechallengePassword; clients that do not have a response (or whose response does not advertise it) should continue to use the legacy attribute for compatibility.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetTlsUniqueAttribute(PKCS10CertificationRequestBuilder builder, byte[] tlsUnique, CSRAttributesResponse csrAttrs)Set the EST transport-identity-linking attribute onbuilderfrom the suppliedtls-uniquechannel-binding value.
-
-
-
Method Detail
-
setTlsUniqueAttribute
public static void setTlsUniqueAttribute(PKCS10CertificationRequestBuilder builder, byte[] tlsUnique, CSRAttributesResponse csrAttrs)
Set the EST transport-identity-linking attribute onbuilderfrom the suppliedtls-uniquechannel-binding value. The attribute type is chosen per RFC 7894 §4:- If
csrAttrsis non-null and advertisesPKCSObjectIdentifiers.id_aa_estIdentityLinking, the value goes into anid-aa-estIdentityLinkingattribute (preferred). - Otherwise the value goes into the legacy
PKCSObjectIdentifiers.pkcs_9_at_challengePasswordattribute for compatibility with pre-RFC-7894 servers.
tlsUnique.- Parameters:
builder- the PKCS#10 request builder being assembled.tlsUnique- the rawtls-uniquebytes (RFC 5929) for the current TLS session.csrAttrs- the CSR-Attributes response previously fetched from the server, ornullif none is available.
- If
-
-