Home | History | Annotate | Download | only in chaps
      1 // Copyright 2017 The Chromium OS Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 syntax = "proto2";
      6 
      7 option optimize_for = LITE_RUNTIME;
      8 
      9 package chaps;
     10 
     11 // Proto for CK_MECHANISM_INFO.
     12 // https://www.cryptsoft.com/pkcs11doc/v220/structCK__MECHANISM__INFO.html
     13 message MechanismInfo {
     14   // Next ID to use: 4
     15 
     16   optional uint64 min_key_size = 1;
     17   optional uint64 max_key_size = 2;
     18   optional uint64 flags = 3;
     19 }
     20 
     21 // Proto for CK_SESSION_INFO.
     22 // https://www.cryptsoft.com/pkcs11doc/v220/structCK__SESSION__INFO.html
     23 message SessionInfo {
     24   // Next ID to use: 5
     25 
     26   optional uint64 slot_id = 1;
     27   optional uint64 state = 2;
     28   optional uint64 flags = 3;
     29   optional uint64 device_error = 4;
     30 }
     31 
     32 // Proto for CK_VERSION.
     33 // https://www.cryptsoft.com/pkcs11doc/v220/structCK__VERSION.html
     34 message Version {
     35   // Next ID to use: 3
     36 
     37   optional uint32 major = 1;
     38   optional uint32 minor = 2;
     39 }
     40 
     41 // Proto for CK_SLOT_INFO.
     42 // https://www.cryptsoft.com/pkcs11doc/v220/structCK__SLOT__INFO.html
     43 message SlotInfo {
     44   // Next ID to use: 6
     45 
     46   optional bytes slot_description = 1;
     47   optional bytes manufacturer_id = 2;
     48   optional uint64 flags = 3;
     49   optional Version hardware_version = 4;
     50   optional Version firmware_version = 5;
     51 }
     52 
     53 // Proto for CK_TOKEN_INFO.
     54 // https://www.cryptsoft.com/pkcs11doc/v220/structCK__TOKEN__INFO.html
     55 message TokenInfo {
     56   // Next ID to use: 18
     57 
     58   optional bytes label = 1;
     59   optional bytes manufacturer_id = 2;
     60   optional bytes model = 3;
     61   optional bytes serial_number = 4;
     62   optional uint64 flags = 5;
     63   optional uint64 max_session_count = 6;
     64   optional uint64 session_count = 7;
     65   optional uint64 max_session_count_rw = 8;
     66   optional uint64 session_count_rw = 9;
     67   optional uint64 max_pin_len = 10;
     68   optional uint64 min_pin_len = 11;
     69   optional uint64 total_public_memory = 12;
     70   optional uint64 free_public_memory = 13;
     71   optional uint64 total_private_memory = 14;
     72   optional uint64 free_private_memory = 15;
     73   optional Version hardware_version = 16;
     74   optional Version firmware_version = 17;
     75 }
     76