Class TlsContextPkcs11Options

    • Constructor Detail

      • TlsContextPkcs11Options

        public TlsContextPkcs11Options​(Pkcs11Lib pkcs11Lib)
        Constructor
        Parameters:
        pkcs11Lib - use this PKCS#11 library
    • Method Detail

      • withUserPin

        public TlsContextPkcs11Options withUserPin​(String pin)
        Use this PIN to log the user into the PKCS#11 token. Leave unspecified to log into a token with a "protected authentication path".
        Parameters:
        pin - PIN
        Returns:
        this
      • withSlotId

        public TlsContextPkcs11Options withSlotId​(long slotId)
        Specify the slot ID containing a PKCS#11 token. If not specified, the token will be chosen based on other criteria (such as token label).
        Parameters:
        slotId - slot ID
        Returns:
        this
      • withTokenLabel

        public TlsContextPkcs11Options withTokenLabel​(String label)
        Specify the label of the PKCS#11 token to use. If not specified, the token will be chosen based on other criteria (such as slot ID).
        Parameters:
        label - label of token
        Returns:
        this
      • withPrivateKeyObjectLabel

        public TlsContextPkcs11Options withPrivateKeyObjectLabel​(String label)
        Specify the label of the private key object on the PKCS#11 token. If not specified, the key will be chosen based on other criteria (such as being the only available private key on the token).
        Parameters:
        label - label of private key object
        Returns:
        this