com.trendmicro.ds.network.rest.object.sslconfiguration

## Class SSLCredential

- java.lang.Object
- - com.trendmicro.ds.network.rest.object.sslconfiguration.SSLCredential

-     public class SSLCredential
      extends java.lang.Object

  Details of an SSL credential.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SSLCredential.Type` Supported SSL credential types (PEM, P12, and CAPI).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SSLCredential()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getDetails()` Get the SSL credential details.
    `java.lang.Integer` | `getID()` Get the SSL credential ID.
    `java.lang.String` | `getIdentifier()` Get the SSL credential identifier.
    `java.lang.String` | `getName()` Get the SSL credential name.
    `java.lang.String` | `getPassphrase()` Get the SSL credential passphrase.
    `java.lang.String` | `getPrivateKey()` Get the SSL credential private key.
    `SSLCredential.Type` | `getType()` Get the SSL credential type.
    `void` | `setDetails(java.lang.String details)` Set the SSL credential details.
    `void` | `setID(java.lang.Integer id)` Set the SSL credential ID.
    `void` | `setIdentifier(java.lang.String identifier)` Set the SSL credential identifier.
    `void` | `setName(java.lang.String name)` Set the SSL credential name.
    `void` | `setPassphrase(java.lang.String passphrase)` Set the SSL credential passphrase.
    `void` | `setPrivateKey(java.lang.String privateKey)` Set the SSL credential private key.
    `void` | `setType(SSLCredential.Type type)` Set the SSL credential type.
    `SSLCredential` | `withDetails(java.lang.String details)` Set the SSL credential details.
    `SSLCredential` | `withID(java.lang.Integer id)` Set the SSL credential ID.
    `SSLCredential` | `withIdentifier(java.lang.String identifier)` Set the SSL credential identifier.
    `SSLCredential` | `withName(java.lang.String name)` Set the SSL credential name.
    `SSLCredential` | `withPassphrase(java.lang.String passphrase)` Set the SSL credential passphrase.
    `SSLCredential` | `withPrivateKey(java.lang.String privateKey)` Set the SSL credential private key.
    `SSLCredential` | `withType(SSLCredential.Type type)` Set the SSL credential type.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### SSLCredential

          public SSLCredential()

  - ### Method Detail

    - #### getID

          public java.lang.Integer getID()

      Get the SSL credential ID.
      Returns:
        the SSL credential ID

    - #### setID

          public void setID(java.lang.Integer id)

      Set the SSL credential ID.
      Parameters:
        `id` - the SSL credential's ID

    - #### withID

          public SSLCredential withID(java.lang.Integer id)

      Set the SSL credential ID.
      Parameters:
        `id` - the SSL credential's ID
      Returns:
        the updated SSLCredential object

    - #### getType

          public SSLCredential.Type getType()

      Get the SSL credential type.
      Returns:
        the SSLCredential.Type of the SSL credential

    - #### setType

          public void setType(SSLCredential.Type type)

      Set the SSL credential type.
      Parameters:
        `type` - the SSL credential's SSLCredential.Type

    - #### withType

          public SSLCredential withType(SSLCredential.Type type)

      Set the SSL credential type.
      Parameters:
        `type` - the SSL credential's SSLCredential.Type
      Returns:
        the updated SSLCredential object

    - #### getName

          public java.lang.String getName()

      Get the SSL credential name.
      Returns:
        the SSL credential name

    - #### setName

          public void setName(java.lang.String name)

      Set the SSL credential name.
      Parameters:
        `name` - the SSL credential's name

    - #### withName

          public SSLCredential withName(java.lang.String name)

      Set the SSL credential name.
      Parameters:
        `name` - the SSL credential's name
      Returns:
        the updated SSLCredential object

    - #### getIdentifier

          public java.lang.String getIdentifier()

      Get the SSL credential identifier. For a file, it's the file path. For type = CAPI, it's the name of the certificate.

      Null if the credential is stored in the DSM's database

      Returns:
        the SSL credential's identifier

    - #### setIdentifier

          public void setIdentifier(java.lang.String identifier)

      Set the SSL credential identifier. For a file, it's the file path. For type = CAPI, it's the name of the certificate.

      Note: the identifier is only used if the credential is stored on the host. For credentials that are stored in the DSM's database, use the private key instead. If both an identifier and private key are provided, the identifier will be ignored.

      Parameters:
        `identifier` - the SSL credential's identifier

    - #### withIdentifier

          public SSLCredential withIdentifier(java.lang.String identifier)

      Set the SSL credential identifier. For a file, it's the file path. For type = CAPI, it's the name of the certificate.

      Note: the identifier is only used if the credential is stored on the host. For credentials that are stored in the DSM's database, use the private key instead. If both an identifier and private key are provided, the identifier will be ignored.

      Parameters:
        `identifier` - the SSL credential's identifier
      Returns:
        the updated SSLCredential object

    - #### getPassphrase

          public java.lang.String getPassphrase()

      Get the SSL credential passphrase.

      Note: To prevent accidental disclosure of the passphrase, the Deep Security Manager will not return this value; it can only be used to set the passphrase.

      Returns:
        the SSL credential passphrase or null if the credential does not have one

    - #### setPassphrase

          public void setPassphrase(java.lang.String passphrase)

      Set the SSL credential passphrase.

      Note: To prevent accidental disclosure of the passphrase, the Deep Security Manager will not return this value; it can only be used to set the passphrase.

      Parameters:
        `passphrase` - the SSL credential's passphrase

    - #### withPassphrase

          public SSLCredential withPassphrase(java.lang.String passphrase)

      Set the SSL credential passphrase.

      Note: To prevent accidental disclosure of the passphrase, the Deep Security Manager will not return this value; it can only be used to set the passphrase.

      Parameters:
        `passphrase` - the SSL credential's passphrase
      Returns:
        the updated SSLCredential object

    - #### getDetails

          public java.lang.String getDetails()

      Get the SSL credential details.
      Returns:
        the SSL credential's details

    - #### setDetails

          public void setDetails(java.lang.String details)

      Set the SSL credential details.
      Parameters:
        `details` - the SSL credential's details

    - #### withDetails

          public SSLCredential withDetails(java.lang.String details)

      Set the SSL credential details.
      Parameters:
        `details` - the SSL credential's details
      Returns:
        the updated SSLCredential object

    - #### getPrivateKey

          public java.lang.String getPrivateKey()

      Get the SSL credential private key.

      The Base64-encoded contents of either a PKCS#12 file containing a single private key or a PEM (PKCS#1) file. Use the Type parameter to tell the Deep Security Manager which you are using.

      To prevent accidental disclosure of the private key, the Deep Security Manager will not return this value; it can only be used to set the private key.

      Note: the private key is only used if the credential is stored in the DSM's database. For credentials that are stored on the host, use the identifier instead. If both an identifier and private key are provided, the identifier will be ignored.

      Returns:
        the private key or null if the credential is not stored in the DSM's database

    - #### setPrivateKey

          public void setPrivateKey(java.lang.String privateKey)

      Set the SSL credential private key.

      The private key must be PEM-encoded or bundled in a PKCS12 file.

      To prevent accidental disclosure of the private key, the Deep Security Manager will not return this value; it can only be used to set the private key.

      Note: the private key is only used if the credential is stored in the DSM's database. For credentials that are stored on the host, use the identifier instead. If both an identifier and private key are provided, the identifier will be ignored.

      Parameters:
        `privateKey` - the SSL credential's private key

    - #### withPrivateKey

          public SSLCredential withPrivateKey(java.lang.String privateKey)

      Set the SSL credential private key.

      The private key must be PEM-encoded or bundled in a PKCS12 file.

      To prevent accidental disclosure of the private key, the Deep Security Manager will not return this value; it can only be used to set the private key.

      Note: the private key is only used if the credential is stored in the DSM's database. For credentials that are stored on the host, use the identifier instead. If both an identifier and private key are provided, the identifier will be ignored.

      Parameters:
        `privateKey` - the SSL credential's private key
      Returns:
        the updated SSLCredential object

Copyright © 2017 Trend Micro Inc. All Rights Reserved.