alts: update alts protos to match grpc-proto

This commit is contained in:
Carl Mastrangelo 2018-10-19 14:32:40 -07:00 committed by GitHub
parent 183e1f6735
commit e757c7dea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 17424 additions and 17301 deletions

View File

@ -27,30 +27,30 @@ public final class HandshakerServiceGrpc {
public static final String SERVICE_NAME = "grpc.gcp.HandshakerService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<io.grpc.alts.internal.Handshaker.HandshakerReq,
io.grpc.alts.internal.Handshaker.HandshakerResp> getDoHandshakeMethod;
private static volatile io.grpc.MethodDescriptor<io.grpc.alts.internal.HandshakerReq,
io.grpc.alts.internal.HandshakerResp> getDoHandshakeMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DoHandshake",
requestType = io.grpc.alts.internal.Handshaker.HandshakerReq.class,
responseType = io.grpc.alts.internal.Handshaker.HandshakerResp.class,
requestType = io.grpc.alts.internal.HandshakerReq.class,
responseType = io.grpc.alts.internal.HandshakerResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor<io.grpc.alts.internal.Handshaker.HandshakerReq,
io.grpc.alts.internal.Handshaker.HandshakerResp> getDoHandshakeMethod() {
io.grpc.MethodDescriptor<io.grpc.alts.internal.Handshaker.HandshakerReq, io.grpc.alts.internal.Handshaker.HandshakerResp> getDoHandshakeMethod;
public static io.grpc.MethodDescriptor<io.grpc.alts.internal.HandshakerReq,
io.grpc.alts.internal.HandshakerResp> getDoHandshakeMethod() {
io.grpc.MethodDescriptor<io.grpc.alts.internal.HandshakerReq, io.grpc.alts.internal.HandshakerResp> getDoHandshakeMethod;
if ((getDoHandshakeMethod = HandshakerServiceGrpc.getDoHandshakeMethod) == null) {
synchronized (HandshakerServiceGrpc.class) {
if ((getDoHandshakeMethod = HandshakerServiceGrpc.getDoHandshakeMethod) == null) {
HandshakerServiceGrpc.getDoHandshakeMethod = getDoHandshakeMethod =
io.grpc.MethodDescriptor.<io.grpc.alts.internal.Handshaker.HandshakerReq, io.grpc.alts.internal.Handshaker.HandshakerResp>newBuilder()
io.grpc.MethodDescriptor.<io.grpc.alts.internal.HandshakerReq, io.grpc.alts.internal.HandshakerResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.gcp.HandshakerService", "DoHandshake"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.alts.internal.Handshaker.HandshakerReq.getDefaultInstance()))
io.grpc.alts.internal.HandshakerReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.alts.internal.Handshaker.HandshakerResp.getDefaultInstance()))
io.grpc.alts.internal.HandshakerResp.getDefaultInstance()))
.setSchemaDescriptor(new HandshakerServiceMethodDescriptorSupplier("DoHandshake"))
.build();
}
@ -96,8 +96,8 @@ public final class HandshakerServiceGrpc {
* response before sending next request.
* </pre>
*/
public io.grpc.stub.StreamObserver<io.grpc.alts.internal.Handshaker.HandshakerReq> doHandshake(
io.grpc.stub.StreamObserver<io.grpc.alts.internal.Handshaker.HandshakerResp> responseObserver) {
public io.grpc.stub.StreamObserver<io.grpc.alts.internal.HandshakerReq> doHandshake(
io.grpc.stub.StreamObserver<io.grpc.alts.internal.HandshakerResp> responseObserver) {
return asyncUnimplementedStreamingCall(getDoHandshakeMethod(), responseObserver);
}
@ -107,8 +107,8 @@ public final class HandshakerServiceGrpc {
getDoHandshakeMethod(),
asyncBidiStreamingCall(
new MethodHandlers<
io.grpc.alts.internal.Handshaker.HandshakerReq,
io.grpc.alts.internal.Handshaker.HandshakerResp>(
io.grpc.alts.internal.HandshakerReq,
io.grpc.alts.internal.HandshakerResp>(
this, METHODID_DO_HANDSHAKE)))
.build();
}
@ -142,8 +142,8 @@ public final class HandshakerServiceGrpc {
* response before sending next request.
* </pre>
*/
public io.grpc.stub.StreamObserver<io.grpc.alts.internal.Handshaker.HandshakerReq> doHandshake(
io.grpc.stub.StreamObserver<io.grpc.alts.internal.Handshaker.HandshakerResp> responseObserver) {
public io.grpc.stub.StreamObserver<io.grpc.alts.internal.HandshakerReq> doHandshake(
io.grpc.stub.StreamObserver<io.grpc.alts.internal.HandshakerResp> responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(getDoHandshakeMethod(), getCallOptions()), responseObserver);
}
@ -218,7 +218,7 @@ public final class HandshakerServiceGrpc {
switch (methodId) {
case METHODID_DO_HANDSHAKE:
return (io.grpc.stub.StreamObserver<Req>) serviceImpl.doHandshake(
(io.grpc.stub.StreamObserver<io.grpc.alts.internal.Handshaker.HandshakerResp>) responseObserver);
(io.grpc.stub.StreamObserver<io.grpc.alts.internal.HandshakerResp>) responseObserver);
default:
throw new AssertionError();
}
@ -231,7 +231,7 @@ public final class HandshakerServiceGrpc {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.grpc.alts.internal.Handshaker.getDescriptor();
return io.grpc.alts.internal.HandshakerProto.getDescriptor();
}
@java.lang.Override

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,177 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/altscontext.proto
package io.grpc.alts.internal;
public interface AltsContextOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.AltsContext)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
java.lang.String getApplicationProtocol();
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
com.google.protobuf.ByteString
getApplicationProtocolBytes();
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
java.lang.String getRecordProtocol();
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
com.google.protobuf.ByteString
getRecordProtocolBytes();
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
int getSecurityLevelValue();
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
io.grpc.alts.internal.SecurityLevel getSecurityLevel();
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
java.lang.String getPeerServiceAccount();
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
com.google.protobuf.ByteString
getPeerServiceAccountBytes();
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
java.lang.String getLocalServiceAccount();
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
com.google.protobuf.ByteString
getLocalServiceAccountBytes();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
boolean hasPeerRpcVersions();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder();
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
int getPeerAttributesCount();
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
boolean containsPeerAttributes(
java.lang.String key);
/**
* Use {@link #getPeerAttributesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String>
getPeerAttributes();
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
java.util.Map<java.lang.String, java.lang.String>
getPeerAttributesMap();
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
java.lang.String getPeerAttributesOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
java.lang.String getPeerAttributesOrThrow(
java.lang.String key);
}

View File

@ -0,0 +1,80 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/altscontext.proto
package io.grpc.alts.internal;
public final class AltsContextProto {
private AltsContextProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_AltsContext_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_AltsContext_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\032grpc/gcp/altscontext.proto\022\010grpc.gcp\032(" +
"grpc/gcp/transport_security_common.proto" +
"\"\347\002\n\013AltsContext\022\034\n\024application_protocol" +
"\030\001 \001(\t\022\027\n\017record_protocol\030\002 \001(\t\022/\n\016secur" +
"ity_level\030\003 \001(\0162\027.grpc.gcp.SecurityLevel" +
"\022\034\n\024peer_service_account\030\004 \001(\t\022\035\n\025local_" +
"service_account\030\005 \001(\t\0228\n\021peer_rpc_versio" +
"ns\030\006 \001(\0132\035.grpc.gcp.RpcProtocolVersions\022" +
"B\n\017peer_attributes\030\007 \003(\0132).grpc.gcp.Alts" +
"Context.PeerAttributesEntry\0325\n\023PeerAttri" +
"butesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" +
"8\001Bl\n\025io.grpc.alts.internalB\020AltsContext" +
"ProtoP\001Z?google.golang.org/grpc/credenti" +
"als/alts/internal/proto/grpc_gcpb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor(),
}, assigner);
internal_static_grpc_gcp_AltsContext_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_grpc_gcp_AltsContext_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_AltsContext_descriptor,
new java.lang.String[] { "ApplicationProtocol", "RecordProtocol", "SecurityLevel", "PeerServiceAccount", "LocalServiceAccount", "PeerRpcVersions", "PeerAttributes", });
internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor =
internal_static_grpc_gcp_AltsContext_descriptor.getNestedTypes().get(0);
internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,736 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
/**
* Protobuf type {@code grpc.gcp.Endpoint}
*/
public final class Endpoint extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gcp.Endpoint)
EndpointOrBuilder {
private static final long serialVersionUID = 0L;
// Use Endpoint.newBuilder() to construct.
private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Endpoint() {
ipAddress_ = "";
port_ = 0;
protocol_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Endpoint(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
ipAddress_ = s;
break;
}
case 16: {
port_ = input.readInt32();
break;
}
case 24: {
int rawValue = input.readEnum();
protocol_ = rawValue;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.alts.internal.Endpoint.class, io.grpc.alts.internal.Endpoint.Builder.class);
}
public static final int IP_ADDRESS_FIELD_NUMBER = 1;
private volatile java.lang.Object ipAddress_;
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
public java.lang.String getIpAddress() {
java.lang.Object ref = ipAddress_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ipAddress_ = s;
return s;
}
}
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
public com.google.protobuf.ByteString
getIpAddressBytes() {
java.lang.Object ref = ipAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ipAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PORT_FIELD_NUMBER = 2;
private int port_;
/**
* <pre>
* Port number.
* </pre>
*
* <code>int32 port = 2;</code>
*/
public int getPort() {
return port_;
}
public static final int PROTOCOL_FIELD_NUMBER = 3;
private int protocol_;
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
public int getProtocolValue() {
return protocol_;
}
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
public io.grpc.alts.internal.NetworkProtocol getProtocol() {
io.grpc.alts.internal.NetworkProtocol result = io.grpc.alts.internal.NetworkProtocol.valueOf(protocol_);
return result == null ? io.grpc.alts.internal.NetworkProtocol.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getIpAddressBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_);
}
if (port_ != 0) {
output.writeInt32(2, port_);
}
if (protocol_ != io.grpc.alts.internal.NetworkProtocol.NETWORK_PROTOCOL_UNSPECIFIED.getNumber()) {
output.writeEnum(3, protocol_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIpAddressBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_);
}
if (port_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, port_);
}
if (protocol_ != io.grpc.alts.internal.NetworkProtocol.NETWORK_PROTOCOL_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, protocol_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grpc.alts.internal.Endpoint)) {
return super.equals(obj);
}
io.grpc.alts.internal.Endpoint other = (io.grpc.alts.internal.Endpoint) obj;
boolean result = true;
result = result && getIpAddress()
.equals(other.getIpAddress());
result = result && (getPort()
== other.getPort());
result = result && protocol_ == other.protocol_;
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getIpAddress().hashCode();
hash = (37 * hash) + PORT_FIELD_NUMBER;
hash = (53 * hash) + getPort();
hash = (37 * hash) + PROTOCOL_FIELD_NUMBER;
hash = (53 * hash) + protocol_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.alts.internal.Endpoint parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.Endpoint parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.Endpoint parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.Endpoint parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.Endpoint parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.Endpoint parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.Endpoint parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.Endpoint parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.grpc.alts.internal.Endpoint parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.Endpoint parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.grpc.alts.internal.Endpoint parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.Endpoint parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grpc.alts.internal.Endpoint prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code grpc.gcp.Endpoint}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gcp.Endpoint)
io.grpc.alts.internal.EndpointOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.alts.internal.Endpoint.class, io.grpc.alts.internal.Endpoint.Builder.class);
}
// Construct using io.grpc.alts.internal.Endpoint.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
ipAddress_ = "";
port_ = 0;
protocol_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_descriptor;
}
public io.grpc.alts.internal.Endpoint getDefaultInstanceForType() {
return io.grpc.alts.internal.Endpoint.getDefaultInstance();
}
public io.grpc.alts.internal.Endpoint build() {
io.grpc.alts.internal.Endpoint result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.grpc.alts.internal.Endpoint buildPartial() {
io.grpc.alts.internal.Endpoint result = new io.grpc.alts.internal.Endpoint(this);
result.ipAddress_ = ipAddress_;
result.port_ = port_;
result.protocol_ = protocol_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.grpc.alts.internal.Endpoint) {
return mergeFrom((io.grpc.alts.internal.Endpoint)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.alts.internal.Endpoint other) {
if (other == io.grpc.alts.internal.Endpoint.getDefaultInstance()) return this;
if (!other.getIpAddress().isEmpty()) {
ipAddress_ = other.ipAddress_;
onChanged();
}
if (other.getPort() != 0) {
setPort(other.getPort());
}
if (other.protocol_ != 0) {
setProtocolValue(other.getProtocolValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.grpc.alts.internal.Endpoint parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.alts.internal.Endpoint) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object ipAddress_ = "";
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
public java.lang.String getIpAddress() {
java.lang.Object ref = ipAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ipAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
public com.google.protobuf.ByteString
getIpAddressBytes() {
java.lang.Object ref = ipAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ipAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
public Builder setIpAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ipAddress_ = value;
onChanged();
return this;
}
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
public Builder clearIpAddress() {
ipAddress_ = getDefaultInstance().getIpAddress();
onChanged();
return this;
}
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
public Builder setIpAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ipAddress_ = value;
onChanged();
return this;
}
private int port_ ;
/**
* <pre>
* Port number.
* </pre>
*
* <code>int32 port = 2;</code>
*/
public int getPort() {
return port_;
}
/**
* <pre>
* Port number.
* </pre>
*
* <code>int32 port = 2;</code>
*/
public Builder setPort(int value) {
port_ = value;
onChanged();
return this;
}
/**
* <pre>
* Port number.
* </pre>
*
* <code>int32 port = 2;</code>
*/
public Builder clearPort() {
port_ = 0;
onChanged();
return this;
}
private int protocol_ = 0;
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
public int getProtocolValue() {
return protocol_;
}
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
public Builder setProtocolValue(int value) {
protocol_ = value;
onChanged();
return this;
}
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
public io.grpc.alts.internal.NetworkProtocol getProtocol() {
io.grpc.alts.internal.NetworkProtocol result = io.grpc.alts.internal.NetworkProtocol.valueOf(protocol_);
return result == null ? io.grpc.alts.internal.NetworkProtocol.UNRECOGNIZED : result;
}
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
public Builder setProtocol(io.grpc.alts.internal.NetworkProtocol value) {
if (value == null) {
throw new NullPointerException();
}
protocol_ = value.getNumber();
onChanged();
return this;
}
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
public Builder clearProtocol() {
protocol_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gcp.Endpoint)
}
// @@protoc_insertion_point(class_scope:grpc.gcp.Endpoint)
private static final io.grpc.alts.internal.Endpoint DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.alts.internal.Endpoint();
}
public static io.grpc.alts.internal.Endpoint getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Endpoint>
PARSER = new com.google.protobuf.AbstractParser<Endpoint>() {
public Endpoint parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Endpoint(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Endpoint> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Endpoint> getParserForType() {
return PARSER;
}
public io.grpc.alts.internal.Endpoint getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,55 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface EndpointOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.Endpoint)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
java.lang.String getIpAddress();
/**
* <pre>
* IP address. It should contain an IPv4 or IPv6 string literal, e.g.
* "192.168.0.1" or "2001:db8::1".
* </pre>
*
* <code>string ip_address = 1;</code>
*/
com.google.protobuf.ByteString
getIpAddressBytes();
/**
* <pre>
* Port number.
* </pre>
*
* <code>int32 port = 2;</code>
*/
int getPort();
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
int getProtocolValue();
/**
* <pre>
* Network protocol (e.g., TCP, UDP) associated with this endpoint.
* </pre>
*
* <code>.grpc.gcp.NetworkProtocol protocol = 3;</code>
*/
io.grpc.alts.internal.NetworkProtocol getProtocol();
}

View File

@ -0,0 +1,136 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
/**
* Protobuf enum {@code grpc.gcp.HandshakeProtocol}
*/
public enum HandshakeProtocol
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <pre>
* Default value.
* </pre>
*
* <code>HANDSHAKE_PROTOCOL_UNSPECIFIED = 0;</code>
*/
HANDSHAKE_PROTOCOL_UNSPECIFIED(0),
/**
* <pre>
* TLS handshake protocol.
* </pre>
*
* <code>TLS = 1;</code>
*/
TLS(1),
/**
* <pre>
* Application Layer Transport Security handshake protocol.
* </pre>
*
* <code>ALTS = 2;</code>
*/
ALTS(2),
UNRECOGNIZED(-1),
;
/**
* <pre>
* Default value.
* </pre>
*
* <code>HANDSHAKE_PROTOCOL_UNSPECIFIED = 0;</code>
*/
public static final int HANDSHAKE_PROTOCOL_UNSPECIFIED_VALUE = 0;
/**
* <pre>
* TLS handshake protocol.
* </pre>
*
* <code>TLS = 1;</code>
*/
public static final int TLS_VALUE = 1;
/**
* <pre>
* Application Layer Transport Security handshake protocol.
* </pre>
*
* <code>ALTS = 2;</code>
*/
public static final int ALTS_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static HandshakeProtocol valueOf(int value) {
return forNumber(value);
}
public static HandshakeProtocol forNumber(int value) {
switch (value) {
case 0: return HANDSHAKE_PROTOCOL_UNSPECIFIED;
case 1: return TLS;
case 2: return ALTS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<HandshakeProtocol>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
HandshakeProtocol> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<HandshakeProtocol>() {
public HandshakeProtocol findValueByNumber(int number) {
return HandshakeProtocol.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.getDescriptor().getEnumTypes().get(0);
}
private static final HandshakeProtocol[] VALUES = values();
public static HandshakeProtocol valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private HandshakeProtocol(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.gcp.HandshakeProtocol)
}

View File

@ -0,0 +1,235 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public final class HandshakerProto {
private HandshakerProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_Endpoint_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_Endpoint_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_Identity_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_Identity_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_Identity_AttributesEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_Identity_AttributesEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_StartClientHandshakeReq_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_ServerHandshakeParameters_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_StartServerHandshakeReq_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_HandshakerReq_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_HandshakerResult_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_HandshakerStatus_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_HandshakerResp_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\031grpc/gcp/handshaker.proto\022\010grpc.gcp\032(g" +
"rpc/gcp/transport_security_common.proto\"" +
"Y\n\010Endpoint\022\022\n\nip_address\030\001 \001(\t\022\014\n\004port\030" +
"\002 \001(\005\022+\n\010protocol\030\003 \001(\0162\031.grpc.gcp.Netwo" +
"rkProtocol\"\266\001\n\010Identity\022\031\n\017service_accou" +
"nt\030\001 \001(\tH\000\022\022\n\010hostname\030\002 \001(\tH\000\0226\n\nattrib" +
"utes\030\003 \003(\0132\".grpc.gcp.Identity.Attribute" +
"sEntry\0321\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r" +
"\n\005value\030\002 \001(\t:\0028\001B\020\n\016identity_oneof\"\222\003\n\027" +
"StartClientHandshakeReq\022@\n\033handshake_sec" +
"urity_protocol\030\001 \001(\0162\033.grpc.gcp.Handshak" +
"eProtocol\022\035\n\025application_protocols\030\002 \003(\t" +
"\022\030\n\020record_protocols\030\003 \003(\t\022-\n\021target_ide" +
"ntities\030\004 \003(\0132\022.grpc.gcp.Identity\022*\n\016loc" +
"al_identity\030\005 \001(\0132\022.grpc.gcp.Identity\022*\n" +
"\016local_endpoint\030\006 \001(\0132\022.grpc.gcp.Endpoin" +
"t\022+\n\017remote_endpoint\030\007 \001(\0132\022.grpc.gcp.En" +
"dpoint\022\023\n\013target_name\030\010 \001(\t\0223\n\014rpc_versi" +
"ons\030\t \001(\0132\035.grpc.gcp.RpcProtocolVersions" +
"\"c\n\031ServerHandshakeParameters\022\030\n\020record_" +
"protocols\030\001 \003(\t\022,\n\020local_identities\030\002 \003(" +
"\0132\022.grpc.gcp.Identity\"\223\003\n\027StartServerHan" +
"dshakeReq\022\035\n\025application_protocols\030\001 \003(\t" +
"\022X\n\024handshake_parameters\030\002 \003(\0132:.grpc.gc" +
"p.StartServerHandshakeReq.HandshakeParam" +
"etersEntry\022\020\n\010in_bytes\030\003 \001(\014\022*\n\016local_en" +
"dpoint\030\004 \001(\0132\022.grpc.gcp.Endpoint\022+\n\017remo" +
"te_endpoint\030\005 \001(\0132\022.grpc.gcp.Endpoint\0223\n" +
"\014rpc_versions\030\006 \001(\0132\035.grpc.gcp.RpcProtoc" +
"olVersions\032_\n\030HandshakeParametersEntry\022\013" +
"\n\003key\030\001 \001(\005\0222\n\005value\030\002 \001(\0132#.grpc.gcp.Se" +
"rverHandshakeParameters:\0028\001\"+\n\027NextHands" +
"hakeMessageReq\022\020\n\010in_bytes\030\001 \001(\014\"\305\001\n\rHan" +
"dshakerReq\0229\n\014client_start\030\001 \001(\0132!.grpc." +
"gcp.StartClientHandshakeReqH\000\0229\n\014server_" +
"start\030\002 \001(\0132!.grpc.gcp.StartServerHandsh" +
"akeReqH\000\0221\n\004next\030\003 \001(\0132!.grpc.gcp.NextHa" +
"ndshakeMessageReqH\000B\013\n\treq_oneof\"\207\002\n\020Han" +
"dshakerResult\022\034\n\024application_protocol\030\001 " +
"\001(\t\022\027\n\017record_protocol\030\002 \001(\t\022\020\n\010key_data" +
"\030\003 \001(\014\022)\n\rpeer_identity\030\004 \001(\0132\022.grpc.gcp" +
".Identity\022*\n\016local_identity\030\005 \001(\0132\022.grpc" +
".gcp.Identity\022\031\n\021keep_channel_open\030\006 \001(\010" +
"\0228\n\021peer_rpc_versions\030\007 \001(\0132\035.grpc.gcp.R" +
"pcProtocolVersions\"1\n\020HandshakerStatus\022\014" +
"\n\004code\030\001 \001(\r\022\017\n\007details\030\002 \001(\t\"\224\001\n\016Handsh" +
"akerResp\022\022\n\nout_frames\030\001 \001(\014\022\026\n\016bytes_co" +
"nsumed\030\002 \001(\r\022*\n\006result\030\003 \001(\0132\032.grpc.gcp." +
"HandshakerResult\022*\n\006status\030\004 \001(\0132\032.grpc." +
"gcp.HandshakerStatus*J\n\021HandshakeProtoco" +
"l\022\"\n\036HANDSHAKE_PROTOCOL_UNSPECIFIED\020\000\022\007\n" +
"\003TLS\020\001\022\010\n\004ALTS\020\002*E\n\017NetworkProtocol\022 \n\034N" +
"ETWORK_PROTOCOL_UNSPECIFIED\020\000\022\007\n\003TCP\020\001\022\007" +
"\n\003UDP\020\0022[\n\021HandshakerService\022F\n\013DoHandsh" +
"ake\022\027.grpc.gcp.HandshakerReq\032\030.grpc.gcp." +
"HandshakerResp\"\000(\0010\001Bk\n\025io.grpc.alts.int" +
"ernalB\017HandshakerProtoP\001Z?google.golang." +
"org/grpc/credentials/alts/internal/proto" +
"/grpc_gcpb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor(),
}, assigner);
internal_static_grpc_gcp_Endpoint_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_grpc_gcp_Endpoint_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_Endpoint_descriptor,
new java.lang.String[] { "IpAddress", "Port", "Protocol", });
internal_static_grpc_gcp_Identity_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_grpc_gcp_Identity_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_Identity_descriptor,
new java.lang.String[] { "ServiceAccount", "Hostname", "Attributes", "IdentityOneof", });
internal_static_grpc_gcp_Identity_AttributesEntry_descriptor =
internal_static_grpc_gcp_Identity_descriptor.getNestedTypes().get(0);
internal_static_grpc_gcp_Identity_AttributesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_Identity_AttributesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gcp_StartClientHandshakeReq_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_StartClientHandshakeReq_descriptor,
new java.lang.String[] { "HandshakeSecurityProtocol", "ApplicationProtocols", "RecordProtocols", "TargetIdentities", "LocalIdentity", "LocalEndpoint", "RemoteEndpoint", "TargetName", "RpcVersions", });
internal_static_grpc_gcp_ServerHandshakeParameters_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_ServerHandshakeParameters_descriptor,
new java.lang.String[] { "RecordProtocols", "LocalIdentities", });
internal_static_grpc_gcp_StartServerHandshakeReq_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_StartServerHandshakeReq_descriptor,
new java.lang.String[] { "ApplicationProtocols", "HandshakeParameters", "InBytes", "LocalEndpoint", "RemoteEndpoint", "RpcVersions", });
internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor =
internal_static_grpc_gcp_StartServerHandshakeReq_descriptor.getNestedTypes().get(0);
internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor,
new java.lang.String[] { "InBytes", });
internal_static_grpc_gcp_HandshakerReq_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_HandshakerReq_descriptor,
new java.lang.String[] { "ClientStart", "ServerStart", "Next", "ReqOneof", });
internal_static_grpc_gcp_HandshakerResult_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_HandshakerResult_descriptor,
new java.lang.String[] { "ApplicationProtocol", "RecordProtocol", "KeyData", "PeerIdentity", "LocalIdentity", "KeepChannelOpen", "PeerRpcVersions", });
internal_static_grpc_gcp_HandshakerStatus_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_HandshakerStatus_descriptor,
new java.lang.String[] { "Code", "Details", });
internal_static_grpc_gcp_HandshakerResp_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_HandshakerResp_descriptor,
new java.lang.String[] { "OutFrames", "BytesConsumed", "Result", "Status", });
io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,86 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface HandshakerReqOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerReq)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The start client handshake request message.
* </pre>
*
* <code>.grpc.gcp.StartClientHandshakeReq client_start = 1;</code>
*/
boolean hasClientStart();
/**
* <pre>
* The start client handshake request message.
* </pre>
*
* <code>.grpc.gcp.StartClientHandshakeReq client_start = 1;</code>
*/
io.grpc.alts.internal.StartClientHandshakeReq getClientStart();
/**
* <pre>
* The start client handshake request message.
* </pre>
*
* <code>.grpc.gcp.StartClientHandshakeReq client_start = 1;</code>
*/
io.grpc.alts.internal.StartClientHandshakeReqOrBuilder getClientStartOrBuilder();
/**
* <pre>
* The start server handshake request message.
* </pre>
*
* <code>.grpc.gcp.StartServerHandshakeReq server_start = 2;</code>
*/
boolean hasServerStart();
/**
* <pre>
* The start server handshake request message.
* </pre>
*
* <code>.grpc.gcp.StartServerHandshakeReq server_start = 2;</code>
*/
io.grpc.alts.internal.StartServerHandshakeReq getServerStart();
/**
* <pre>
* The start server handshake request message.
* </pre>
*
* <code>.grpc.gcp.StartServerHandshakeReq server_start = 2;</code>
*/
io.grpc.alts.internal.StartServerHandshakeReqOrBuilder getServerStartOrBuilder();
/**
* <pre>
* The next handshake request message.
* </pre>
*
* <code>.grpc.gcp.NextHandshakeMessageReq next = 3;</code>
*/
boolean hasNext();
/**
* <pre>
* The next handshake request message.
* </pre>
*
* <code>.grpc.gcp.NextHandshakeMessageReq next = 3;</code>
*/
io.grpc.alts.internal.NextHandshakeMessageReq getNext();
/**
* <pre>
* The next handshake request message.
* </pre>
*
* <code>.grpc.gcp.NextHandshakeMessageReq next = 3;</code>
*/
io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder getNextOrBuilder();
public io.grpc.alts.internal.HandshakerReq.ReqOneofCase getReqOneofCase();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,86 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface HandshakerRespOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerResp)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Frames to be given to the peer for the NextHandshakeMessageReq. May be
* empty if no out_frames have to be sent to the peer or if in_bytes in the
* HandshakerReq are incomplete. All the non-empty out frames must be sent to
* the peer even if the handshaker status is not OK as these frames may
* contain the alert frames.
* </pre>
*
* <code>bytes out_frames = 1;</code>
*/
com.google.protobuf.ByteString getOutFrames();
/**
* <pre>
* Number of bytes in the in_bytes consumed by the handshaker. It is possible
* that part of in_bytes in HandshakerReq was unrelated to the handshake
* process.
* </pre>
*
* <code>uint32 bytes_consumed = 2;</code>
*/
int getBytesConsumed();
/**
* <pre>
* This is set iff the handshake was successful. out_frames may still be set
* to frames that needs to be forwarded to the peer.
* </pre>
*
* <code>.grpc.gcp.HandshakerResult result = 3;</code>
*/
boolean hasResult();
/**
* <pre>
* This is set iff the handshake was successful. out_frames may still be set
* to frames that needs to be forwarded to the peer.
* </pre>
*
* <code>.grpc.gcp.HandshakerResult result = 3;</code>
*/
io.grpc.alts.internal.HandshakerResult getResult();
/**
* <pre>
* This is set iff the handshake was successful. out_frames may still be set
* to frames that needs to be forwarded to the peer.
* </pre>
*
* <code>.grpc.gcp.HandshakerResult result = 3;</code>
*/
io.grpc.alts.internal.HandshakerResultOrBuilder getResultOrBuilder();
/**
* <pre>
* Status of the handshaker.
* </pre>
*
* <code>.grpc.gcp.HandshakerStatus status = 4;</code>
*/
boolean hasStatus();
/**
* <pre>
* Status of the handshaker.
* </pre>
*
* <code>.grpc.gcp.HandshakerStatus status = 4;</code>
*/
io.grpc.alts.internal.HandshakerStatus getStatus();
/**
* <pre>
* Status of the handshaker.
* </pre>
*
* <code>.grpc.gcp.HandshakerStatus status = 4;</code>
*/
io.grpc.alts.internal.HandshakerStatusOrBuilder getStatusOrBuilder();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,142 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface HandshakerResultOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerResult)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
java.lang.String getApplicationProtocol();
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
com.google.protobuf.ByteString
getApplicationProtocolBytes();
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
java.lang.String getRecordProtocol();
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
com.google.protobuf.ByteString
getRecordProtocolBytes();
/**
* <pre>
* Cryptographic key data. The key data may be more than the key length
* required for the record protocol, thus the client of the handshaker
* service needs to truncate the key data into the right key length.
* </pre>
*
* <code>bytes key_data = 3;</code>
*/
com.google.protobuf.ByteString getKeyData();
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
boolean hasPeerIdentity();
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
io.grpc.alts.internal.Identity getPeerIdentity();
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
io.grpc.alts.internal.IdentityOrBuilder getPeerIdentityOrBuilder();
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
boolean hasLocalIdentity();
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
io.grpc.alts.internal.Identity getLocalIdentity();
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder();
/**
* <pre>
* Indicate whether the handshaker service client should keep the channel
* between the handshaker service open, e.g., in order to handle
* post-handshake messages in the future.
* </pre>
*
* <code>bool keep_channel_open = 6;</code>
*/
boolean getKeepChannelOpen();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
boolean hasPeerRpcVersions();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder();
}

