| 1 |
// Copyright 2022 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/v2/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/v2/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 SPIFFE ID from the peer leaf certificate, if present. |
| 44 |
// |
| 45 |
// This field is only populated if the leaf certificate is a valid SPIFFE |
| 46 |
// SVID; in particular, there is a unique URI SAN and this URI SAN is a valid |
| 47 |
// SPIFFE ID. |
| 48 |
LeafCertSpiffeId string `protobuf:"bytes,1,opt,name=leaf_cert_spiffe_id,json=leafCertSpiffeId,proto3" json:"leaf_cert_spiffe_id,omitempty"` |
| 49 |
// The URIs that are present in the SubjectAltName extension of the peer leaf |
| 50 |
// certificate. |
| 51 |
// |
| 52 |
// Note that the extracted URIs are not validated and may not be properly |
| 53 |
// formatted. |
| 54 |
LeafCertUris []string `protobuf:"bytes,2,rep,name=leaf_cert_uris,json=leafCertUris,proto3" json:"leaf_cert_uris,omitempty"` |
| 55 |
// The DNSNames that are present in the SubjectAltName extension of the peer |
| 56 |
// leaf certificate. |
| 57 |
LeafCertDnsnames []string `protobuf:"bytes,3,rep,name=leaf_cert_dnsnames,json=leafCertDnsnames,proto3" json:"leaf_cert_dnsnames,omitempty"` |
| 58 |
// The (ordered) list of fingerprints in the certificate chain used to verify |
| 59 |
// the given leaf certificate. The order MUST be from leaf certificate |
| 60 |
// fingerprint to root certificate fingerprint. |
| 61 |
// |
| 62 |
// A fingerprint is the base-64 encoding of the SHA256 hash of the |
| 63 |
// DER-encoding of a certificate. The list MAY be populated even if the peer |
| 64 |
// certificate chain was NOT validated successfully. |
| 65 |
PeerCertificateChainFingerprints []string `protobuf:"bytes,4,rep,name=peer_certificate_chain_fingerprints,json=peerCertificateChainFingerprints,proto3" json:"peer_certificate_chain_fingerprints,omitempty"` |
| 66 |
// The local identity used during session setup. |
| 67 |
LocalIdentity *common_go_proto.Identity `protobuf:"bytes,9,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` |
| 68 |
// The SHA256 hash of the DER-encoding of the local leaf certificate used in |
| 69 |
// the handshake. |
| 70 |
LocalLeafCertFingerprint []byte `protobuf:"bytes,6,opt,name=local_leaf_cert_fingerprint,json=localLeafCertFingerprint,proto3" json:"local_leaf_cert_fingerprint,omitempty"` |
| 71 |
} |
| 72 |
|
| 73 |
func (x *S2AContext) Reset() { |
| 74 |
*x = S2AContext{} |
| 75 |
if protoimpl.UnsafeEnabled { |
| 76 |
mi := &file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0] |
| 77 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 78 |
ms.StoreMessageInfo(mi) |
| 79 |
} |
| 80 |
} |
| 81 |
|
| 82 |
func (x *S2AContext) String() string { |
| 83 |
return protoimpl.X.MessageStringOf(x) |
| 84 |
} |
| 85 |
|
| 86 |
func (*S2AContext) ProtoMessage() {} |
| 87 |
|
| 88 |
func (x *S2AContext) ProtoReflect() protoreflect.Message { |
| 89 |
mi := &file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0] |
| 90 |
if protoimpl.UnsafeEnabled && x != nil { |
| 91 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 92 |
if ms.LoadMessageInfo() == nil { |
| 93 |
ms.StoreMessageInfo(mi) |
| 94 |
} |
| 95 |
return ms |
| 96 |
} |
| 97 |
return mi.MessageOf(x) |
| 98 |
} |
| 99 |
|
| 100 |
// Deprecated: Use S2AContext.ProtoReflect.Descriptor instead. |
| 101 |
func (*S2AContext) Descriptor() ([]byte, []int) { |
| 102 |
return file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescGZIP(), []int{0} |
| 103 |
} |
| 104 |
|
| 105 |
func (x *S2AContext) GetLeafCertSpiffeId() string { |
| 106 |
if x != nil { |
| 107 |
return x.LeafCertSpiffeId |
| 108 |
} |
| 109 |
return "" |
| 110 |
} |
| 111 |
|
| 112 |
func (x *S2AContext) GetLeafCertUris() []string { |
| 113 |
if x != nil { |
| 114 |
return x.LeafCertUris |
| 115 |
} |
| 116 |
return nil |
| 117 |
} |
| 118 |
|
| 119 |
func (x *S2AContext) GetLeafCertDnsnames() []string { |
| 120 |
if x != nil { |
| 121 |
return x.LeafCertDnsnames |
| 122 |
} |
| 123 |
return nil |
| 124 |
} |
| 125 |
|
| 126 |
func (x *S2AContext) GetPeerCertificateChainFingerprints() []string { |
| 127 |
if x != nil { |
| 128 |
return x.PeerCertificateChainFingerprints |
| 129 |
} |
| 130 |
return nil |
| 131 |
} |
| 132 |
|
| 133 |
func (x *S2AContext) GetLocalIdentity() *common_go_proto.Identity { |
| 134 |
if x != nil { |
| 135 |
return x.LocalIdentity |
| 136 |
} |
| 137 |
return nil |
| 138 |
} |
| 139 |
|
| 140 |
func (x *S2AContext) GetLocalLeafCertFingerprint() []byte { |
| 141 |
if x != nil { |
| 142 |
return x.LocalLeafCertFingerprint |
| 143 |
} |
| 144 |
return nil |
| 145 |
} |
| 146 |
|
| 147 |
var File_internal_proto_v2_s2a_context_s2a_context_proto protoreflect.FileDescriptor |
| 148 |
|
| 149 |
var file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc = []byte{ |
| 150 |
0x0a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, |
| 151 |
0x2f, 0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2f, |
| 152 |
0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, |
| 153 |
0x6f, 0x12, 0x0c, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x1a, |
| 154 |
0x25, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, |
| 155 |
0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, |
| 156 |
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x02, 0x0a, 0x0a, 0x53, 0x32, 0x41, 0x43, 0x6f, |
| 157 |
0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, |
| 158 |
0x72, 0x74, 0x5f, 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, |
| 159 |
0x28, 0x09, 0x52, 0x10, 0x6c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x53, 0x70, 0x69, 0x66, |
| 160 |
0x66, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, |
| 161 |
0x74, 0x5f, 0x75, 0x72, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x65, |
| 162 |
0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x55, 0x72, 0x69, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x65, |
| 163 |
0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x64, 0x6e, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x73, |
| 164 |
0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, |
| 165 |
0x44, 0x6e, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x23, 0x70, 0x65, 0x65, 0x72, |
| 166 |
0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, |
| 167 |
0x69, 0x6e, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, |
| 168 |
0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x20, 0x70, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, |
| 169 |
0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x67, 0x65, |
| 170 |
0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, |
| 171 |
0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, |
| 172 |
0x16, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x49, |
| 173 |
0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, |
| 174 |
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x1b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, |
| 175 |
0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, |
| 176 |
0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x18, 0x6c, 0x6f, 0x63, |
| 177 |
0x61, 0x6c, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, |
| 178 |
0x70, 0x72, 0x69, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, |
| 179 |
0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, |
| 180 |
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x32, 0x61, |
| 181 |
0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, |
| 182 |
0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x67, |
| 183 |
0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 184 |
} |
| 185 |
|
| 186 |
var ( |
| 187 |
file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescOnce sync.Once |
| 188 |
file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData = file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc |
| 189 |
) |
| 190 |
|
| 191 |
func file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescGZIP() []byte { |
| 192 |
file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescOnce.Do(func() { |
| 193 |
file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData) |
| 194 |
}) |
| 195 |
return file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData |
| 196 |
} |
| 197 |
|
| 198 |
var file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 199 |
var file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes = []any{ |
| 200 |
(*S2AContext)(nil), // 0: s2a.proto.v2.S2AContext |
| 201 |
(*common_go_proto.Identity)(nil), // 1: s2a.proto.v2.Identity |
| 202 |
} |
| 203 |
var file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs = []int32{ |
| 204 |
1, // 0: s2a.proto.v2.S2AContext.local_identity:type_name -> s2a.proto.v2.Identity |
| 205 |
1, // [1:1] is the sub-list for method output_type |
| 206 |
1, // [1:1] is the sub-list for method input_type |
| 207 |
1, // [1:1] is the sub-list for extension type_name |
| 208 |
1, // [1:1] is the sub-list for extension extendee |
| 209 |
0, // [0:1] is the sub-list for field type_name |
| 210 |
} |
| 211 |
|
| 212 |
func init() { file_internal_proto_v2_s2a_context_s2a_context_proto_init() } |
| 213 |
func file_internal_proto_v2_s2a_context_s2a_context_proto_init() { |
| 214 |
if File_internal_proto_v2_s2a_context_s2a_context_proto != nil { |
| 215 |
return |
| 216 |
} |
| 217 |
if !protoimpl.UnsafeEnabled { |
| 218 |
file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0].Exporter = func(v any, i int) any { |
| 219 |
switch v := v.(*S2AContext); i { |
| 220 |
case 0: |
| 221 |
return &v.state |
| 222 |
case 1: |
| 223 |
return &v.sizeCache |
| 224 |
case 2: |
| 225 |
return &v.unknownFields |
| 226 |
default: |
| 227 |
return nil |
| 228 |
} |
| 229 |
} |
| 230 |
} |
| 231 |
type x struct{} |
| 232 |
out := protoimpl.TypeBuilder{ |
| 233 |
File: protoimpl.DescBuilder{ |
| 234 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 235 |
RawDescriptor: file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc, |
| 236 |
NumEnums: 0, |
| 237 |
NumMessages: 1, |
| 238 |
NumExtensions: 0, |
| 239 |
NumServices: 0, |
| 240 |
}, |
| 241 |
GoTypes: file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes, |
| 242 |
DependencyIndexes: file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs, |
| 243 |
MessageInfos: file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes, |
| 244 |
}.Build() |
| 245 |
File_internal_proto_v2_s2a_context_s2a_context_proto = out.File |
| 246 |
file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc = nil |
| 247 |
file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes = nil |
| 248 |
file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs = nil |
| 249 |
} |