/* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package android.stats.tls; // Keep in sync with // external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java enum Protocol { UNKNOWN_PROTO = 0; SSL_V3 = 1; TLS_V1 = 2; TLS_V1_1 = 3; TLS_V1_2 = 4; TLS_V1_3 = 5; // Handshake failure. TLS_PROTO_FAILED = 0xFFFF; } // Cipher suites' ids are based on IANA's database: // https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4 // // If you add new cipher suite, make sure id is the same as in IANA's database (see link above) // // Keep in sync with // external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java enum CipherSuite { UNKNOWN_CIPHER_SUITE = 0x0000; TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A; TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014; TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035; TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009; TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013; TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F; TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A; // TLSv1.2 cipher suites TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C; TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D; TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F; TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030; TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B; TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C; TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9; TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8; // Pre-Shared Key (PSK) cipher suites TLS_PSK_WITH_AES_128_CBC_SHA = 0x008C; TLS_PSK_WITH_AES_256_CBC_SHA = 0x008D; TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = 0xC035; TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = 0xC036; TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAC; // TLS 1.3 cipher suites TLS_AES_128_GCM_SHA256 = 0x1301; TLS_AES_256_GCM_SHA384 = 0x1302; TLS_CHACHA20_POLY1305_SHA256 = 0x1303; // Handshake failure. TLS_CIPHER_FAILED = 0XFFFF; } // Log source: Which flavour of Conscrypt is being used // // Keep in sync with // external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java enum Source { // Unknown - could be either GMS or Mainline. SOURCE_UNKNOWN = 0; // Conscrypt Mainline module. SOURCE_MAINLINE = 1; // GMS Conscrypt, as installed by the Play ProviderInstaller API. SOURCE_GMS = 2; // Conscrypt unbundled from the platform and included // by app developer from Maven Central. SOURCE_UNBUNDLED = 3; }