View File

@ -0,0 +1,618 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
/**
* Protobuf type {@code grpc.gcp.HandshakerStatus}
*/
public final class HandshakerStatus extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gcp.HandshakerStatus)
HandshakerStatusOrBuilder {
private static final long serialVersionUID = 0L;
// Use HandshakerStatus.newBuilder() to construct.
private HandshakerStatus(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private HandshakerStatus() {
code_ = 0;
details_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HandshakerStatus(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
code_ = input.readUInt32();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
details_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.alts.internal.HandshakerStatus.class, io.grpc.alts.internal.HandshakerStatus.Builder.class);
}
public static final int CODE_FIELD_NUMBER = 1;
private int code_;
/**
* <pre>
* The status code. This could be the gRPC status code.
* </pre>
*
* <code>uint32 code = 1;</code>
*/
public int getCode() {
return code_;
}
public static final int DETAILS_FIELD_NUMBER = 2;
private volatile java.lang.Object details_;
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
public java.lang.String getDetails() {
java.lang.Object ref = details_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
details_ = s;
return s;
}
}
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
public com.google.protobuf.ByteString
getDetailsBytes() {
java.lang.Object ref = details_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
details_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (code_ != 0) {
output.writeUInt32(1, code_);
}
if (!getDetailsBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (code_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, code_);
}
if (!getDetailsBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grpc.alts.internal.HandshakerStatus)) {
return super.equals(obj);
}
io.grpc.alts.internal.HandshakerStatus other = (io.grpc.alts.internal.HandshakerStatus) obj;
boolean result = true;
result = result && (getCode()
== other.getCode());
result = result && getDetails()
.equals(other.getDetails());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CODE_FIELD_NUMBER;
hash = (53 * hash) + getCode();
hash = (37 * hash) + DETAILS_FIELD_NUMBER;
hash = (53 * hash) + getDetails().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.grpc.alts.internal.HandshakerStatus parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.HandshakerStatus parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.HandshakerStatus parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grpc.alts.internal.HandshakerStatus prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code grpc.gcp.HandshakerStatus}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerStatus)
io.grpc.alts.internal.HandshakerStatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.alts.internal.HandshakerStatus.class, io.grpc.alts.internal.HandshakerStatus.Builder.class);
}
// Construct using io.grpc.alts.internal.HandshakerStatus.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
code_ = 0;
details_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_descriptor;
}
public io.grpc.alts.internal.HandshakerStatus getDefaultInstanceForType() {
return io.grpc.alts.internal.HandshakerStatus.getDefaultInstance();
}
public io.grpc.alts.internal.HandshakerStatus build() {
io.grpc.alts.internal.HandshakerStatus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.grpc.alts.internal.HandshakerStatus buildPartial() {
io.grpc.alts.internal.HandshakerStatus result = new io.grpc.alts.internal.HandshakerStatus(this);
result.code_ = code_;
result.details_ = details_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.grpc.alts.internal.HandshakerStatus) {
return mergeFrom((io.grpc.alts.internal.HandshakerStatus)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.alts.internal.HandshakerStatus other) {
if (other == io.grpc.alts.internal.HandshakerStatus.getDefaultInstance()) return this;
if (other.getCode() != 0) {
setCode(other.getCode());
}
if (!other.getDetails().isEmpty()) {
details_ = other.details_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.grpc.alts.internal.HandshakerStatus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.alts.internal.HandshakerStatus) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int code_ ;
/**
* <pre>
* The status code. This could be the gRPC status code.
* </pre>
*
* <code>uint32 code = 1;</code>
*/
public int getCode() {
return code_;
}
/**
* <pre>
* The status code. This could be the gRPC status code.
* </pre>
*
* <code>uint32 code = 1;</code>
*/
public Builder setCode(int value) {
code_ = value;
onChanged();
return this;
}
/**
* <pre>
* The status code. This could be the gRPC status code.
* </pre>
*
* <code>uint32 code = 1;</code>
*/
public Builder clearCode() {
code_ = 0;
onChanged();
return this;
}
private java.lang.Object details_ = "";
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
public java.lang.String getDetails() {
java.lang.Object ref = details_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
details_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
public com.google.protobuf.ByteString
getDetailsBytes() {
java.lang.Object ref = details_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
details_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
public Builder setDetails(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
details_ = value;
onChanged();
return this;
}
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
public Builder clearDetails() {
details_ = getDefaultInstance().getDetails();
onChanged();
return this;
}
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
public Builder setDetailsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
details_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gcp.HandshakerStatus)
}
// @@protoc_insertion_point(class_scope:grpc.gcp.HandshakerStatus)
private static final io.grpc.alts.internal.HandshakerStatus DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.alts.internal.HandshakerStatus();
}
public static io.grpc.alts.internal.HandshakerStatus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<HandshakerStatus>
PARSER = new com.google.protobuf.AbstractParser<HandshakerStatus>() {
public HandshakerStatus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HandshakerStatus(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<HandshakerStatus> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<HandshakerStatus> getParserForType() {
return PARSER;
}
public io.grpc.alts.internal.HandshakerStatus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,36 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface HandshakerStatusOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerStatus)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The status code. This could be the gRPC status code.
* </pre>
*
* <code>uint32 code = 1;</code>
*/
int getCode();
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
java.lang.String getDetails();
/**
* <pre>
* The status details.
* </pre>
*
* <code>string details = 2;</code>
*/
com.google.protobuf.ByteString
getDetailsBytes();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,101 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface IdentityOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.Identity)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Service account of a connection endpoint.
* </pre>
*
* <code>string service_account = 1;</code>
*/
java.lang.String getServiceAccount();
/**
* <pre>
* Service account of a connection endpoint.
* </pre>
*
* <code>string service_account = 1;</code>
*/
com.google.protobuf.ByteString
getServiceAccountBytes();
/**
* <pre>
* Hostname of a connection endpoint.
* </pre>
*
* <code>string hostname = 2;</code>
*/
java.lang.String getHostname();
/**
* <pre>
* Hostname of a connection endpoint.
* </pre>
*
* <code>string hostname = 2;</code>
*/
com.google.protobuf.ByteString
getHostnameBytes();
/**
* <pre>
* Additional attributes of the identity.
* </pre>
*
* <code>map&lt;string, string&gt; attributes = 3;</code>
*/
int getAttributesCount();
/**
* <pre>
* Additional attributes of the identity.
* </pre>
*
* <code>map&lt;string, string&gt; attributes = 3;</code>
*/
boolean containsAttributes(
java.lang.String key);
/**
* Use {@link #getAttributesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String>
getAttributes();
/**
* <pre>
* Additional attributes of the identity.
* </pre>
*
* <code>map&lt;string, string&gt; attributes = 3;</code>
*/
java.util.Map<java.lang.String, java.lang.String>
getAttributesMap();
/**
* <pre>
* Additional attributes of the identity.
* </pre>
*
* <code>map&lt;string, string&gt; attributes = 3;</code>
*/
java.lang.String getAttributesOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
* <pre>
* Additional attributes of the identity.
* </pre>
*
* <code>map&lt;string, string&gt; attributes = 3;</code>
*/
java.lang.String getAttributesOrThrow(
java.lang.String key);
public io.grpc.alts.internal.Identity.IdentityOneofCase getIdentityOneofCase();
}

View File

@ -0,0 +1,112 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
/**
* Protobuf enum {@code grpc.gcp.NetworkProtocol}
*/
public enum NetworkProtocol
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>NETWORK_PROTOCOL_UNSPECIFIED = 0;</code>
*/
NETWORK_PROTOCOL_UNSPECIFIED(0),
/**
* <code>TCP = 1;</code>
*/
TCP(1),
/**
* <code>UDP = 2;</code>
*/
UDP(2),
UNRECOGNIZED(-1),
;
/**
* <code>NETWORK_PROTOCOL_UNSPECIFIED = 0;</code>
*/
public static final int NETWORK_PROTOCOL_UNSPECIFIED_VALUE = 0;
/**
* <code>TCP = 1;</code>
*/
public static final int TCP_VALUE = 1;
/**
* <code>UDP = 2;</code>
*/
public static final int UDP_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static NetworkProtocol valueOf(int value) {
return forNumber(value);
}
public static NetworkProtocol forNumber(int value) {
switch (value) {
case 0: return NETWORK_PROTOCOL_UNSPECIFIED;
case 1: return TCP;
case 2: return UDP;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<NetworkProtocol>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
NetworkProtocol> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<NetworkProtocol>() {
public NetworkProtocol findValueByNumber(int number) {
return NetworkProtocol.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.getDescriptor().getEnumTypes().get(1);
}
private static final NetworkProtocol[] VALUES = values();
public static NetworkProtocol valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private NetworkProtocol(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.gcp.NetworkProtocol)
}

View File

@ -0,0 +1,474 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
/**
* Protobuf type {@code grpc.gcp.NextHandshakeMessageReq}
*/
public final class NextHandshakeMessageReq extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gcp.NextHandshakeMessageReq)
NextHandshakeMessageReqOrBuilder {
private static final long serialVersionUID = 0L;
// Use NextHandshakeMessageReq.newBuilder() to construct.
private NextHandshakeMessageReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private NextHandshakeMessageReq() {
inBytes_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NextHandshakeMessageReq(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
inBytes_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.alts.internal.NextHandshakeMessageReq.class, io.grpc.alts.internal.NextHandshakeMessageReq.Builder.class);
}
public static final int IN_BYTES_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString inBytes_;
/**
* <pre>
* Bytes in out_frames returned from the peer's HandshakerResp. It is possible
* that the peer's out_frames are split into multiple NextHandshakerMessageReq
* messages.
* </pre>
*
* <code>bytes in_bytes = 1;</code>
*/
public com.google.protobuf.ByteString getInBytes() {
return inBytes_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!inBytes_.isEmpty()) {
output.writeBytes(1, inBytes_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!inBytes_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, inBytes_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grpc.alts.internal.NextHandshakeMessageReq)) {
return super.equals(obj);
}
io.grpc.alts.internal.NextHandshakeMessageReq other = (io.grpc.alts.internal.NextHandshakeMessageReq) obj;
boolean result = true;
result = result && getInBytes()
.equals(other.getInBytes());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + IN_BYTES_FIELD_NUMBER;
hash = (53 * hash) + getInBytes().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grpc.alts.internal.NextHandshakeMessageReq prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code grpc.gcp.NextHandshakeMessageReq}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gcp.NextHandshakeMessageReq)
io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.alts.internal.NextHandshakeMessageReq.class, io.grpc.alts.internal.NextHandshakeMessageReq.Builder.class);
}
// Construct using io.grpc.alts.internal.NextHandshakeMessageReq.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
inBytes_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor;
}
public io.grpc.alts.internal.NextHandshakeMessageReq getDefaultInstanceForType() {
return io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance();
}
public io.grpc.alts.internal.NextHandshakeMessageReq build() {
io.grpc.alts.internal.NextHandshakeMessageReq result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.grpc.alts.internal.NextHandshakeMessageReq buildPartial() {
io.grpc.alts.internal.NextHandshakeMessageReq result = new io.grpc.alts.internal.NextHandshakeMessageReq(this);
result.inBytes_ = inBytes_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.grpc.alts.internal.NextHandshakeMessageReq) {
return mergeFrom((io.grpc.alts.internal.NextHandshakeMessageReq)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.alts.internal.NextHandshakeMessageReq other) {
if (other == io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance()) return this;
if (other.getInBytes() != com.google.protobuf.ByteString.EMPTY) {
setInBytes(other.getInBytes());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.grpc.alts.internal.NextHandshakeMessageReq parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.alts.internal.NextHandshakeMessageReq) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString inBytes_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Bytes in out_frames returned from the peer's HandshakerResp. It is possible
* that the peer's out_frames are split into multiple NextHandshakerMessageReq
* messages.
* </pre>
*
* <code>bytes in_bytes = 1;</code>
*/
public com.google.protobuf.ByteString getInBytes() {
return inBytes_;
}
/**
* <pre>
* Bytes in out_frames returned from the peer's HandshakerResp. It is possible
* that the peer's out_frames are split into multiple NextHandshakerMessageReq
* messages.
* </pre>
*
* <code>bytes in_bytes = 1;</code>
*/
public Builder setInBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
inBytes_ = value;
onChanged();
return this;
}
/**
* <pre>
* Bytes in out_frames returned from the peer's HandshakerResp. It is possible
* that the peer's out_frames are split into multiple NextHandshakerMessageReq
* messages.
* </pre>
*
* <code>bytes in_bytes = 1;</code>
*/
public Builder clearInBytes() {
inBytes_ = getDefaultInstance().getInBytes();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gcp.NextHandshakeMessageReq)
}
// @@protoc_insertion_point(class_scope:grpc.gcp.NextHandshakeMessageReq)
private static final io.grpc.alts.internal.NextHandshakeMessageReq DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.alts.internal.NextHandshakeMessageReq();
}
public static io.grpc.alts.internal.NextHandshakeMessageReq getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<NextHandshakeMessageReq>
PARSER = new com.google.protobuf.AbstractParser<NextHandshakeMessageReq>() {
public NextHandshakeMessageReq parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NextHandshakeMessageReq(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<NextHandshakeMessageReq> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<NextHandshakeMessageReq> getParserForType() {
return PARSER;
}
public io.grpc.alts.internal.NextHandshakeMessageReq getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,20 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface NextHandshakeMessageReqOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.NextHandshakeMessageReq)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Bytes in out_frames returned from the peer's HandshakerResp. It is possible
* that the peer's out_frames are split into multiple NextHandshakerMessageReq
* messages.
* </pre>
*
* <code>bytes in_bytes = 1;</code>
*/
com.google.protobuf.ByteString getInBytes();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,59 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/transport_security_common.proto
package io.grpc.alts.internal;
public interface RpcProtocolVersionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.RpcProtocolVersions)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Maximum supported RPC version.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1;</code>
*/
boolean hasMaxRpcVersion();
/**
* <pre>
* Maximum supported RPC version.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1;</code>
*/
io.grpc.alts.internal.RpcProtocolVersions.Version getMaxRpcVersion();
/**
* <pre>
* Maximum supported RPC version.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1;</code>
*/
io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder getMaxRpcVersionOrBuilder();
/**
* <pre>
* Minimum supported RPC version.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2;</code>
*/
boolean hasMinRpcVersion();
/**
* <pre>
* Minimum supported RPC version.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2;</code>
*/
io.grpc.alts.internal.RpcProtocolVersions.Version getMinRpcVersion();
/**
* <pre>
* Minimum supported RPC version.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2;</code>
*/
io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder getMinRpcVersionOrBuilder();
}

