IcedTea-Web NetX

## net.sourceforge.jnlp.security
Class SecurityUtil

    java.lang.Object
      net.sourceforge.jnlp.security.SecurityUtil

    public class SecurityUtil

extends java.lang.Object

Constructor Summary
`SecurityUtil()`

Method Summary
`static boolean` `checkTrustedCertsFile()` Checks the user's home directory to see if the trusted.certs file exists.
`static java.security.KeyStore` `getCacertsKeyStore()` Returns the keystore associated with the JDK cacerts file, or null otherwise.
`static java.lang.String` `getCN(java.lang.String principal)` Extracts the CN field from a Certificate principal string.
`static java.security.KeyStore` `getSystemCertStore()` Returns the keystore associated with the system certs file, or null otherwise.
`static java.lang.String` `getTrustedCertsFilename()`
`static char[]` `getTrustedCertsPassword()`
`static java.security.KeyStore` `getUserKeyStore()` Returns the keystore associated with the user's trusted.certs file, or null otherwise.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SecurityUtil

    public SecurityUtil()

Method Detail

### getTrustedCertsFilename

    public static java.lang.String getTrustedCertsFilename()
                                                    throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### getTrustedCertsPassword

    public static char[] getTrustedCertsPassword()

### getCN

    public static java.lang.String getCN(java.lang.String principal)

  Extracts the CN field from a Certificate principal string. Or, if it can't find that, return the principal unmodified. This is a simple (and hence 'wrong') version. See http://www.ietf.org/rfc/rfc2253.txt for all the gory details.

### checkTrustedCertsFile

    public static boolean checkTrustedCertsFile()
                                         throws java.lang.Exception

  Checks the user's home directory to see if the trusted.certs file exists. If it does not exist, it tries to create an empty keystore.

  Returns:
    true if the trusted.certs file exists or a new trusted.certs was created successfully, otherwise false.
  Throws:
    `java.lang.Exception`

### getUserKeyStore

    public static java.security.KeyStore getUserKeyStore()
                                                  throws java.lang.Exception

  Returns the keystore associated with the user's trusted.certs file, or null otherwise.

  Throws:
    `java.lang.Exception`

### getCacertsKeyStore

    public static java.security.KeyStore getCacertsKeyStore()
                                                     throws java.lang.Exception

  Returns the keystore associated with the JDK cacerts file, or null otherwise.

  Throws:
    `java.lang.Exception`

### getSystemCertStore

    public static java.security.KeyStore getSystemCertStore()
                                                     throws java.lang.Exception

  Returns the keystore associated with the system certs file, or null otherwise.

  Throws:
    `java.lang.Exception`

IcedTea-Web NetX

Submit a bug or feature