# Class OpenSSLStatus

java.lang.Object
org.apache.tomcat.util.net.openssl.OpenSSLStatus

public class OpenSSLStatus extends Object
Holds OpenSSL status without the need to load other classes.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `OpenSSLStatus.Name`
  OpenSSL library variant that has been identified.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenSSLStatus()`
  Constructs an OpenSSLStatus.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `getMajorVersion()`
  Returns the OpenSSL major version.
  `static int`
  `getMinorVersion()`
  Returns the OpenSSL minor version.
  `static OpenSSLStatus.Name`
  `getName()`
  Returns the OpenSSL library name.
  `static boolean`
  `getUseOpenSSL()`
  Checks if OpenSSL should be used.
  `static long`
  `getVersion()`
  Returns the OpenSSL version.
  `static boolean`
  `isAvailable()`
  Checks if OpenSSL is available.
  `static boolean`
  `isBoringSSL()`
  Checks if running with BoringSSL.
  `static boolean`
  `isInitialized()`
  Checks if OpenSSL has been initialized.
  `static boolean`
  `isInstanceCreated()`
  Checks if an OpenSSL instance has been created.
  `static boolean`
  `isLibraryInitialized()`
  Checks if the OpenSSL library has been initialized.
  `static boolean`
  `isLibreSSLPre35()`
  Checks if running with LibreSSL earlier than 3.5.
  `static boolean`
  `isOpenSSL3()`
  Checks if running with OpenSSL 3.0 or later.
  `static void`
  `setAvailable(boolean available)`
  Sets the availability state.
  `static void`
  `setInitialized(boolean initialized)`
  Sets the initialization state.
  `static void`
  `setInstanceCreated(boolean instanceCreated)`
  Sets the instance created state.
  `static void`
  `setLibraryInitialized(boolean libraryInitialized)`
  Sets the library initialization state.
  `static void`
  `setMajorVersion(int majorVersion)`
  Sets the OpenSSL major version.
  `static void`
  `setMinorVersion(int minorVersion)`
  Sets the OpenSSL minor version.
  `static void`
  `setName(OpenSSLStatus.Name name)`
  Sets the OpenSSL library name.
  `static void`
  `setUseOpenSSL(boolean useOpenSSL)`
  Sets whether OpenSSL should be used.
  `static void`
  `setVersion(long version)`
  Sets the OpenSSL version.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### OpenSSLStatus

    public OpenSSLStatus()
    Constructs an OpenSSLStatus.

- ## Method Details

  - ### isLibraryInitialized

    public static boolean isLibraryInitialized()
    Checks if the OpenSSL library has been initialized.
    Returns:
      true if the library is initialized

  - ### isInitialized

    public static boolean isInitialized()
    Checks if OpenSSL has been initialized.
    Returns:
      true if OpenSSL is initialized

  - ### isAvailable

    public static boolean isAvailable()
    Checks if OpenSSL is available.
    Returns:
      true if OpenSSL is available

  - ### getUseOpenSSL

    public static boolean getUseOpenSSL()
    Checks if OpenSSL should be used.
    Returns:
      true if OpenSSL should be used

  - ### isInstanceCreated

    public static boolean isInstanceCreated()
    Checks if an OpenSSL instance has been created.
    Returns:
      true if an instance has been created

  - ### setLibraryInitialized

    public static void setLibraryInitialized(boolean libraryInitialized)
    Sets the library initialization state.
    Parameters:
      `libraryInitialized` - true if the library is initialized

  - ### setInitialized

    public static void setInitialized(boolean initialized)
    Sets the initialization state.
    Parameters:
      `initialized` - true if OpenSSL is initialized

  - ### setAvailable

    public static void setAvailable(boolean available)
    Sets the availability state.
    Parameters:
      `available` - true if OpenSSL is available

  - ### setUseOpenSSL

    public static void setUseOpenSSL(boolean useOpenSSL)
    Sets whether OpenSSL should be used.
    Parameters:
      `useOpenSSL` - true if OpenSSL should be used

  - ### setInstanceCreated

    public static void setInstanceCreated(boolean instanceCreated)
    Sets the instance created state.
    Parameters:
      `instanceCreated` - true if an instance has been created

  - ### getVersion

    public static long getVersion()
    Returns the OpenSSL version.
    Returns:
      The version number

  - ### setVersion

    public static void setVersion(long version)
    Sets the OpenSSL version.
    Parameters:
      `version` - The version number

  - ### getMajorVersion

    public static int getMajorVersion()
    Returns the OpenSSL major version.
    Returns:
      The major version number

  - ### setMajorVersion

    public static void setMajorVersion(int majorVersion)
    Sets the OpenSSL major version.
    Parameters:
      `majorVersion` - The major version number

  - ### getMinorVersion

    public static int getMinorVersion()
    Returns the OpenSSL minor version.
    Returns:
      The minor version number

  - ### setMinorVersion

    public static void setMinorVersion(int minorVersion)
    Sets the OpenSSL minor version.
    Parameters:
      `minorVersion` - The minor version number

  - ### getName

    public static OpenSSLStatus.Name getName()
    Returns the OpenSSL library name.
    Returns:
      The library name

  - ### setName

    public static void setName(OpenSSLStatus.Name name)
    Sets the OpenSSL library name.
    Parameters:
      `name` - The library name

  - ### isOpenSSL3

    public static boolean isOpenSSL3()
    Checks if running with OpenSSL 3.0 or later.
    Returns:
      true if running with OpenSSL 3.0+

  - ### isBoringSSL

    public static boolean isBoringSSL()
    Checks if running with BoringSSL.
    Returns:
      true if running with BoringSSL

  - ### isLibreSSLPre35

    public static boolean isLibreSSLPre35()
    Checks if running with LibreSSL earlier than 3.5.
    Returns:
      true if running with LibreSSL < 3.5