X500PrivateCredential

class X500PrivateCredential : Destroyable
kotlin.Any
   ↳ javax.security.auth.x500.X500PrivateCredential

This class represents an X500PrivateCredential. It associates an X.509 certificate, corresponding private key and the KeyStore alias used to reference that exact key pair in the KeyStore. This enables looking up the private credentials for an X.500 principal in a subject.

Summary

Public constructors

Creates an X500PrivateCredential that associates an X.

Creates an X500PrivateCredential that associates an X.

Public methods
Unit

Clears the references to the X.

String!

Returns the KeyStore alias.

X509Certificate!

Returns the X.

PrivateKey!

Returns the PrivateKey.

Boolean

Determines if the references to the X.

Public constructors

X500PrivateCredential

X500PrivateCredential(
    cert: X509Certificate!,
    key: PrivateKey!)

Creates an X500PrivateCredential that associates an X.509 certificate, a private key and the KeyStore alias.

Parameters
cert X509Certificate!: X509Certificate
key PrivateKey!: PrivateKey for the certificate
Exceptions
java.lang.IllegalArgumentException if either cert or key is null

X500PrivateCredential

X500PrivateCredential(
    cert: X509Certificate!,
    key: PrivateKey!,
    alias: String!)

Creates an X500PrivateCredential that associates an X.509 certificate, a private key and the KeyStore alias.

Parameters
cert X509Certificate!: X509Certificate
key PrivateKey!: PrivateKey for the certificate
alias String!: KeyStore alias
Exceptions
java.lang.IllegalArgumentException if either cert, key or alias is null

Public methods

destroy

fun destroy(): Unit

Clears the references to the X.509 certificate, private key and the KeyStore alias in this object.

getAlias

fun getAlias(): String!

Returns the KeyStore alias.

Return
String! the KeyStore alias

getCertificate

fun getCertificate(): X509Certificate!

Returns the X.509 certificate.

Return
X509Certificate! the X509Certificate

getPrivateKey

fun getPrivateKey(): PrivateKey!

Returns the PrivateKey.

Return
PrivateKey! the PrivateKey

isDestroyed

fun isDestroyed(): Boolean

Determines if the references to the X.509 certificate and private key in this object have been cleared.

Return
Boolean true if X509Certificate and the PrivateKey are null