Class SSLCredential
This API is only supported when using BoringSSL. For usage instructions and detailed documentation, see the BoringSSL SSL_CREDENTIAL documentation.
SSL_CREDENTIAL objects allow fine-grained control over certificate and private key configuration, including support for multiple credentials, delegated credentials, and SPAKE2+ authentication.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidfree(long cred) Free an SSL_CREDENTIAL and decrement its reference count.static longCreate a new delegated SSL_CREDENTIAL.static longnewX509()Create a new X509 SSL_CREDENTIAL.static voidsetCertChain(long cred, long chain) Set the certificate chain for an SSL_CREDENTIAL.static voidsetCertificateProperties(long cred, byte[] properties) Set the certificate properties for an SSL_CREDENTIAL.static voidsetDelegatedCredential(long cred, byte[] delegatedCred) Set the delegated credential for an SSL_CREDENTIAL.static voidsetMustMatchIssuer(long cred, boolean mustMatch) Set whether the issuer must match for an SSL_CREDENTIAL.static voidsetOcspResponse(long cred, byte[] response) Set the OCSP response for an SSL_CREDENTIAL.static voidsetPrivateKey(long cred, long key) Set the private key for an SSL_CREDENTIAL.static voidsetSignedCertTimestampList(long cred, byte[] sctList) Set the signed certificate timestamp list for an SSL_CREDENTIAL.static voidsetSigningAlgorithmPrefs(long cred, int[] prefs) Set the signing algorithm preferences for an SSL_CREDENTIAL.static voidsetTrustAnchorId(long cred, byte[] id) Set the trust anchor ID for an SSL_CREDENTIAL.static voidupRef(long cred) Increment the reference count of an SSL_CREDENTIAL.
-
Constructor Details
-
SSLCredential
private SSLCredential()
-
-
Method Details
-
newX509
Create a new X509 SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_new_x509 for detailed documentation.
- Returns:
- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)
- Throws:
Exception- if an error occurred
-
upRef
Increment the reference count of an SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_up_ref for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)- Throws:
Exception- if an error occurred
-
free
Free an SSL_CREDENTIAL and decrement its reference count.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_free for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)- Throws:
Exception- if an error occurred
-
setPrivateKey
Set the private key for an SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_set1_private_key for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)key- the private key (EVP_PKEY *)- Throws:
Exception- if an error occurred
-
setCertChain
Set the certificate chain for an SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_set1_cert_chain for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)chain- the certificate chain (STACK_OF(CRYPTO_BUFFER) *)- Throws:
Exception- if an error occurred
-
setOcspResponse
Set the OCSP response for an SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_set1_ocsp_response for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)response- the OCSP response bytes- Throws:
Exception- if an error occurred
-
setSigningAlgorithmPrefs
Set the signing algorithm preferences for an SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_set1_signing_algorithm_prefs for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)prefs- the signing algorithm preferences- Throws:
Exception- if an error occurred
-
setCertificateProperties
Set the certificate properties for an SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_set1_certificate_properties for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)properties- the certificate properties- Throws:
Exception- if an error occurred
-
setSignedCertTimestampList
Set the signed certificate timestamp list for an SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_set1_signed_cert_timestamp_list for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)sctList- the signed certificate timestamp list- Throws:
Exception- if an error occurred
-
setMustMatchIssuer
Set whether the issuer must match for an SSL_CREDENTIAL.This is a BoringSSL-specific feature. See SSL_CREDENTIAL_set_must_match_issuer for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)mustMatch-trueif issuer must match,falseotherwise- Throws:
Exception- if an error occurred
-
setTrustAnchorId
Set the trust anchor ID for an SSL_CREDENTIAL.This is a BoringSSL-specific feature for trust anchor configuration. See SSL_CREDENTIAL_set1_trust_anchor_id for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)id- the trust anchor ID- Throws:
Exception- if an error occurred
-
newDelegated
Create a new delegated SSL_CREDENTIAL.This is a BoringSSL-specific feature for delegated credential support. See SSL_CREDENTIAL_new_delegated for detailed documentation.
- Returns:
- the delegated SSL_CREDENTIAL instance (SSL_CREDENTIAL *)
- Throws:
Exception- if an error occurred
-
setDelegatedCredential
Set the delegated credential for an SSL_CREDENTIAL.This is a BoringSSL-specific feature for delegated credential configuration. See SSL_CREDENTIAL_set1_delegated_credential for detailed documentation.
- Parameters:
cred- the SSL_CREDENTIAL instance (SSL_CREDENTIAL *)delegatedCred- the delegated credential bytes- Throws:
Exception- if an error occurred
-