View File

@ -0,0 +1,117 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/transport_security_common.proto
package io.grpc.alts.internal;
/**
* <pre>
* The security level of the created channel. The list is sorted in increasing
* level of security. This order must always be maintained.
* </pre>
*
* Protobuf enum {@code grpc.gcp.SecurityLevel}
*/
public enum SecurityLevel
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>SECURITY_NONE = 0;</code>
*/
SECURITY_NONE(0),
/**
* <code>INTEGRITY_ONLY = 1;</code>
*/
INTEGRITY_ONLY(1),
/**
* <code>INTEGRITY_AND_PRIVACY = 2;</code>
*/
INTEGRITY_AND_PRIVACY(2),
UNRECOGNIZED(-1),
;
/**
* <code>SECURITY_NONE = 0;</code>
*/
public static final int SECURITY_NONE_VALUE = 0;
/**
* <code>INTEGRITY_ONLY = 1;</code>
*/
public static final int INTEGRITY_ONLY_VALUE = 1;
/**
* <code>INTEGRITY_AND_PRIVACY = 2;</code>
*/
public static final int INTEGRITY_AND_PRIVACY_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SecurityLevel valueOf(int value) {
return forNumber(value);
}
public static SecurityLevel forNumber(int value) {
switch (value) {
case 0: return SECURITY_NONE;
case 1: return INTEGRITY_ONLY;
case 2: return INTEGRITY_AND_PRIVACY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<SecurityLevel>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
SecurityLevel> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<SecurityLevel>() {
public SecurityLevel findValueByNumber(int number) {
return SecurityLevel.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor().getEnumTypes().get(0);
}
private static final SecurityLevel[] VALUES = values();
public static SecurityLevel valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private SecurityLevel(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.gcp.SecurityLevel)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,97 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface ServerHandshakeParametersOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.ServerHandshakeParameters)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The record protocols supported by the server, e.g.,
* "ALTSRP_GCM_AES128".
* </pre>
*
* <code>repeated string record_protocols = 1;</code>
*/
java.util.List<java.lang.String>
getRecordProtocolsList();
/**
* <pre>
* The record protocols supported by the server, e.g.,
* "ALTSRP_GCM_AES128".
* </pre>
*
* <code>repeated string record_protocols = 1;</code>
*/
int getRecordProtocolsCount();
/**
* <pre>
* The record protocols supported by the server, e.g.,
* "ALTSRP_GCM_AES128".
* </pre>
*
* <code>repeated string record_protocols = 1;</code>
*/
java.lang.String getRecordProtocols(int index);
/**
* <pre>
* The record protocols supported by the server, e.g.,
* "ALTSRP_GCM_AES128".
* </pre>
*
* <code>repeated string record_protocols = 1;</code>
*/
com.google.protobuf.ByteString
getRecordProtocolsBytes(int index);
/**
* <pre>
* (Optional) A list of local identities supported by the server, if
* specified. Otherwise, the handshaker chooses a default local identity.
* </pre>
*
* <code>repeated .grpc.gcp.Identity local_identities = 2;</code>
*/
java.util.List<io.grpc.alts.internal.Identity>
getLocalIdentitiesList();
/**
* <pre>
* (Optional) A list of local identities supported by the server, if
* specified. Otherwise, the handshaker chooses a default local identity.
* </pre>
*
* <code>repeated .grpc.gcp.Identity local_identities = 2;</code>
*/
io.grpc.alts.internal.Identity getLocalIdentities(int index);
/**
* <pre>
* (Optional) A list of local identities supported by the server, if
* specified. Otherwise, the handshaker chooses a default local identity.
* </pre>
*
* <code>repeated .grpc.gcp.Identity local_identities = 2;</code>
*/
int getLocalIdentitiesCount();
/**
* <pre>
* (Optional) A list of local identities supported by the server, if
* specified. Otherwise, the handshaker chooses a default local identity.
* </pre>
*
* <code>repeated .grpc.gcp.Identity local_identities = 2;</code>
*/
java.util.List<? extends io.grpc.alts.internal.IdentityOrBuilder>
getLocalIdentitiesOrBuilderList();
/**
* <pre>
* (Optional) A list of local identities supported by the server, if
* specified. Otherwise, the handshaker chooses a default local identity.
* </pre>
*
* <code>repeated .grpc.gcp.Identity local_identities = 2;</code>
*/
io.grpc.alts.internal.IdentityOrBuilder getLocalIdentitiesOrBuilder(
int index);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,289 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface StartClientHandshakeReqOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.StartClientHandshakeReq)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Handshake security protocol requested by the client.
* </pre>
*
* <code>.grpc.gcp.HandshakeProtocol handshake_security_protocol = 1;</code>
*/
int getHandshakeSecurityProtocolValue();
/**
* <pre>
* Handshake security protocol requested by the client.
* </pre>
*
* <code>.grpc.gcp.HandshakeProtocol handshake_security_protocol = 1;</code>
*/
io.grpc.alts.internal.HandshakeProtocol getHandshakeSecurityProtocol();
/**
* <pre>
* The application protocols supported by the client, e.g., "h2" (for http2),
* "grpc".
* </pre>
*
* <code>repeated string application_protocols = 2;</code>
*/
java.util.List<java.lang.String>
getApplicationProtocolsList();
/**
* <pre>
* The application protocols supported by the client, e.g., "h2" (for http2),
* "grpc".
* </pre>
*
* <code>repeated string application_protocols = 2;</code>
*/
int getApplicationProtocolsCount();
/**
* <pre>
* The application protocols supported by the client, e.g., "h2" (for http2),
* "grpc".
* </pre>
*
* <code>repeated string application_protocols = 2;</code>
*/
java.lang.String getApplicationProtocols(int index);
/**
* <pre>
* The application protocols supported by the client, e.g., "h2" (for http2),
* "grpc".
* </pre>
*
* <code>repeated string application_protocols = 2;</code>
*/
com.google.protobuf.ByteString
getApplicationProtocolsBytes(int index);
/**
* <pre>
* The record protocols supported by the client, e.g.,
* "ALTSRP_GCM_AES128".
* </pre>
*
* <code>repeated string record_protocols = 3;</code>
*/
java.util.List<java.lang.String>
getRecordProtocolsList();
/**
* <pre>
* The record protocols supported by the client, e.g.,
* "ALTSRP_GCM_AES128".
* </pre>
*
* <code>repeated string record_protocols = 3;</code>
*/
int getRecordProtocolsCount();
/**
* <pre>
* The record protocols supported by the client, e.g.,
* "ALTSRP_GCM_AES128".
* </pre>
*
* <code>repeated string record_protocols = 3;</code>
*/
java.lang.String getRecordProtocols(int index);
/**
* <pre>
* The record protocols supported by the client, e.g.,
* "ALTSRP_GCM_AES128".
* </pre>
*
* <code>repeated string record_protocols = 3;</code>
*/
com.google.protobuf.ByteString
getRecordProtocolsBytes(int index);
/**
* <pre>
* (Optional) Describes which server identities are acceptable by the client.
* If target identities are provided and none of them matches the peer
* identity of the server, handshake will fail.
* </pre>
*
* <code>repeated .grpc.gcp.Identity target_identities = 4;</code>
*/
java.util.List<io.grpc.alts.internal.Identity>
getTargetIdentitiesList();
/**
* <pre>
* (Optional) Describes which server identities are acceptable by the client.
* If target identities are provided and none of them matches the peer
* identity of the server, handshake will fail.
* </pre>
*
* <code>repeated .grpc.gcp.Identity target_identities = 4;</code>
*/
io.grpc.alts.internal.Identity getTargetIdentities(int index);
/**
* <pre>
* (Optional) Describes which server identities are acceptable by the client.
* If target identities are provided and none of them matches the peer
* identity of the server, handshake will fail.
* </pre>
*
* <code>repeated .grpc.gcp.Identity target_identities = 4;</code>
*/
int getTargetIdentitiesCount();
/**
* <pre>
* (Optional) Describes which server identities are acceptable by the client.
* If target identities are provided and none of them matches the peer
* identity of the server, handshake will fail.
* </pre>
*
* <code>repeated .grpc.gcp.Identity target_identities = 4;</code>
*/
java.util.List<? extends io.grpc.alts.internal.IdentityOrBuilder>
getTargetIdentitiesOrBuilderList();
/**
* <pre>
* (Optional) Describes which server identities are acceptable by the client.
* If target identities are provided and none of them matches the peer
* identity of the server, handshake will fail.
* </pre>
*
* <code>repeated .grpc.gcp.Identity target_identities = 4;</code>
*/
io.grpc.alts.internal.IdentityOrBuilder getTargetIdentitiesOrBuilder(
int index);
/**
* <pre>
* (Optional) Application may specify a local identity. Otherwise, the
* handshaker chooses a default local identity.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
boolean hasLocalIdentity();
/**
* <pre>
* (Optional) Application may specify a local identity. Otherwise, the
* handshaker chooses a default local identity.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
io.grpc.alts.internal.Identity getLocalIdentity();
/**
* <pre>
* (Optional) Application may specify a local identity. Otherwise, the
* handshaker chooses a default local identity.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder();
/**
* <pre>
* (Optional) Local endpoint information of the connection to the server,
* such as local IP address, port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint local_endpoint = 6;</code>
*/
boolean hasLocalEndpoint();
/**
* <pre>
* (Optional) Local endpoint information of the connection to the server,
* such as local IP address, port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint local_endpoint = 6;</code>
*/
io.grpc.alts.internal.Endpoint getLocalEndpoint();
/**
* <pre>
* (Optional) Local endpoint information of the connection to the server,
* such as local IP address, port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint local_endpoint = 6;</code>
*/
io.grpc.alts.internal.EndpointOrBuilder getLocalEndpointOrBuilder();
/**
* <pre>
* (Optional) Endpoint information of the remote server, such as IP address,
* port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint remote_endpoint = 7;</code>
*/
boolean hasRemoteEndpoint();
/**
* <pre>
* (Optional) Endpoint information of the remote server, such as IP address,
* port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint remote_endpoint = 7;</code>
*/
io.grpc.alts.internal.Endpoint getRemoteEndpoint();
/**
* <pre>
* (Optional) Endpoint information of the remote server, such as IP address,
* port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint remote_endpoint = 7;</code>
*/
io.grpc.alts.internal.EndpointOrBuilder getRemoteEndpointOrBuilder();
/**
* <pre>
* (Optional) If target name is provided, a secure naming check is performed
* to verify that the peer authenticated identity is indeed authorized to run
* the target name.
* </pre>
*
* <code>string target_name = 8;</code>
*/
java.lang.String getTargetName();
/**
* <pre>
* (Optional) If target name is provided, a secure naming check is performed
* to verify that the peer authenticated identity is indeed authorized to run
* the target name.
* </pre>
*
* <code>string target_name = 8;</code>
*/
com.google.protobuf.ByteString
getTargetNameBytes();
/**
* <pre>
* (Optional) RPC protocol versions supported by the client.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions rpc_versions = 9;</code>
*/
boolean hasRpcVersions();
/**
* <pre>
* (Optional) RPC protocol versions supported by the client.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions rpc_versions = 9;</code>
*/
io.grpc.alts.internal.RpcProtocolVersions getRpcVersions();
/**
* <pre>
* (Optional) RPC protocol versions supported by the client.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions rpc_versions = 9;</code>
*/
io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,213 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
public interface StartServerHandshakeReqOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gcp.StartServerHandshakeReq)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The application protocols supported by the server, e.g., "h2" (for http2),
* "grpc".
* </pre>
*
* <code>repeated string application_protocols = 1;</code>
*/
java.util.List<java.lang.String>
getApplicationProtocolsList();
/**
* <pre>
* The application protocols supported by the server, e.g., "h2" (for http2),
* "grpc".
* </pre>
*
* <code>repeated string application_protocols = 1;</code>
*/
int getApplicationProtocolsCount();
/**
* <pre>
* The application protocols supported by the server, e.g., "h2" (for http2),
* "grpc".
* </pre>
*
* <code>repeated string application_protocols = 1;</code>
*/
java.lang.String getApplicationProtocols(int index);
/**
* <pre>
* The application protocols supported by the server, e.g., "h2" (for http2),
* "grpc".
* </pre>
*
* <code>repeated string application_protocols = 1;</code>
*/
com.google.protobuf.ByteString
getApplicationProtocolsBytes(int index);
/**
* <pre>
* Handshake parameters (record protocols and local identities supported by
* the server) mapped by the handshake protocol. Each handshake security
* protocol (e.g., TLS or ALTS) has its own set of record protocols and local
* identities. Since protobuf does not support enum as key to the map, the key
* to handshake_parameters is the integer value of HandshakeProtocol enum.
* </pre>
*
* <code>map&lt;int32, .grpc.gcp.ServerHandshakeParameters&gt; handshake_parameters = 2;</code>
*/
int getHandshakeParametersCount();
/**
* <pre>
* Handshake parameters (record protocols and local identities supported by
* the server) mapped by the handshake protocol. Each handshake security
* protocol (e.g., TLS or ALTS) has its own set of record protocols and local
* identities. Since protobuf does not support enum as key to the map, the key
* to handshake_parameters is the integer value of HandshakeProtocol enum.
* </pre>
*
* <code>map&lt;int32, .grpc.gcp.ServerHandshakeParameters&gt; handshake_parameters = 2;</code>
*/
boolean containsHandshakeParameters(
int key);
/**
* Use {@link #getHandshakeParametersMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.Integer, io.grpc.alts.internal.ServerHandshakeParameters>
getHandshakeParameters();
/**
* <pre>
* Handshake parameters (record protocols and local identities supported by
* the server) mapped by the handshake protocol. Each handshake security
* protocol (e.g., TLS or ALTS) has its own set of record protocols and local
* identities. Since protobuf does not support enum as key to the map, the key
* to handshake_parameters is the integer value of HandshakeProtocol enum.
* </pre>
*
* <code>map&lt;int32, .grpc.gcp.ServerHandshakeParameters&gt; handshake_parameters = 2;</code>
*/
java.util.Map<java.lang.Integer, io.grpc.alts.internal.ServerHandshakeParameters>
getHandshakeParametersMap();
/**
* <pre>
* Handshake parameters (record protocols and local identities supported by
* the server) mapped by the handshake protocol. Each handshake security
* protocol (e.g., TLS or ALTS) has its own set of record protocols and local
* identities. Since protobuf does not support enum as key to the map, the key
* to handshake_parameters is the integer value of HandshakeProtocol enum.
* </pre>
*
* <code>map&lt;int32, .grpc.gcp.ServerHandshakeParameters&gt; handshake_parameters = 2;</code>
*/
io.grpc.alts.internal.ServerHandshakeParameters getHandshakeParametersOrDefault(
int key,
io.grpc.alts.internal.ServerHandshakeParameters defaultValue);
/**
* <pre>
* Handshake parameters (record protocols and local identities supported by
* the server) mapped by the handshake protocol. Each handshake security
* protocol (e.g., TLS or ALTS) has its own set of record protocols and local
* identities. Since protobuf does not support enum as key to the map, the key
* to handshake_parameters is the integer value of HandshakeProtocol enum.
* </pre>
*
* <code>map&lt;int32, .grpc.gcp.ServerHandshakeParameters&gt; handshake_parameters = 2;</code>
*/
io.grpc.alts.internal.ServerHandshakeParameters getHandshakeParametersOrThrow(
int key);
/**
* <pre>
* Bytes in out_frames returned from the peer's HandshakerResp. It is possible
* that the peer's out_frames are split into multiple HandshakReq messages.
* </pre>
*
* <code>bytes in_bytes = 3;</code>
*/
com.google.protobuf.ByteString getInBytes();
/**
* <pre>
* (Optional) Local endpoint information of the connection to the client,
* such as local IP address, port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint local_endpoint = 4;</code>
*/
boolean hasLocalEndpoint();
/**
* <pre>
* (Optional) Local endpoint information of the connection to the client,
* such as local IP address, port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint local_endpoint = 4;</code>
*/
io.grpc.alts.internal.Endpoint getLocalEndpoint();
/**
* <pre>
* (Optional) Local endpoint information of the connection to the client,
* such as local IP address, port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint local_endpoint = 4;</code>
*/
io.grpc.alts.internal.EndpointOrBuilder getLocalEndpointOrBuilder();
/**
* <pre>
* (Optional) Endpoint information of the remote client, such as IP address,
* port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint remote_endpoint = 5;</code>
*/
boolean hasRemoteEndpoint();
/**
* <pre>
* (Optional) Endpoint information of the remote client, such as IP address,
* port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint remote_endpoint = 5;</code>
*/
io.grpc.alts.internal.Endpoint getRemoteEndpoint();
/**
* <pre>
* (Optional) Endpoint information of the remote client, such as IP address,
* port number, and network protocol.
* </pre>
*
* <code>.grpc.gcp.Endpoint remote_endpoint = 5;</code>
*/
io.grpc.alts.internal.EndpointOrBuilder getRemoteEndpointOrBuilder();
/**
* <pre>
* (Optional) RPC protocol versions supported by the server.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions rpc_versions = 6;</code>
*/
boolean hasRpcVersions();
/**
* <pre>
* (Optional) RPC protocol versions supported by the server.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions rpc_versions = 6;</code>
*/
io.grpc.alts.internal.RpcProtocolVersions getRpcVersions();
/**
* <pre>
* (Optional) RPC protocol versions supported by the server.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions rpc_versions = 6;</code>
*/
io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder();
}

