Package io.github.mahmoudimus.quic.tls
Class TlsAlert
java.lang.Object
io.github.mahmoudimus.quic.tls.TlsAlert
The TLS alert descriptions (RFC 8446 section 6) the handshake raises. QUIC sends no TLS alerts:
an alert becomes a
CRYPTO_ERROR connection error, 0x0100 + alert (RFC 9001
section 4.8), built by QuicException.tlsAlert(int, String).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAccess was denied (49).static final intA certificate was corrupt or failed a check such as its name (42).static final intAn OCSP response was invalid (113).static final intA record failed to decrypt; not used by QUIC (20).static final intA certificate has expired or is not yet valid (45).static final intThe server required a client certificate and none was sent (116).static final intA certificate was revoked (44).static final intSome other problem with a certificate made it unacceptable (46).static final intA message could not be decoded (50).static final intA handshake cryptographic operation failed, such as a signature or Finished check (51).static final intNo acceptable set of security parameters could be negotiated (40).static final intA field was out of range or inconsistent with other fields (47).static final intA downgrade was detected (86).static final intThe peer's parameters are weaker than required (71).static final intAn internal error unrelated to the peer (80).static final intA message lacked an extension it must carry (109).static final intNo application protocol could be agreed with ALPN (120).static final intThe peer's protocol version is recognized but not supported (70).static final intA message arrived out of order or where it is not allowed (10).static final intThe certificate chain does not lead to a trusted certificate authority (48).static final intA PSK identity was not recognized (115).static final intThe server does not recognize the server name the client asked for (112).static final intA certificate of an unsupported type (43).static final intA message carried an extension that was not offered or not allowed there (110).static final intThe user cancelled the handshake (90). -
Method Summary
Modifier and TypeMethodDescriptionstatic intfromErrorCode(long code) The alert aCRYPTO_ERRORcode carries.static Stringname(int alert) The alert's name, as RFC 8446 spells it.
-
Field Details
-
UNEXPECTED_MESSAGE
public static final int UNEXPECTED_MESSAGEA message arrived out of order or where it is not allowed (10).- See Also:
-
BAD_RECORD_MAC
public static final int BAD_RECORD_MACA record failed to decrypt; not used by QUIC (20).- See Also:
-
HANDSHAKE_FAILURE
public static final int HANDSHAKE_FAILURENo acceptable set of security parameters could be negotiated (40).- See Also:
-
BAD_CERTIFICATE
public static final int BAD_CERTIFICATEA certificate was corrupt or failed a check such as its name (42).- See Also:
-
UNSUPPORTED_CERTIFICATE
public static final int UNSUPPORTED_CERTIFICATEA certificate of an unsupported type (43).- See Also:
-
CERTIFICATE_REVOKED
public static final int CERTIFICATE_REVOKEDA certificate was revoked (44).- See Also:
-
CERTIFICATE_EXPIRED
public static final int CERTIFICATE_EXPIREDA certificate has expired or is not yet valid (45).- See Also:
-
CERTIFICATE_UNKNOWN
public static final int CERTIFICATE_UNKNOWNSome other problem with a certificate made it unacceptable (46).- See Also:
-
ILLEGAL_PARAMETER
public static final int ILLEGAL_PARAMETERA field was out of range or inconsistent with other fields (47).- See Also:
-
UNKNOWN_CA
public static final int UNKNOWN_CAThe certificate chain does not lead to a trusted certificate authority (48).- See Also:
-
ACCESS_DENIED
public static final int ACCESS_DENIEDAccess was denied (49).- See Also:
-
DECODE_ERROR
public static final int DECODE_ERRORA message could not be decoded (50).- See Also:
-
DECRYPT_ERROR
public static final int DECRYPT_ERRORA handshake cryptographic operation failed, such as a signature or Finished check (51).- See Also:
-
PROTOCOL_VERSION
public static final int PROTOCOL_VERSIONThe peer's protocol version is recognized but not supported (70).- See Also:
-
INSUFFICIENT_SECURITY
public static final int INSUFFICIENT_SECURITYThe peer's parameters are weaker than required (71).- See Also:
-
INTERNAL_ERROR
public static final int INTERNAL_ERRORAn internal error unrelated to the peer (80).- See Also:
-
INAPPROPRIATE_FALLBACK
public static final int INAPPROPRIATE_FALLBACKA downgrade was detected (86).- See Also:
-
USER_CANCELED
public static final int USER_CANCELEDThe user cancelled the handshake (90).- See Also:
-
MISSING_EXTENSION
public static final int MISSING_EXTENSIONA message lacked an extension it must carry (109).- See Also:
-
UNSUPPORTED_EXTENSION
public static final int UNSUPPORTED_EXTENSIONA message carried an extension that was not offered or not allowed there (110).- See Also:
-
UNRECOGNIZED_NAME
public static final int UNRECOGNIZED_NAMEThe server does not recognize the server name the client asked for (112).- See Also:
-
BAD_CERTIFICATE_STATUS_RESPONSE
public static final int BAD_CERTIFICATE_STATUS_RESPONSEAn OCSP response was invalid (113).- See Also:
-
UNKNOWN_PSK_IDENTITY
public static final int UNKNOWN_PSK_IDENTITYA PSK identity was not recognized (115).- See Also:
-
CERTIFICATE_REQUIRED
public static final int CERTIFICATE_REQUIREDThe server required a client certificate and none was sent (116).- See Also:
-
NO_APPLICATION_PROTOCOL
public static final int NO_APPLICATION_PROTOCOLNo application protocol could be agreed with ALPN (120).- See Also:
-
-
Method Details
-
name
The alert's name, as RFC 8446 spells it.- Parameters:
alert- the alert description- Returns:
- the name, such as
"handshake_failure", or"alert(N)"for an unknown one
-
fromErrorCode
public static int fromErrorCode(long code) The alert aCRYPTO_ERRORcode carries.- Parameters:
code- a QUIC transport error code- Returns:
- the TLS alert description, or -1 if
codeis not in theCRYPTO_ERRORrange
-