github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/apps/simpleexample/common/messages.proto (about)

     1  //  Copyright (c) 2013, Google Inc.  All rights reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto2";
    16  package simpleexample_messages;
    17  
    18  enum MessageType {
    19     REQUEST = 1;
    20     RESPONSE = 2;
    21   }
    22  
    23  message SimpleMessage {
    24    required int32   message_type = 1;
    25    required string  request_type = 2;
    26    optional string  err = 3;
    27    repeated bytes   data = 4;
    28  }
    29  
    30  message RsaPrivateKeyMessage {
    31    optional bytes   m = 1;
    32    optional bytes   e = 2;
    33    optional bytes   d = 3;
    34    optional bytes   p = 4;
    35    optional bytes   q = 5;
    36  }
    37  
    38  // The cheap way
    39  message EcPrivateKeyMessage {
    40    optional bytes der_blob = 1;
    41  }
    42  
    43  message PrivateKeyMessage {
    44    required string key_type = 1;
    45    optional RsaPrivateKeyMessage rsa_key = 2;
    46    optional EcPrivateKeyMessage ec_key = 3;
    47  }
    48