View File

@ -0,0 +1,76 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/transport_security_common.proto
package io.grpc.alts.internal;
public final class TransportSecurityCommonProto {
private TransportSecurityCommonProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_RpcProtocolVersions_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n(grpc/gcp/transport_security_common.pro" +
"to\022\010grpc.gcp\"\276\001\n\023RpcProtocolVersions\022>\n\017" +
"max_rpc_version\030\001 \001(\0132%.grpc.gcp.RpcProt" +
"ocolVersions.Version\022>\n\017min_rpc_version\030" +
"\002 \001(\0132%.grpc.gcp.RpcProtocolVersions.Ver" +
"sion\032\'\n\007Version\022\r\n\005major\030\001 \001(\r\022\r\n\005minor\030" +
"\002 \001(\r*Q\n\rSecurityLevel\022\021\n\rSECURITY_NONE\020" +
"\000\022\022\n\016INTEGRITY_ONLY\020\001\022\031\n\025INTEGRITY_AND_P" +
"RIVACY\020\002Bx\n\025io.grpc.alts.internalB\034Trans" +
"portSecurityCommonProtoP\001Z?google.golang" +
".org/grpc/credentials/alts/internal/prot" +
"o/grpc_gcpb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_grpc_gcp_RpcProtocolVersions_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_RpcProtocolVersions_descriptor,
new java.lang.String[] { "MaxRpcVersion", "MinRpcVersion", });
internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor =
internal_static_grpc_gcp_RpcProtocolVersions_descriptor.getNestedTypes().get(0);
internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor,
new java.lang.String[] { "Major", "Minor", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -17,10 +17,10 @@
package io.grpc.alts.internal;
import com.google.common.annotations.VisibleForTesting;
import io.grpc.alts.internal.Altscontext.AltsContext;
import io.grpc.alts.internal.Handshaker.HandshakerResult;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel;
import io.grpc.alts.internal.AltsContext;
import io.grpc.alts.internal.HandshakerResult;
import io.grpc.alts.internal.RpcProtocolVersions;
import io.grpc.alts.internal.SecurityLevel;
/** AltsAuthContext contains security-related context information about an ALTs connection. */
public final class AltsAuthContext {

View File

@ -17,7 +17,6 @@
package io.grpc.alts.internal;
import com.google.common.collect.ImmutableList;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import javax.annotation.Nullable;
/** Handshaker options for creating ALTS client channel. */

View File

@ -21,15 +21,6 @@ import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.protobuf.ByteString;
import io.grpc.Status;
import io.grpc.alts.internal.Handshaker.HandshakeProtocol;
import io.grpc.alts.internal.Handshaker.HandshakerReq;
import io.grpc.alts.internal.Handshaker.HandshakerResp;
import io.grpc.alts.internal.Handshaker.HandshakerResult;
import io.grpc.alts.internal.Handshaker.HandshakerStatus;
import io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq;
import io.grpc.alts.internal.Handshaker.ServerHandshakeParameters;
import io.grpc.alts.internal.Handshaker.StartClientHandshakeReq;
import io.grpc.alts.internal.Handshaker.StartServerHandshakeReq;
import io.grpc.alts.internal.HandshakerServiceGrpc.HandshakerServiceStub;
import java.io.IOException;
import java.nio.ByteBuffer;

View File

@ -16,7 +16,6 @@
package io.grpc.alts.internal;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import javax.annotation.Nullable;
/** Handshaker options for creating ALTS channel. */

View File

@ -18,8 +18,6 @@ package io.grpc.alts.internal;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Optional;
import io.grpc.alts.internal.Handshaker.HandshakerReq;
import io.grpc.alts.internal.Handshaker.HandshakerResp;
import io.grpc.alts.internal.HandshakerServiceGrpc.HandshakerServiceStub;
import io.grpc.stub.StreamObserver;
import java.io.IOException;

View File

@ -17,8 +17,7 @@
package io.grpc.alts.internal;
import com.google.common.annotations.VisibleForTesting;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version;
import io.grpc.alts.internal.RpcProtocolVersions.Version;
import javax.annotation.Nullable;
/** Utility class for Rpc Protocol Versions. */

View File

@ -12,12 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// The canonical version of this proto can be found at
// https://github.com/grpc/grpc-proto/blob/master/grpc/gcp/altscontext.proto
syntax = "proto3";
package grpc.gcp;
import "grpc/gcp/transport_security_common.proto";
option go_package = "google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp";
option java_multiple_files = true;
option java_outer_classname = "AltsContextProto";
option java_package = "io.grpc.alts.internal";
message AltsContext {
@ -42,3 +48,4 @@ message AltsContext {
// Additional attributes of the peer.
map<string, string> peer_attributes = 7;
}

View File

@ -12,14 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// The canonical version of this proto can be found at
// https://github.com/grpc/grpc-proto/blob/master/grpc/gcp/handshaker.proto
syntax = "proto3";
package grpc.gcp;
import "grpc/gcp/transport_security_common.proto";
option go_package = "google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp";
option java_multiple_files = true;
option java_outer_classname = "HandshakerProto";
option java_package = "io.grpc.alts.internal";
enum HandshakeProtocol {
// Default value.
HANDSHAKE_PROTOCOL_UNSPECIFIED = 0;
@ -225,3 +232,4 @@ service HandshakerService {
returns (stream HandshakerResp) {
}
}

View File

@ -12,10 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// The canonical version of this proto can be found at
// https://github.com/grpc/grpc-proto/blob/master/grpc/gcp/transport_security_common.proto
syntax = "proto3";
package grpc.gcp;
option go_package = "google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp";
option java_multiple_files = true;
option java_outer_classname = "TransportSecurityCommonProto";
option java_package = "io.grpc.alts.internal";
// The security level of the created channel. The list is sorted in increasing
@ -38,3 +44,4 @@ message RpcProtocolVersions {
// Minimum supported RPC version.
Version min_rpc_version = 2;
}

View File

@ -18,10 +18,6 @@ package io.grpc.alts.internal;
import static org.junit.Assert.assertEquals;
import io.grpc.alts.internal.Handshaker.HandshakerResult;
import io.grpc.alts.internal.Handshaker.Identity;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -19,7 +19,6 @@ package io.grpc.alts.internal;
import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableList;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

View File

@ -29,11 +29,6 @@ import static org.mockito.Mockito.when;
import com.google.common.collect.ImmutableList;
import com.google.protobuf.ByteString;
import io.grpc.alts.internal.Handshaker.HandshakeProtocol;
import io.grpc.alts.internal.Handshaker.HandshakerReq;
import io.grpc.alts.internal.Handshaker.Identity;
import io.grpc.alts.internal.Handshaker.StartClientHandshakeReq;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import java.nio.ByteBuffer;
import java.security.GeneralSecurityException;
import org.junit.Before;

View File

@ -18,7 +18,6 @@ package io.grpc.alts.internal;
import static com.google.common.truth.Truth.assertThat;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

View File

@ -21,9 +21,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import com.google.protobuf.ByteString;
import io.grpc.alts.internal.Handshaker.HandshakerReq;
import io.grpc.alts.internal.Handshaker.HandshakerResp;
import io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq;
import io.grpc.stub.StreamObserver;
import java.io.IOException;
import org.junit.Before;

View File

@ -27,7 +27,6 @@ import io.grpc.Attributes;
import io.grpc.Grpc;
import io.grpc.InternalChannelz;
import io.grpc.SecurityLevel;
import io.grpc.alts.internal.Handshaker.HandshakerResult;
import io.grpc.alts.internal.TsiFrameProtector.Consumer;
import io.grpc.alts.internal.TsiPeer.Property;
import io.grpc.internal.GrpcAttributes;

View File

@ -26,9 +26,6 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.google.protobuf.ByteString;
import io.grpc.alts.internal.Handshaker.HandshakerResult;
import io.grpc.alts.internal.Handshaker.Identity;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import java.nio.ByteBuffer;
import org.junit.Before;
import org.junit.Test;

View File

@ -20,9 +20,6 @@ import static org.junit.Assert.assertEquals;
import com.google.common.testing.GcFinalization;
import io.grpc.alts.internal.ByteBufTestUtils.RegisterRef;
import io.grpc.alts.internal.Handshaker.HandshakeProtocol;
import io.grpc.alts.internal.Handshaker.HandshakerReq;
import io.grpc.alts.internal.Handshaker.HandshakerResp;
import io.grpc.alts.internal.TsiTest.Handshakers;
import io.netty.buffer.ByteBuf;
import io.netty.util.ReferenceCounted;

View File

@ -20,10 +20,6 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.protobuf.ByteString;
import io.grpc.Status;
import io.grpc.alts.internal.Handshaker.HandshakerResp;
import io.grpc.alts.internal.Handshaker.HandshakerResult;
import io.grpc.alts.internal.Handshaker.HandshakerStatus;
import io.grpc.alts.internal.Handshaker.Identity;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.security.SecureRandom;

View File

@ -20,9 +20,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import io.grpc.alts.internal.RpcProtocolVersions.Version;
import io.grpc.alts.internal.RpcProtocolVersionsUtil.RpcVersionsCheckResult;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;