1 /* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 namespace keymaster { 20 21 /** 22 * Version enumerates the list of Keymaster/KeyMint versions that we may support. As old 23 * versions are deprecated and removed they should be removed from this enum, which will make it 24 * possible to easily find the version-dependent code and remove dead branches. 25 */ 26 enum class KmVersion : int { 27 KEYMASTER_1 = 10, 28 KEYMASTER_1_1 = 11, 29 KEYMASTER_2 = 20, 30 KEYMASTER_3 = 30, 31 KEYMASTER_4 = 40, 32 KEYMASTER_4_1 = 41, 33 KEYMINT_1 = 100, 34 KEYMINT_2 = 200, 35 KEYMINT_3 = 300, 36 }; 37 38 }; // namespace keymaster 39