| 1 |
// Copyright 2021 Google LLC |
| 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 |
// https://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 |
// Code generated by protoc-gen-go. DO NOT EDIT. |
| 16 |
// versions: |
| 17 |
// protoc-gen-go v1.34.2 |
| 18 |
// protoc v3.21.12 |
| 19 |
// source: internal/proto/s2a_context/s2a_context.proto |
| 20 |
|
| 21 |
package s2a_context_go_proto |
| 22 |
|
| 23 |
import ( |
| 24 |
common_go_proto "github.com/google/s2a-go/internal/proto/common_go_proto" |
| 25 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 26 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 27 |
reflect "reflect" |
| 28 |
sync "sync" |
| 29 |
) |
| 30 |
|
| 31 |
const ( |
| 32 |
// Verify that this generated code is sufficiently up-to-date. |
| 33 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 34 |
// Verify that runtime/protoimpl is sufficiently up-to-date. |
| 35 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 36 |
) |
| 37 |
|
| 38 |
type S2AContext struct { |
| 39 |
state protoimpl.MessageState |
| 40 |
sizeCache protoimpl.SizeCache |
| 41 |
unknownFields protoimpl.UnknownFields |
| 42 |
|
| 43 |
// The application protocol negotiated for this connection, e.g., 'grpc'. |
| 44 |
ApplicationProtocol string `protobuf:"bytes,1,opt,name=application_protocol,json=applicationProtocol,proto3" json:"application_protocol,omitempty"` |
| 45 |
// The TLS version number that the S2A's handshaker module used to set up the |
| 46 |
// session. |
| 47 |
TlsVersion common_go_proto.TLSVersion `protobuf:"varint,2,opt,name=tls_version,json=tlsVersion,proto3,enum=s2a.proto.TLSVersion" json:"tls_version,omitempty"` |
| 48 |
// The TLS ciphersuite negotiated by the S2A's handshaker module. |
| 49 |
Ciphersuite common_go_proto.Ciphersuite `protobuf:"varint,3,opt,name=ciphersuite,proto3,enum=s2a.proto.Ciphersuite" json:"ciphersuite,omitempty"` |
| 50 |
// The authenticated identity of the peer. |
| 51 |
PeerIdentity *common_go_proto.Identity `protobuf:"bytes,4,opt,name=peer_identity,json=peerIdentity,proto3" json:"peer_identity,omitempty"` |
| 52 |
// The local identity used during session setup. This could be: |
| 53 |
// - The local identity that the client specifies in ClientSessionStartReq. |
| 54 |
// - One of the local identities that the server specifies in |
| 55 |
// ServerSessionStartReq. |
| 56 |
// - If neither client or server specifies local identities, the S2A picks the |
| 57 |
// default one. In this case, this field will contain that identity. |
| 58 |
LocalIdentity *common_go_proto.Identity `protobuf:"bytes,5,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` |
| 59 |
// The SHA256 hash of the peer certificate used in the handshake. |
| 60 |
PeerCertFingerprint []byte `protobuf:"bytes,6,opt,name=peer_cert_fingerprint,json=peerCertFingerprint,proto3" json:"peer_cert_fingerprint,omitempty"` |
| 61 |
// The SHA256 hash of the local certificate used in the handshake. |
| 62 |
LocalCertFingerprint []byte `protobuf:"bytes,7,opt,name=local_cert_fingerprint,json=localCertFingerprint,proto3" json:"local_cert_fingerprint,omitempty"` |
| 63 |
// Set to true if a cached session was reused to resume the handshake. |
| 64 |
IsHandshakeResumed bool `protobuf:"varint,8,opt,name=is_handshake_resumed,json=isHandshakeResumed,proto3" json:"is_handshake_resumed,omitempty"` |
| 65 |
} |
| 66 |
|
| 67 |
func (x *S2AContext) Reset() { |
| 68 |
*x = S2AContext{} |
| 69 |
if protoimpl.UnsafeEnabled { |
| 70 |
mi := &file_internal_proto_s2a_context_s2a_context_proto_msgTypes[0] |
| 71 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 72 |
ms.StoreMessageInfo(mi) |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
func (x *S2AContext) String() string { |
| 77 |
return protoimpl.X.MessageStringOf(x) |
| 78 |
} |
| 79 |
|
| 80 |
func (*S2AContext) ProtoMessage() {} |
| 81 |
|
| 82 |
func (x *S2AContext) ProtoReflect() protoreflect.Message { |
| 83 |
mi := &file_internal_proto_s2a_context_s2a_context_proto_msgTypes[0] |
| 84 |
if protoimpl.UnsafeEnabled && x != nil { |
| 85 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 86 |
if ms.LoadMessageInfo() == nil { |
| 87 |
ms.StoreMessageInfo(mi) |
| 88 |
} |
| 89 |
return ms |
| 90 |
} |
| 91 |
return mi.MessageOf(x) |
| 92 |
} |
| 93 |
|
| 94 |
// Deprecated: Use S2AContext.ProtoReflect.Descriptor instead. |
| 95 |
func (*S2AContext) Descriptor() ([]byte, []int) { |
| 96 |
return file_internal_proto_s2a_context_s2a_context_proto_rawDescGZIP(), []int{0} |
| 97 |
} |
| 98 |
|
| 99 |
func (x *S2AContext) GetApplicationProtocol() string { |
| 100 |
if x != nil { |
| 101 |
return x.ApplicationProtocol |
| 102 |
} |
| 103 |
return "" |
| 104 |
} |
| 105 |
|
| 106 |
func (x *S2AContext) GetTlsVersion() common_go_proto.TLSVersion { |
| 107 |
if x != nil { |
| 108 |
return x.TlsVersion |
| 109 |
} |
| 110 |
return common_go_proto.TLSVersion(0) |
| 111 |
} |
| 112 |
|
| 113 |
func (x *S2AContext) GetCiphersuite() common_go_proto.Ciphersuite { |
| 114 |
if x != nil { |
| 115 |
return x.Ciphersuite |
| 116 |
} |
| 117 |
return common_go_proto.Ciphersuite(0) |
| 118 |
} |
| 119 |
|
| 120 |
func (x *S2AContext) GetPeerIdentity() *common_go_proto.Identity { |
| 121 |
if x != nil { |
| 122 |
return x.PeerIdentity |
| 123 |
} |
| 124 |
return nil |
| 125 |
} |
| 126 |
|
| 127 |
func (x *S2AContext) GetLocalIdentity() *common_go_proto.Identity { |
| 128 |
if x != nil { |
| 129 |
return x.LocalIdentity |
| 130 |
} |
| 131 |
return nil |
| 132 |
} |
| 133 |
|
| 134 |
func (x *S2AContext) GetPeerCertFingerprint() []byte { |
| 135 |
if x != nil { |
| 136 |
return x.PeerCertFingerprint |
| 137 |
} |
| 138 |
return nil |
| 139 |
} |
| 140 |
|
| 141 |
func (x *S2AContext) GetLocalCertFingerprint() []byte { |
| 142 |
if x != nil { |
| 143 |
return x.LocalCertFingerprint |
| 144 |
} |
| 145 |
return nil |
| 146 |
} |
| 147 |
|
| 148 |
func (x *S2AContext) GetIsHandshakeResumed() bool { |
| 149 |
if x != nil { |
| 150 |
return x.IsHandshakeResumed |
| 151 |
} |
| 152 |
return false |
| 153 |
} |
| 154 |
|
| 155 |
var File_internal_proto_s2a_context_s2a_context_proto protoreflect.FileDescriptor |
| 156 |
|
| 157 |
var file_internal_proto_s2a_context_s2a_context_proto_rawDesc = []byte{ |
| 158 |
0x0a, 0x2c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, |
| 159 |
0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x73, 0x32, 0x61, |
| 160 |
0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, |
| 161 |
0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, |
| 162 |
0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, |
| 163 |
0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x03, |
| 164 |
0x0a, 0x0a, 0x53, 0x32, 0x41, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x31, 0x0a, 0x14, |
| 165 |
0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, |
| 166 |
0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x70, 0x70, 0x6c, |
| 167 |
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, |
| 168 |
0x36, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, |
| 169 |
0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, |
| 170 |
0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x74, 0x6c, 0x73, |
| 171 |
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0b, 0x63, 0x69, 0x70, 0x68, 0x65, |
| 172 |
0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x73, |
| 173 |
0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, |
| 174 |
0x75, 0x69, 0x74, 0x65, 0x52, 0x0b, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, |
| 175 |
0x65, 0x12, 0x38, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, |
| 176 |
0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, |
| 177 |
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x70, |
| 178 |
0x65, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x0e, 0x6c, |
| 179 |
0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, |
| 180 |
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, |
| 181 |
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, |
| 182 |
0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x65, 0x65, 0x72, 0x5f, |
| 183 |
0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, |
| 184 |
0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x70, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, |
| 185 |
0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x6c, |
| 186 |
0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, |
| 187 |
0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x6c, 0x6f, 0x63, |
| 188 |
0x61, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, |
| 189 |
0x74, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, |
| 190 |
0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, |
| 191 |
0x12, 0x69, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x75, |
| 192 |
0x6d, 0x65, 0x64, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, |
| 193 |
0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x69, 0x6e, 0x74, |
| 194 |
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x32, 0x61, 0x5f, |
| 195 |
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, |
| 196 |
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 197 |
} |
| 198 |
|
| 199 |
var ( |
| 200 |
file_internal_proto_s2a_context_s2a_context_proto_rawDescOnce sync.Once |
| 201 |
file_internal_proto_s2a_context_s2a_context_proto_rawDescData = file_internal_proto_s2a_context_s2a_context_proto_rawDesc |
| 202 |
) |
| 203 |
|
| 204 |
func file_internal_proto_s2a_context_s2a_context_proto_rawDescGZIP() []byte { |
| 205 |
file_internal_proto_s2a_context_s2a_context_proto_rawDescOnce.Do(func() { |
| 206 |
file_internal_proto_s2a_context_s2a_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_s2a_context_s2a_context_proto_rawDescData) |
| 207 |
}) |
| 208 |
return file_internal_proto_s2a_context_s2a_context_proto_rawDescData |
| 209 |
} |
| 210 |
|
| 211 |
var file_internal_proto_s2a_context_s2a_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 212 |
var file_internal_proto_s2a_context_s2a_context_proto_goTypes = []any{ |
| 213 |
(*S2AContext)(nil), // 0: s2a.proto.S2AContext |
| 214 |
(common_go_proto.TLSVersion)(0), // 1: s2a.proto.TLSVersion |
| 215 |
(common_go_proto.Ciphersuite)(0), // 2: s2a.proto.Ciphersuite |
| 216 |
(*common_go_proto.Identity)(nil), // 3: s2a.proto.Identity |
| 217 |
} |
| 218 |
var file_internal_proto_s2a_context_s2a_context_proto_depIdxs = []int32{ |
| 219 |
1, // 0: s2a.proto.S2AContext.tls_version:type_name -> s2a.proto.TLSVersion |
| 220 |
2, // 1: s2a.proto.S2AContext.ciphersuite:type_name -> s2a.proto.Ciphersuite |
| 221 |
3, // 2: s2a.proto.S2AContext.peer_identity:type_name -> s2a.proto.Identity |
| 222 |
3, // 3: s2a.proto.S2AContext.local_identity:type_name -> s2a.proto.Identity |
| 223 |
4, // [4:4] is the sub-list for method output_type |
| 224 |
4, // [4:4] is the sub-list for method input_type |
| 225 |
4, // [4:4] is the sub-list for extension type_name |
| 226 |
4, // [4:4] is the sub-list for extension extendee |
| 227 |
0, // [0:4] is the sub-list for field type_name |
| 228 |
} |
| 229 |
|
| 230 |
func init() { file_internal_proto_s2a_context_s2a_context_proto_init() } |
| 231 |
func file_internal_proto_s2a_context_s2a_context_proto_init() { |
| 232 |
if File_internal_proto_s2a_context_s2a_context_proto != nil { |
| 233 |
return |
| 234 |
} |
| 235 |
if !protoimpl.UnsafeEnabled { |
| 236 |
file_internal_proto_s2a_context_s2a_context_proto_msgTypes[0].Exporter = func(v any, i int) any { |
| 237 |
switch v := v.(*S2AContext); i { |
| 238 |
case 0: |
| 239 |
return &v.state |
| 240 |
case 1: |
| 241 |
return &v.sizeCache |
| 242 |
case 2: |
| 243 |
return &v.unknownFields |
| 244 |
default: |
| 245 |
return nil |
| 246 |
} |
| 247 |
} |
| 248 |
} |
| 249 |
type x struct{} |
| 250 |
out := protoimpl.TypeBuilder{ |
| 251 |
File: protoimpl.DescBuilder{ |
| 252 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 253 |
RawDescriptor: file_internal_proto_s2a_context_s2a_context_proto_rawDesc, |
| 254 |
NumEnums: 0, |
| 255 |
NumMessages: 1, |
| 256 |
NumExtensions: 0, |
| 257 |
NumServices: 0, |
| 258 |
}, |
| 259 |
GoTypes: file_internal_proto_s2a_context_s2a_context_proto_goTypes, |
| 260 |
DependencyIndexes: file_internal_proto_s2a_context_s2a_context_proto_depIdxs, |
| 261 |
MessageInfos: file_internal_proto_s2a_context_s2a_context_proto_msgTypes, |
| 262 |
}.Build() |
| 263 |
File_internal_proto_s2a_context_s2a_context_proto = out.File |
| 264 |
file_internal_proto_s2a_context_s2a_context_proto_rawDesc = nil |
| 265 |
file_internal_proto_s2a_context_s2a_context_proto_goTypes = nil |
| 266 |
file_internal_proto_s2a_context_s2a_context_proto_depIdxs = nil |
| 267 |
} |