162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2023, Oracle and/or its affiliates. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * TLS Protocol definitions 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * From https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#ifndef _TLS_PROT_H 1162306a36Sopenharmony_ci#define _TLS_PROT_H 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* 1462306a36Sopenharmony_ci * TLS Record protocol: ContentType 1562306a36Sopenharmony_ci */ 1662306a36Sopenharmony_cienum { 1762306a36Sopenharmony_ci TLS_RECORD_TYPE_CHANGE_CIPHER_SPEC = 20, 1862306a36Sopenharmony_ci TLS_RECORD_TYPE_ALERT = 21, 1962306a36Sopenharmony_ci TLS_RECORD_TYPE_HANDSHAKE = 22, 2062306a36Sopenharmony_ci TLS_RECORD_TYPE_DATA = 23, 2162306a36Sopenharmony_ci TLS_RECORD_TYPE_HEARTBEAT = 24, 2262306a36Sopenharmony_ci TLS_RECORD_TYPE_TLS12_CID = 25, 2362306a36Sopenharmony_ci TLS_RECORD_TYPE_ACK = 26, 2462306a36Sopenharmony_ci}; 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci/* 2762306a36Sopenharmony_ci * TLS Alert protocol: AlertLevel 2862306a36Sopenharmony_ci */ 2962306a36Sopenharmony_cienum { 3062306a36Sopenharmony_ci TLS_ALERT_LEVEL_WARNING = 1, 3162306a36Sopenharmony_ci TLS_ALERT_LEVEL_FATAL = 2, 3262306a36Sopenharmony_ci}; 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci/* 3562306a36Sopenharmony_ci * TLS Alert protocol: AlertDescription 3662306a36Sopenharmony_ci */ 3762306a36Sopenharmony_cienum { 3862306a36Sopenharmony_ci TLS_ALERT_DESC_CLOSE_NOTIFY = 0, 3962306a36Sopenharmony_ci TLS_ALERT_DESC_UNEXPECTED_MESSAGE = 10, 4062306a36Sopenharmony_ci TLS_ALERT_DESC_BAD_RECORD_MAC = 20, 4162306a36Sopenharmony_ci TLS_ALERT_DESC_RECORD_OVERFLOW = 22, 4262306a36Sopenharmony_ci TLS_ALERT_DESC_HANDSHAKE_FAILURE = 40, 4362306a36Sopenharmony_ci TLS_ALERT_DESC_BAD_CERTIFICATE = 42, 4462306a36Sopenharmony_ci TLS_ALERT_DESC_UNSUPPORTED_CERTIFICATE = 43, 4562306a36Sopenharmony_ci TLS_ALERT_DESC_CERTIFICATE_REVOKED = 44, 4662306a36Sopenharmony_ci TLS_ALERT_DESC_CERTIFICATE_EXPIRED = 45, 4762306a36Sopenharmony_ci TLS_ALERT_DESC_CERTIFICATE_UNKNOWN = 46, 4862306a36Sopenharmony_ci TLS_ALERT_DESC_ILLEGAL_PARAMETER = 47, 4962306a36Sopenharmony_ci TLS_ALERT_DESC_UNKNOWN_CA = 48, 5062306a36Sopenharmony_ci TLS_ALERT_DESC_ACCESS_DENIED = 49, 5162306a36Sopenharmony_ci TLS_ALERT_DESC_DECODE_ERROR = 50, 5262306a36Sopenharmony_ci TLS_ALERT_DESC_DECRYPT_ERROR = 51, 5362306a36Sopenharmony_ci TLS_ALERT_DESC_TOO_MANY_CIDS_REQUESTED = 52, 5462306a36Sopenharmony_ci TLS_ALERT_DESC_PROTOCOL_VERSION = 70, 5562306a36Sopenharmony_ci TLS_ALERT_DESC_INSUFFICIENT_SECURITY = 71, 5662306a36Sopenharmony_ci TLS_ALERT_DESC_INTERNAL_ERROR = 80, 5762306a36Sopenharmony_ci TLS_ALERT_DESC_INAPPROPRIATE_FALLBACK = 86, 5862306a36Sopenharmony_ci TLS_ALERT_DESC_USER_CANCELED = 90, 5962306a36Sopenharmony_ci TLS_ALERT_DESC_MISSING_EXTENSION = 109, 6062306a36Sopenharmony_ci TLS_ALERT_DESC_UNSUPPORTED_EXTENSION = 110, 6162306a36Sopenharmony_ci TLS_ALERT_DESC_UNRECOGNIZED_NAME = 112, 6262306a36Sopenharmony_ci TLS_ALERT_DESC_BAD_CERTIFICATE_STATUS_RESPONSE = 113, 6362306a36Sopenharmony_ci TLS_ALERT_DESC_UNKNOWN_PSK_IDENTITY = 115, 6462306a36Sopenharmony_ci TLS_ALERT_DESC_CERTIFICATE_REQUIRED = 116, 6562306a36Sopenharmony_ci TLS_ALERT_DESC_NO_APPLICATION_PROTOCOL = 120, 6662306a36Sopenharmony_ci}; 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci#endif /* _TLS_PROT_H */ 69