# Class TrustStoreCallback

java.lang.Object
jakarta.security.auth.message.callback.TrustStoreCallback

All Implemented Interfaces:
  `Callback`

public class TrustStoreCallback extends Object implements Callback
A Callback enabling an authentication module to request a truststore from the runtime.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TrustStoreCallback()`
  Constructs a new TrustStoreCallback.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `KeyStore`
  `getTrustStore()`
  Returns the trust store.
  `void`
  `setTrustStore(KeyStore trustStore)`
  Sets the trust store to be used for certificate validation.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TrustStoreCallback

    public TrustStoreCallback()
    Constructs a new TrustStoreCallback.

- ## Method Details

  - ### setTrustStore

    public void setTrustStore(KeyStore trustStore)
    Sets the trust store to be used for certificate validation.
    Parameters:
      `trustStore` - The trust store containing trusted certificates

  - ### getTrustStore

    public KeyStore getTrustStore()
    Returns the trust store.
    Returns:
      The trust store, or `null` if not set