blob: 73618e00dc62061da3a8b3e9c104400d1cd5c49a [file] [log] [blame]
Christopher Ferris1308ad32017-11-14 17:32:13 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_TLS_H
20#define _UAPI_LINUX_TLS_H
21#include <linux/types.h>
22#include <asm/byteorder.h>
23#include <linux/socket.h>
24#include <linux/tcp.h>
25#include <net/tcp.h>
26#define TLS_TX 1
27#define TLS_VERSION_MINOR(ver) ((ver) & 0xFF)
28#define TLS_VERSION_MAJOR(ver) (((ver) >> 8) & 0xFF)
29#define TLS_VERSION_NUMBER(id) ((((id ##_VERSION_MAJOR) & 0xFF) << 8) | ((id ##_VERSION_MINOR) & 0xFF))
30#define TLS_1_2_VERSION_MAJOR 0x3
31#define TLS_1_2_VERSION_MINOR 0x3
32#define TLS_1_2_VERSION TLS_VERSION_NUMBER(TLS_1_2)
33#define TLS_CIPHER_AES_GCM_128 51
34#define TLS_CIPHER_AES_GCM_128_IV_SIZE 8
35#define TLS_CIPHER_AES_GCM_128_KEY_SIZE 16
36#define TLS_CIPHER_AES_GCM_128_SALT_SIZE 4
37#define TLS_CIPHER_AES_GCM_128_TAG_SIZE 16
38#define TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE 8
39#define TLS_SET_RECORD_TYPE 1
40struct tls_crypto_info {
41 __u16 version;
42 __u16 cipher_type;
43};
44struct tls12_crypto_info_aes_gcm_128 {
45 struct tls_crypto_info info;
46 unsigned char iv[TLS_CIPHER_AES_GCM_128_IV_SIZE];
47 unsigned char key[TLS_CIPHER_AES_GCM_128_KEY_SIZE];
48 unsigned char salt[TLS_CIPHER_AES_GCM_128_SALT_SIZE];
49 unsigned char rec_seq[TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE];
50};
51#endif