Enum Class TlsCertificateFlags

java.lang.Object
java.lang.Enum<TlsCertificateFlags>
org.gnome.gio.TlsCertificateFlags
All Implemented Interfaces:
Serializable, Comparable<TlsCertificateFlags>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum TlsCertificateFlags extends Enum<TlsCertificateFlags> implements Enumeration

A set of flags describing TLS certification validation. This can be used to describe why a particular certificate was rejected (for example, in GTlsConnection::accept-certificate).

GLib guarantees that if certificate verification fails, at least one flag will be set, but it does not guarantee that all possible flags will be set. Accordingly, you may not safely decide to ignore any particular type of error. For example, it would be incorrect to mask EXPIRED if you want to allow expired certificates, because this could potentially be the only error flag set even if other problems exist with the certificate.

Since:
2.28
  • Enum Constant Details

    • NO_FLAGS

      public static final TlsCertificateFlags NO_FLAGS
      No flags set. Since: 2.74
    • UNKNOWN_CA

      public static final TlsCertificateFlags UNKNOWN_CA
      The signing certificate authority is not known.
    • BAD_IDENTITY

      public static final TlsCertificateFlags BAD_IDENTITY
      The certificate does not match the expected identity of the site that it was retrieved from.
    • NOT_ACTIVATED

      public static final TlsCertificateFlags NOT_ACTIVATED
      The certificate's activation time is still in the future
    • EXPIRED

      public static final TlsCertificateFlags EXPIRED
      The certificate has expired
    • REVOKED

      public static final TlsCertificateFlags REVOKED
      The certificate has been revoked according to the GTlsConnection's certificate revocation list.
    • INSECURE

      public static final TlsCertificateFlags INSECURE
      The certificate's algorithm is considered insecure.
    • GENERIC_ERROR

      public static final TlsCertificateFlags GENERIC_ERROR
      Some other error occurred validating the certificate
    • VALIDATE_ALL

      public static final TlsCertificateFlags VALIDATE_ALL
      the combination of all of the above flags
  • Method Details

    • values

      public static TlsCertificateFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TlsCertificateFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<TlsCertificateFlags> of(int flags)
      Create a new EnumSet<TlsCertificateFlags> for the provided bitfield
      Parameters:
      flags - the TlsCertificateFlags bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<TlsCertificateFlags> of(MemorySegment address)
      Create a new EnumSet<TlsCertificateFlags> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the TlsCertificateFlags class.
      Returns:
      the GType