Class TlsUniqueAttributeUtil
java.lang.Object
org.bouncycastle.est.TlsUniqueAttributeUtil
Helper 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-unique value through the overloaded
PKCS#9 challengePassword attribute.
RFC 7894 §3.3
introduced id-aa-estIdentityLinking as the unambiguous attribute for
the same purpose. Per
RFC 7894 §4,
clients that see estIdentityLinking in the server's CSR-Attributes
response SHOULD prefer it and SHOULD NOT also include
challengePassword; 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
Modifier and TypeMethodDescriptionstatic voidsetTlsUniqueAttribute(PKCS10CertificationRequestBuilder builder, byte[] tlsUnique, CSRAttributesResponse csrAttrs) Set the EST transport-identity-linking attribute onbuilderfrom the suppliedtls-uniquechannel-binding value.
-
Method Details
-
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
-