Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: tls.h
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
[0] Fix | Delete
/*
[1] Fix | Delete
* Copyright (c) 2016-2017, Mellanox Technologies. All rights reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* This software is available to you under a choice of one of two
[4] Fix | Delete
* licenses. You may choose to be licensed under the terms of the GNU
[5] Fix | Delete
* General Public License (GPL) Version 2, available from the file
[6] Fix | Delete
* COPYING in the main directory of this source tree, or the
[7] Fix | Delete
* OpenIB.org BSD license below:
[8] Fix | Delete
*
[9] Fix | Delete
* Redistribution and use in source and binary forms, with or
[10] Fix | Delete
* without modification, are permitted provided that the following
[11] Fix | Delete
* conditions are met:
[12] Fix | Delete
*
[13] Fix | Delete
* - Redistributions of source code must retain the above
[14] Fix | Delete
* copyright notice, this list of conditions and the following
[15] Fix | Delete
* disclaimer.
[16] Fix | Delete
*
[17] Fix | Delete
* - Redistributions in binary form must reproduce the above
[18] Fix | Delete
* copyright notice, this list of conditions and the following
[19] Fix | Delete
* disclaimer in the documentation and/or other materials
[20] Fix | Delete
* provided with the distribution.
[21] Fix | Delete
*
[22] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
[23] Fix | Delete
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
[24] Fix | Delete
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
[25] Fix | Delete
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
[26] Fix | Delete
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
[27] Fix | Delete
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
[28] Fix | Delete
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
[29] Fix | Delete
* SOFTWARE.
[30] Fix | Delete
*/
[31] Fix | Delete
[32] Fix | Delete
#ifndef _LINUX_TLS_H
[33] Fix | Delete
#define _LINUX_TLS_H
[34] Fix | Delete
[35] Fix | Delete
#include <linux/types.h>
[36] Fix | Delete
[37] Fix | Delete
/* TLS socket options */
[38] Fix | Delete
#define TLS_TX 1 /* Set transmit parameters */
[39] Fix | Delete
#define TLS_RX 2 /* Set receive parameters */
[40] Fix | Delete
[41] Fix | Delete
/* Supported versions */
[42] Fix | Delete
#define TLS_VERSION_MINOR(ver) ((ver) & 0xFF)
[43] Fix | Delete
#define TLS_VERSION_MAJOR(ver) (((ver) >> 8) & 0xFF)
[44] Fix | Delete
[45] Fix | Delete
#define TLS_VERSION_NUMBER(id) ((((id##_VERSION_MAJOR) & 0xFF) << 8) | \
[46] Fix | Delete
((id##_VERSION_MINOR) & 0xFF))
[47] Fix | Delete
[48] Fix | Delete
#define TLS_1_2_VERSION_MAJOR 0x3
[49] Fix | Delete
#define TLS_1_2_VERSION_MINOR 0x3
[50] Fix | Delete
#define TLS_1_2_VERSION TLS_VERSION_NUMBER(TLS_1_2)
[51] Fix | Delete
[52] Fix | Delete
#define TLS_1_3_VERSION_MAJOR 0x3
[53] Fix | Delete
#define TLS_1_3_VERSION_MINOR 0x4
[54] Fix | Delete
#define TLS_1_3_VERSION TLS_VERSION_NUMBER(TLS_1_3)
[55] Fix | Delete
[56] Fix | Delete
/* Supported ciphers */
[57] Fix | Delete
#define TLS_CIPHER_AES_GCM_128 51
[58] Fix | Delete
#define TLS_CIPHER_AES_GCM_128_IV_SIZE 8
[59] Fix | Delete
#define TLS_CIPHER_AES_GCM_128_KEY_SIZE 16
[60] Fix | Delete
#define TLS_CIPHER_AES_GCM_128_SALT_SIZE 4
[61] Fix | Delete
#define TLS_CIPHER_AES_GCM_128_TAG_SIZE 16
[62] Fix | Delete
#define TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE 8
[63] Fix | Delete
[64] Fix | Delete
#define TLS_CIPHER_AES_GCM_256 52
[65] Fix | Delete
#define TLS_CIPHER_AES_GCM_256_IV_SIZE 8
[66] Fix | Delete
#define TLS_CIPHER_AES_GCM_256_KEY_SIZE 32
[67] Fix | Delete
#define TLS_CIPHER_AES_GCM_256_SALT_SIZE 4
[68] Fix | Delete
#define TLS_CIPHER_AES_GCM_256_TAG_SIZE 16
[69] Fix | Delete
#define TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE 8
[70] Fix | Delete
[71] Fix | Delete
#define TLS_CIPHER_AES_CCM_128 53
[72] Fix | Delete
#define TLS_CIPHER_AES_CCM_128_IV_SIZE 8
[73] Fix | Delete
#define TLS_CIPHER_AES_CCM_128_KEY_SIZE 16
[74] Fix | Delete
#define TLS_CIPHER_AES_CCM_128_SALT_SIZE 4
[75] Fix | Delete
#define TLS_CIPHER_AES_CCM_128_TAG_SIZE 16
[76] Fix | Delete
#define TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE 8
[77] Fix | Delete
[78] Fix | Delete
#define TLS_SET_RECORD_TYPE 1
[79] Fix | Delete
#define TLS_GET_RECORD_TYPE 2
[80] Fix | Delete
[81] Fix | Delete
struct tls_crypto_info {
[82] Fix | Delete
__u16 version;
[83] Fix | Delete
__u16 cipher_type;
[84] Fix | Delete
};
[85] Fix | Delete
[86] Fix | Delete
struct tls12_crypto_info_aes_gcm_128 {
[87] Fix | Delete
struct tls_crypto_info info;
[88] Fix | Delete
unsigned char iv[TLS_CIPHER_AES_GCM_128_IV_SIZE];
[89] Fix | Delete
unsigned char key[TLS_CIPHER_AES_GCM_128_KEY_SIZE];
[90] Fix | Delete
unsigned char salt[TLS_CIPHER_AES_GCM_128_SALT_SIZE];
[91] Fix | Delete
unsigned char rec_seq[TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE];
[92] Fix | Delete
};
[93] Fix | Delete
[94] Fix | Delete
struct tls12_crypto_info_aes_gcm_256 {
[95] Fix | Delete
struct tls_crypto_info info;
[96] Fix | Delete
unsigned char iv[TLS_CIPHER_AES_GCM_256_IV_SIZE];
[97] Fix | Delete
unsigned char key[TLS_CIPHER_AES_GCM_256_KEY_SIZE];
[98] Fix | Delete
unsigned char salt[TLS_CIPHER_AES_GCM_256_SALT_SIZE];
[99] Fix | Delete
unsigned char rec_seq[TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE];
[100] Fix | Delete
};
[101] Fix | Delete
[102] Fix | Delete
struct tls12_crypto_info_aes_ccm_128 {
[103] Fix | Delete
struct tls_crypto_info info;
[104] Fix | Delete
unsigned char iv[TLS_CIPHER_AES_CCM_128_IV_SIZE];
[105] Fix | Delete
unsigned char key[TLS_CIPHER_AES_CCM_128_KEY_SIZE];
[106] Fix | Delete
unsigned char salt[TLS_CIPHER_AES_CCM_128_SALT_SIZE];
[107] Fix | Delete
unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE];
[108] Fix | Delete
};
[109] Fix | Delete
[110] Fix | Delete
enum {
[111] Fix | Delete
TLS_INFO_UNSPEC,
[112] Fix | Delete
TLS_INFO_VERSION,
[113] Fix | Delete
TLS_INFO_CIPHER,
[114] Fix | Delete
TLS_INFO_TXCONF,
[115] Fix | Delete
TLS_INFO_RXCONF,
[116] Fix | Delete
__TLS_INFO_MAX,
[117] Fix | Delete
};
[118] Fix | Delete
#define TLS_INFO_MAX (__TLS_INFO_MAX - 1)
[119] Fix | Delete
[120] Fix | Delete
#define TLS_CONF_BASE 1
[121] Fix | Delete
#define TLS_CONF_SW 2
[122] Fix | Delete
#define TLS_CONF_HW 3
[123] Fix | Delete
#define TLS_CONF_HW_RECORD 4
[124] Fix | Delete
[125] Fix | Delete
#endif /* _LINUX_TLS_H */
[126] Fix | Delete
[127] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function