Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* MSPConfig collects all the configuration information for
* an MSP. The Config field should be unmarshalled in a way
* that depends on the Type
*
*
* Protobuf type {@code msp.MSPConfig}
*/
public static final class MSPConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:msp.MSPConfig)
MSPConfigOrBuilder {
// Use MSPConfig.newBuilder() to construct.
private MSPConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private MSPConfig() {
type_ = 0;
config_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private MSPConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
type_ = input.readInt32();
break;
}
case 18: {
config_ = 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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_MSPConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_MSPConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig.class, org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
*
* Type holds the type of the MSP; the default one would
* be of type FABRIC implementing an X.509 based provider
*
*
* optional int32 type = 1;
*/
public int getType() {
return type_;
}
public static final int CONFIG_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString config_;
/**
*
* Config is MSP dependent configuration info
*
*
* optional bytes config = 2;
*/
public com.google.protobuf.ByteString getConfig() {
return config_;
}
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 (type_ != 0) {
output.writeInt32(1, type_);
}
if (!config_.isEmpty()) {
output.writeBytes(2, config_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, type_);
}
if (!config_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, config_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig other = (org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig) obj;
boolean result = true;
result = result && (getType()
== other.getType());
result = result && getConfig()
.equals(other.getConfig());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType();
hash = (37 * hash) + CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getConfig().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig 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 org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig 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 org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig 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(org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig 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;
}
/**
*
* MSPConfig collects all the configuration information for
* an MSP. The Config field should be unmarshalled in a way
* that depends on the Type
*
*
* Protobuf type {@code msp.MSPConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:msp.MSPConfig)
org.hyperledger.fabric.protos.msp.MspConfig.MSPConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_MSPConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_MSPConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig.class, org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig.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();
type_ = 0;
config_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_MSPConfig_descriptor;
}
public org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig.getDefaultInstance();
}
public org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig build() {
org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig buildPartial() {
org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig result = new org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig(this);
result.type_ = type_;
result.config_ = config_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
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, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig) {
return mergeFrom((org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig other) {
if (other == org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig.getDefaultInstance()) return this;
if (other.getType() != 0) {
setType(other.getType());
}
if (other.getConfig() != com.google.protobuf.ByteString.EMPTY) {
setConfig(other.getConfig());
}
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 {
org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int type_ ;
/**
*
* Type holds the type of the MSP; the default one would
* be of type FABRIC implementing an X.509 based provider
*
*
* optional int32 type = 1;
*/
public int getType() {
return type_;
}
/**
*
* Type holds the type of the MSP; the default one would
* be of type FABRIC implementing an X.509 based provider
*
*
* optional bytes config = 2;
*/
public Builder clearConfig() {
config_ = getDefaultInstance().getConfig();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:msp.MSPConfig)
}
// @@protoc_insertion_point(class_scope:msp.MSPConfig)
private static final org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig();
}
public static org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public MSPConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MSPConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.msp.MspConfig.MSPConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FabricMSPConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:msp.FabricMSPConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
* FabricMSPConfig collects all the configuration information for
* a Fabric MSP.
* Here we assume a default certificate validation policy, where
* any certificate signed by any of the listed rootCA certs would
* be considered as valid under this MSP.
* This MSP may or may not come with a signing identity. If it does,
* it can also issue signing identities. If it does not, it can only
* be used to validate and verify certificates.
*
*
* Protobuf type {@code msp.FabricMSPConfig}
*/
public static final class FabricMSPConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:msp.FabricMSPConfig)
FabricMSPConfigOrBuilder {
// Use FabricMSPConfig.newBuilder() to construct.
private FabricMSPConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private FabricMSPConfig() {
name_ = "";
rootCerts_ = java.util.Collections.emptyList();
intermediateCerts_ = java.util.Collections.emptyList();
admins_ = java.util.Collections.emptyList();
revocationList_ = java.util.Collections.emptyList();
organizationalUnitIdentifiers_ = java.util.Collections.emptyList();
tlsRootCerts_ = java.util.Collections.emptyList();
tlsIntermediateCerts_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private FabricMSPConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
rootCerts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
rootCerts_.add(input.readBytes());
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
intermediateCerts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
intermediateCerts_.add(input.readBytes());
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
admins_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
admins_.add(input.readBytes());
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
revocationList_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
revocationList_.add(input.readBytes());
break;
}
case 50: {
org.hyperledger.fabric.protos.msp.MspConfig.SigningIdentityInfo.Builder subBuilder = null;
if (signingIdentity_ != null) {
subBuilder = signingIdentity_.toBuilder();
}
signingIdentity_ = input.readMessage(org.hyperledger.fabric.protos.msp.MspConfig.SigningIdentityInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(signingIdentity_);
signingIdentity_ = subBuilder.buildPartial();
}
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
organizationalUnitIdentifiers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
organizationalUnitIdentifiers_.add(
input.readMessage(org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.parser(), extensionRegistry));
break;
}
case 66: {
org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.Builder subBuilder = null;
if (cryptoConfig_ != null) {
subBuilder = cryptoConfig_.toBuilder();
}
cryptoConfig_ = input.readMessage(org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cryptoConfig_);
cryptoConfig_ = subBuilder.buildPartial();
}
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
tlsRootCerts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
tlsRootCerts_.add(input.readBytes());
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
tlsIntermediateCerts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000200;
}
tlsIntermediateCerts_.add(input.readBytes());
break;
}
case 90: {
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.Builder subBuilder = null;
if (fabricNodeOus_ != null) {
subBuilder = fabricNodeOus_.toBuilder();
}
fabricNodeOus_ = input.readMessage(org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fabricNodeOus_);
fabricNodeOus_ = subBuilder.buildPartial();
}
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 {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
rootCerts_ = java.util.Collections.unmodifiableList(rootCerts_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
intermediateCerts_ = java.util.Collections.unmodifiableList(intermediateCerts_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
admins_ = java.util.Collections.unmodifiableList(admins_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
revocationList_ = java.util.Collections.unmodifiableList(revocationList_);
}
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
organizationalUnitIdentifiers_ = java.util.Collections.unmodifiableList(organizationalUnitIdentifiers_);
}
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
tlsRootCerts_ = java.util.Collections.unmodifiableList(tlsRootCerts_);
}
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
tlsIntermediateCerts_ = java.util.Collections.unmodifiableList(tlsIntermediateCerts_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricMSPConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricMSPConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig.class, org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROOT_CERTS_FIELD_NUMBER = 2;
private java.util.List rootCerts_;
/**
*
* List of root certificates trusted by this MSP
* they are used upon certificate validation (see
* comment for IntermediateCerts below)
*
* List of root certificates trusted by this MSP
* they are used upon certificate validation (see
* comment for IntermediateCerts below)
*
*
* repeated bytes root_certs = 2;
*/
public int getRootCertsCount() {
return rootCerts_.size();
}
/**
*
* List of root certificates trusted by this MSP
* they are used upon certificate validation (see
* comment for IntermediateCerts below)
*
*
* repeated bytes root_certs = 2;
*/
public com.google.protobuf.ByteString getRootCerts(int index) {
return rootCerts_.get(index);
}
public static final int INTERMEDIATE_CERTS_FIELD_NUMBER = 3;
private java.util.List intermediateCerts_;
/**
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
*
* repeated bytes intermediate_certs = 3;
*/
public int getIntermediateCertsCount() {
return intermediateCerts_.size();
}
/**
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
*
* repeated bytes intermediate_certs = 3;
*/
public com.google.protobuf.ByteString getIntermediateCerts(int index) {
return intermediateCerts_.get(index);
}
public static final int ADMINS_FIELD_NUMBER = 4;
private java.util.List admins_;
/**
*
* Identity denoting the administrator of this MSP
*
* fabric_node_ous contains the configuration to distinguish clients from peers from orderers
* based on the OUs.
*
*
* optional .msp.FabricNodeOUs fabric_node_ous = 11;
*/
public org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUsOrBuilder getFabricNodeOusOrBuilder() {
return getFabricNodeOus();
}
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 (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < rootCerts_.size(); i++) {
output.writeBytes(2, rootCerts_.get(i));
}
for (int i = 0; i < intermediateCerts_.size(); i++) {
output.writeBytes(3, intermediateCerts_.get(i));
}
for (int i = 0; i < admins_.size(); i++) {
output.writeBytes(4, admins_.get(i));
}
for (int i = 0; i < revocationList_.size(); i++) {
output.writeBytes(5, revocationList_.get(i));
}
if (signingIdentity_ != null) {
output.writeMessage(6, getSigningIdentity());
}
for (int i = 0; i < organizationalUnitIdentifiers_.size(); i++) {
output.writeMessage(7, organizationalUnitIdentifiers_.get(i));
}
if (cryptoConfig_ != null) {
output.writeMessage(8, getCryptoConfig());
}
for (int i = 0; i < tlsRootCerts_.size(); i++) {
output.writeBytes(9, tlsRootCerts_.get(i));
}
for (int i = 0; i < tlsIntermediateCerts_.size(); i++) {
output.writeBytes(10, tlsIntermediateCerts_.get(i));
}
if (fabricNodeOus_ != null) {
output.writeMessage(11, getFabricNodeOus());
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
{
int dataSize = 0;
for (int i = 0; i < rootCerts_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(rootCerts_.get(i));
}
size += dataSize;
size += 1 * getRootCertsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < intermediateCerts_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(intermediateCerts_.get(i));
}
size += dataSize;
size += 1 * getIntermediateCertsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < admins_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(admins_.get(i));
}
size += dataSize;
size += 1 * getAdminsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < revocationList_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(revocationList_.get(i));
}
size += dataSize;
size += 1 * getRevocationListList().size();
}
if (signingIdentity_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getSigningIdentity());
}
for (int i = 0; i < organizationalUnitIdentifiers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, organizationalUnitIdentifiers_.get(i));
}
if (cryptoConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getCryptoConfig());
}
{
int dataSize = 0;
for (int i = 0; i < tlsRootCerts_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(tlsRootCerts_.get(i));
}
size += dataSize;
size += 1 * getTlsRootCertsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < tlsIntermediateCerts_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(tlsIntermediateCerts_.get(i));
}
size += dataSize;
size += 1 * getTlsIntermediateCertsList().size();
}
if (fabricNodeOus_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getFabricNodeOus());
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig other = (org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getRootCertsList()
.equals(other.getRootCertsList());
result = result && getIntermediateCertsList()
.equals(other.getIntermediateCertsList());
result = result && getAdminsList()
.equals(other.getAdminsList());
result = result && getRevocationListList()
.equals(other.getRevocationListList());
result = result && (hasSigningIdentity() == other.hasSigningIdentity());
if (hasSigningIdentity()) {
result = result && getSigningIdentity()
.equals(other.getSigningIdentity());
}
result = result && getOrganizationalUnitIdentifiersList()
.equals(other.getOrganizationalUnitIdentifiersList());
result = result && (hasCryptoConfig() == other.hasCryptoConfig());
if (hasCryptoConfig()) {
result = result && getCryptoConfig()
.equals(other.getCryptoConfig());
}
result = result && getTlsRootCertsList()
.equals(other.getTlsRootCertsList());
result = result && getTlsIntermediateCertsList()
.equals(other.getTlsIntermediateCertsList());
result = result && (hasFabricNodeOus() == other.hasFabricNodeOus());
if (hasFabricNodeOus()) {
result = result && getFabricNodeOus()
.equals(other.getFabricNodeOus());
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (getRootCertsCount() > 0) {
hash = (37 * hash) + ROOT_CERTS_FIELD_NUMBER;
hash = (53 * hash) + getRootCertsList().hashCode();
}
if (getIntermediateCertsCount() > 0) {
hash = (37 * hash) + INTERMEDIATE_CERTS_FIELD_NUMBER;
hash = (53 * hash) + getIntermediateCertsList().hashCode();
}
if (getAdminsCount() > 0) {
hash = (37 * hash) + ADMINS_FIELD_NUMBER;
hash = (53 * hash) + getAdminsList().hashCode();
}
if (getRevocationListCount() > 0) {
hash = (37 * hash) + REVOCATION_LIST_FIELD_NUMBER;
hash = (53 * hash) + getRevocationListList().hashCode();
}
if (hasSigningIdentity()) {
hash = (37 * hash) + SIGNING_IDENTITY_FIELD_NUMBER;
hash = (53 * hash) + getSigningIdentity().hashCode();
}
if (getOrganizationalUnitIdentifiersCount() > 0) {
hash = (37 * hash) + ORGANIZATIONAL_UNIT_IDENTIFIERS_FIELD_NUMBER;
hash = (53 * hash) + getOrganizationalUnitIdentifiersList().hashCode();
}
if (hasCryptoConfig()) {
hash = (37 * hash) + CRYPTO_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getCryptoConfig().hashCode();
}
if (getTlsRootCertsCount() > 0) {
hash = (37 * hash) + TLS_ROOT_CERTS_FIELD_NUMBER;
hash = (53 * hash) + getTlsRootCertsList().hashCode();
}
if (getTlsIntermediateCertsCount() > 0) {
hash = (37 * hash) + TLS_INTERMEDIATE_CERTS_FIELD_NUMBER;
hash = (53 * hash) + getTlsIntermediateCertsList().hashCode();
}
if (hasFabricNodeOus()) {
hash = (37 * hash) + FABRIC_NODE_OUS_FIELD_NUMBER;
hash = (53 * hash) + getFabricNodeOus().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig 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 org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig 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 org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig 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(org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig 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;
}
/**
*
* FabricMSPConfig collects all the configuration information for
* a Fabric MSP.
* Here we assume a default certificate validation policy, where
* any certificate signed by any of the listed rootCA certs would
* be considered as valid under this MSP.
* This MSP may or may not come with a signing identity. If it does,
* it can also issue signing identities. If it does not, it can only
* be used to validate and verify certificates.
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
*
* optional string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
* Name holds the identifier of the MSP; MSP identifier
* is chosen by the application that governs this MSP.
* For example, and assuming the default implementation of MSP,
* that is X.509-based and considers a single Issuer,
* this can refer to the Subject OU field or the Issuer OU field.
*
*
* optional string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.util.List rootCerts_ = java.util.Collections.emptyList();
private void ensureRootCertsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
rootCerts_ = new java.util.ArrayList(rootCerts_);
bitField0_ |= 0x00000002;
}
}
/**
*
* List of root certificates trusted by this MSP
* they are used upon certificate validation (see
* comment for IntermediateCerts below)
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
*
* repeated bytes intermediate_certs = 3;
*/
public int getIntermediateCertsCount() {
return intermediateCerts_.size();
}
/**
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
*
* repeated bytes intermediate_certs = 3;
*/
public Builder setIntermediateCerts(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureIntermediateCertsIsMutable();
intermediateCerts_.set(index, value);
onChanged();
return this;
}
/**
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
*
* repeated bytes intermediate_certs = 3;
*/
public Builder addIntermediateCerts(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureIntermediateCertsIsMutable();
intermediateCerts_.add(value);
onChanged();
return this;
}
/**
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
* List of intermediate certificates trusted by this MSP;
* they are used upon certificate validation as follows:
* validation attempts to build a path from the certificate
* to be validated (which is at one end of the path) and
* one of the certs in the RootCerts field (which is at
* the other end of the path). If the path is longer than
* 2, certificates in the middle are searched within the
* IntermediateCerts pool
*
* fabric_node_ous contains the configuration to distinguish clients from peers from orderers
* based on the OUs.
*
*
* optional .msp.FabricNodeOUs fabric_node_ous = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs, org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.Builder, org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUsOrBuilder>
getFabricNodeOusFieldBuilder() {
if (fabricNodeOusBuilder_ == null) {
fabricNodeOusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs, org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.Builder, org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUsOrBuilder>(
getFabricNodeOus(),
getParentForChildren(),
isClean());
fabricNodeOus_ = null;
}
return fabricNodeOusBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:msp.FabricMSPConfig)
}
// @@protoc_insertion_point(class_scope:msp.FabricMSPConfig)
private static final org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig();
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public FabricMSPConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FabricMSPConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricMSPConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FabricCryptoConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:msp.FabricCryptoConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
* FabricCryptoConfig contains configuration parameters
* for the cryptographic algorithms used by the MSP
* this configuration refers to
*
*
* Protobuf type {@code msp.FabricCryptoConfig}
*/
public static final class FabricCryptoConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:msp.FabricCryptoConfig)
FabricCryptoConfigOrBuilder {
// Use FabricCryptoConfig.newBuilder() to construct.
private FabricCryptoConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private FabricCryptoConfig() {
signatureHashFamily_ = "";
identityIdentifierHashFunction_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private FabricCryptoConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
signatureHashFamily_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
identityIdentifierHashFunction_ = 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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricCryptoConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricCryptoConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.class, org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.Builder.class);
}
public static final int SIGNATURE_HASH_FAMILY_FIELD_NUMBER = 1;
private volatile java.lang.Object signatureHashFamily_;
/**
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
*
* optional string signature_hash_family = 1;
*/
public com.google.protobuf.ByteString
getSignatureHashFamilyBytes() {
java.lang.Object ref = signatureHashFamily_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
signatureHashFamily_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IDENTITY_IDENTIFIER_HASH_FUNCTION_FIELD_NUMBER = 2;
private volatile java.lang.Object identityIdentifierHashFunction_;
/**
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
*
* optional string identity_identifier_hash_function = 2;
*/
public com.google.protobuf.ByteString
getIdentityIdentifierHashFunctionBytes() {
java.lang.Object ref = identityIdentifierHashFunction_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
identityIdentifierHashFunction_ = 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 (!getSignatureHashFamilyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signatureHashFamily_);
}
if (!getIdentityIdentifierHashFunctionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, identityIdentifierHashFunction_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSignatureHashFamilyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signatureHashFamily_);
}
if (!getIdentityIdentifierHashFunctionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, identityIdentifierHashFunction_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig other = (org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig) obj;
boolean result = true;
result = result && getSignatureHashFamily()
.equals(other.getSignatureHashFamily());
result = result && getIdentityIdentifierHashFunction()
.equals(other.getIdentityIdentifierHashFunction());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + SIGNATURE_HASH_FAMILY_FIELD_NUMBER;
hash = (53 * hash) + getSignatureHashFamily().hashCode();
hash = (37 * hash) + IDENTITY_IDENTIFIER_HASH_FUNCTION_FIELD_NUMBER;
hash = (53 * hash) + getIdentityIdentifierHashFunction().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig 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 org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig 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 org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig 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(org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig 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;
}
/**
*
* FabricCryptoConfig contains configuration parameters
* for the cryptographic algorithms used by the MSP
* this configuration refers to
*
*
* Protobuf type {@code msp.FabricCryptoConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:msp.FabricCryptoConfig)
org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricCryptoConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricCryptoConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.class, org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.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();
signatureHashFamily_ = "";
identityIdentifierHashFunction_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricCryptoConfig_descriptor;
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.getDefaultInstance();
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig build() {
org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig buildPartial() {
org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig result = new org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig(this);
result.signatureHashFamily_ = signatureHashFamily_;
result.identityIdentifierHashFunction_ = identityIdentifierHashFunction_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
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, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig) {
return mergeFrom((org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig other) {
if (other == org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig.getDefaultInstance()) return this;
if (!other.getSignatureHashFamily().isEmpty()) {
signatureHashFamily_ = other.signatureHashFamily_;
onChanged();
}
if (!other.getIdentityIdentifierHashFunction().isEmpty()) {
identityIdentifierHashFunction_ = other.identityIdentifierHashFunction_;
onChanged();
}
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 {
org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object signatureHashFamily_ = "";
/**
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
* SignatureHashFamily is a string representing the hash family to be used
* during sign and verify operations.
* Allowed values are "SHA2" and "SHA3".
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
* IdentityIdentifierHashFunction is a string representing the hash function
* to be used during the computation of the identity identifier of an MSP identity.
* Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
*
*
* optional string identity_identifier_hash_function = 2;
*/
public Builder setIdentityIdentifierHashFunctionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
identityIdentifierHashFunction_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:msp.FabricCryptoConfig)
}
// @@protoc_insertion_point(class_scope:msp.FabricCryptoConfig)
private static final org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig();
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public FabricCryptoConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FabricCryptoConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricCryptoConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface IdemixMSPConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:msp.IdemixMSPConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* organizational_unit_identifier defines the organizational unit the default signer is in
*
*
* optional string organizational_unit_identifier = 3;
*/
public com.google.protobuf.ByteString
getOrganizationalUnitIdentifierBytes() {
java.lang.Object ref = organizationalUnitIdentifier_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
organizationalUnitIdentifier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROLE_FIELD_NUMBER = 4;
private int role_;
/**
*
* role defines whether the default signer is admin, peer, member or client
*
*
* optional int32 role = 4;
*/
public int getRole() {
return role_;
}
public static final int ENROLLMENT_ID_FIELD_NUMBER = 5;
private volatile java.lang.Object enrollmentId_;
/**
*
* enrollment_id contains the enrollment id of this signer
*
* KeyInfo represents a (secret) key that is either already stored
* in the bccsp/keystore or key material to be imported to the
* bccsp key-store. In later versions it may contain also a
* keystore identifier
*
*
* Protobuf type {@code msp.KeyInfo}
*/
public static final class KeyInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:msp.KeyInfo)
KeyInfoOrBuilder {
// Use KeyInfo.newBuilder() to construct.
private KeyInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private KeyInfo() {
keyIdentifier_ = "";
keyMaterial_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private KeyInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
keyIdentifier_ = s;
break;
}
case 18: {
keyMaterial_ = 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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_KeyInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_KeyInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo.class, org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo.Builder.class);
}
public static final int KEY_IDENTIFIER_FIELD_NUMBER = 1;
private volatile java.lang.Object keyIdentifier_;
/**
*
* Identifier of the key inside the default keystore; this for
* the case of Software BCCSP as well as the HSM BCCSP would be
* the SKI of the key
*
* Identifier of the key inside the default keystore; this for
* the case of Software BCCSP as well as the HSM BCCSP would be
* the SKI of the key
*
*
* optional string key_identifier = 1;
*/
public com.google.protobuf.ByteString
getKeyIdentifierBytes() {
java.lang.Object ref = keyIdentifier_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyIdentifier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KEY_MATERIAL_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString keyMaterial_;
/**
*
* KeyMaterial (optional) for the key to be imported; this is
* properly encoded key bytes, prefixed by the type of the key
*
*
* optional bytes key_material = 2;
*/
public com.google.protobuf.ByteString getKeyMaterial() {
return keyMaterial_;
}
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 (!getKeyIdentifierBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyIdentifier_);
}
if (!keyMaterial_.isEmpty()) {
output.writeBytes(2, keyMaterial_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getKeyIdentifierBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyIdentifier_);
}
if (!keyMaterial_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, keyMaterial_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo other = (org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo) obj;
boolean result = true;
result = result && getKeyIdentifier()
.equals(other.getKeyIdentifier());
result = result && getKeyMaterial()
.equals(other.getKeyMaterial());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + KEY_IDENTIFIER_FIELD_NUMBER;
hash = (53 * hash) + getKeyIdentifier().hashCode();
hash = (37 * hash) + KEY_MATERIAL_FIELD_NUMBER;
hash = (53 * hash) + getKeyMaterial().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo 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 org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo 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 org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo 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(org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo 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;
}
/**
*
* KeyInfo represents a (secret) key that is either already stored
* in the bccsp/keystore or key material to be imported to the
* bccsp key-store. In later versions it may contain also a
* keystore identifier
*
*
* Protobuf type {@code msp.KeyInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:msp.KeyInfo)
org.hyperledger.fabric.protos.msp.MspConfig.KeyInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_KeyInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_KeyInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo.class, org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo.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();
keyIdentifier_ = "";
keyMaterial_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_KeyInfo_descriptor;
}
public org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo.getDefaultInstance();
}
public org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo build() {
org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo buildPartial() {
org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo result = new org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo(this);
result.keyIdentifier_ = keyIdentifier_;
result.keyMaterial_ = keyMaterial_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
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, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo) {
return mergeFrom((org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo other) {
if (other == org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo.getDefaultInstance()) return this;
if (!other.getKeyIdentifier().isEmpty()) {
keyIdentifier_ = other.keyIdentifier_;
onChanged();
}
if (other.getKeyMaterial() != com.google.protobuf.ByteString.EMPTY) {
setKeyMaterial(other.getKeyMaterial());
}
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 {
org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object keyIdentifier_ = "";
/**
*
* Identifier of the key inside the default keystore; this for
* the case of Software BCCSP as well as the HSM BCCSP would be
* the SKI of the key
*
* KeyMaterial (optional) for the key to be imported; this is
* properly encoded key bytes, prefixed by the type of the key
*
*
* optional bytes key_material = 2;
*/
public Builder clearKeyMaterial() {
keyMaterial_ = getDefaultInstance().getKeyMaterial();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:msp.KeyInfo)
}
// @@protoc_insertion_point(class_scope:msp.KeyInfo)
private static final org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo();
}
public static org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public KeyInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new KeyInfo(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.msp.MspConfig.KeyInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FabricOUIdentifierOrBuilder extends
// @@protoc_insertion_point(interface_extends:msp.FabricOUIdentifier)
com.google.protobuf.MessageOrBuilder {
/**
*
* Certificate represents the second certificate in a certification chain.
* (Notice that the first certificate in a certification chain is supposed
* to be the certificate of an identity).
* It must correspond to the certificate of root or intermediate CA
* recognized by the MSP this message belongs to.
* Starting from this certificate, a certification chain is computed
* and bound to the OrganizationUnitIdentifier specified
*
* FabricOUIdentifier represents an organizational unit and
* its related chain of trust identifier.
*
*
* Protobuf type {@code msp.FabricOUIdentifier}
*/
public static final class FabricOUIdentifier extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:msp.FabricOUIdentifier)
FabricOUIdentifierOrBuilder {
// Use FabricOUIdentifier.newBuilder() to construct.
private FabricOUIdentifier(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private FabricOUIdentifier() {
certificate_ = com.google.protobuf.ByteString.EMPTY;
organizationalUnitIdentifier_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private FabricOUIdentifier(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
certificate_ = input.readBytes();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
organizationalUnitIdentifier_ = 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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricOUIdentifier_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricOUIdentifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.class, org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.Builder.class);
}
public static final int CERTIFICATE_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString certificate_;
/**
*
* Certificate represents the second certificate in a certification chain.
* (Notice that the first certificate in a certification chain is supposed
* to be the certificate of an identity).
* It must correspond to the certificate of root or intermediate CA
* recognized by the MSP this message belongs to.
* Starting from this certificate, a certification chain is computed
* and bound to the OrganizationUnitIdentifier specified
*
*
* optional bytes certificate = 1;
*/
public com.google.protobuf.ByteString getCertificate() {
return certificate_;
}
public static final int ORGANIZATIONAL_UNIT_IDENTIFIER_FIELD_NUMBER = 2;
private volatile java.lang.Object organizationalUnitIdentifier_;
/**
*
* OrganizationUnitIdentifier defines the organizational unit under the
* MSP identified with MSPIdentifier
*
* OrganizationUnitIdentifier defines the organizational unit under the
* MSP identified with MSPIdentifier
*
*
* optional string organizational_unit_identifier = 2;
*/
public com.google.protobuf.ByteString
getOrganizationalUnitIdentifierBytes() {
java.lang.Object ref = organizationalUnitIdentifier_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
organizationalUnitIdentifier_ = 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 (!certificate_.isEmpty()) {
output.writeBytes(1, certificate_);
}
if (!getOrganizationalUnitIdentifierBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, organizationalUnitIdentifier_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!certificate_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, certificate_);
}
if (!getOrganizationalUnitIdentifierBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, organizationalUnitIdentifier_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier other = (org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier) obj;
boolean result = true;
result = result && getCertificate()
.equals(other.getCertificate());
result = result && getOrganizationalUnitIdentifier()
.equals(other.getOrganizationalUnitIdentifier());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER;
hash = (53 * hash) + getCertificate().hashCode();
hash = (37 * hash) + ORGANIZATIONAL_UNIT_IDENTIFIER_FIELD_NUMBER;
hash = (53 * hash) + getOrganizationalUnitIdentifier().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier 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 org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier 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 org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier 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(org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier 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;
}
/**
*
* FabricOUIdentifier represents an organizational unit and
* its related chain of trust identifier.
*
*
* Protobuf type {@code msp.FabricOUIdentifier}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:msp.FabricOUIdentifier)
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifierOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricOUIdentifier_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricOUIdentifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.class, org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.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();
certificate_ = com.google.protobuf.ByteString.EMPTY;
organizationalUnitIdentifier_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricOUIdentifier_descriptor;
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.getDefaultInstance();
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier build() {
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier buildPartial() {
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier result = new org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier(this);
result.certificate_ = certificate_;
result.organizationalUnitIdentifier_ = organizationalUnitIdentifier_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
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, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier) {
return mergeFrom((org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier other) {
if (other == org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.getDefaultInstance()) return this;
if (other.getCertificate() != com.google.protobuf.ByteString.EMPTY) {
setCertificate(other.getCertificate());
}
if (!other.getOrganizationalUnitIdentifier().isEmpty()) {
organizationalUnitIdentifier_ = other.organizationalUnitIdentifier_;
onChanged();
}
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 {
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString certificate_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Certificate represents the second certificate in a certification chain.
* (Notice that the first certificate in a certification chain is supposed
* to be the certificate of an identity).
* It must correspond to the certificate of root or intermediate CA
* recognized by the MSP this message belongs to.
* Starting from this certificate, a certification chain is computed
* and bound to the OrganizationUnitIdentifier specified
*
* Certificate represents the second certificate in a certification chain.
* (Notice that the first certificate in a certification chain is supposed
* to be the certificate of an identity).
* It must correspond to the certificate of root or intermediate CA
* recognized by the MSP this message belongs to.
* Starting from this certificate, a certification chain is computed
* and bound to the OrganizationUnitIdentifier specified
*
* Certificate represents the second certificate in a certification chain.
* (Notice that the first certificate in a certification chain is supposed
* to be the certificate of an identity).
* It must correspond to the certificate of root or intermediate CA
* recognized by the MSP this message belongs to.
* Starting from this certificate, a certification chain is computed
* and bound to the OrganizationUnitIdentifier specified
*
* FabricNodeOUs contains configuration to tell apart clients from peers from orderers
* based on OUs. If NodeOUs recognition is enabled then an msp identity
* that does not contain any of the specified OU will be considered invalid.
*
*
* Protobuf type {@code msp.FabricNodeOUs}
*/
public static final class FabricNodeOUs extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:msp.FabricNodeOUs)
FabricNodeOUsOrBuilder {
// Use FabricNodeOUs.newBuilder() to construct.
private FabricNodeOUs(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private FabricNodeOUs() {
enable_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private FabricNodeOUs(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
enable_ = input.readBool();
break;
}
case 18: {
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.Builder subBuilder = null;
if (clientOuIdentifier_ != null) {
subBuilder = clientOuIdentifier_.toBuilder();
}
clientOuIdentifier_ = input.readMessage(org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(clientOuIdentifier_);
clientOuIdentifier_ = subBuilder.buildPartial();
}
break;
}
case 26: {
org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.Builder subBuilder = null;
if (peerOuIdentifier_ != null) {
subBuilder = peerOuIdentifier_.toBuilder();
}
peerOuIdentifier_ = input.readMessage(org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(peerOuIdentifier_);
peerOuIdentifier_ = subBuilder.buildPartial();
}
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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricNodeOUs_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricNodeOUs_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.class, org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.Builder.class);
}
public static final int ENABLE_FIELD_NUMBER = 1;
private boolean enable_;
/**
*
* If true then an msp identity that does not contain any of the specified OU will be considered invalid.
*
*
* optional bool enable = 1;
*/
public boolean getEnable() {
return enable_;
}
public static final int CLIENT_OU_IDENTIFIER_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifier clientOuIdentifier_;
/**
*
*
* optional .msp.FabricOUIdentifier peer_ou_identifier = 3;
*/
public org.hyperledger.fabric.protos.msp.MspConfig.FabricOUIdentifierOrBuilder getPeerOuIdentifierOrBuilder() {
return getPeerOuIdentifier();
}
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 (enable_ != false) {
output.writeBool(1, enable_);
}
if (clientOuIdentifier_ != null) {
output.writeMessage(2, getClientOuIdentifier());
}
if (peerOuIdentifier_ != null) {
output.writeMessage(3, getPeerOuIdentifier());
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enable_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, enable_);
}
if (clientOuIdentifier_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getClientOuIdentifier());
}
if (peerOuIdentifier_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getPeerOuIdentifier());
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs other = (org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs) obj;
boolean result = true;
result = result && (getEnable()
== other.getEnable());
result = result && (hasClientOuIdentifier() == other.hasClientOuIdentifier());
if (hasClientOuIdentifier()) {
result = result && getClientOuIdentifier()
.equals(other.getClientOuIdentifier());
}
result = result && (hasPeerOuIdentifier() == other.hasPeerOuIdentifier());
if (hasPeerOuIdentifier()) {
result = result && getPeerOuIdentifier()
.equals(other.getPeerOuIdentifier());
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + ENABLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnable());
if (hasClientOuIdentifier()) {
hash = (37 * hash) + CLIENT_OU_IDENTIFIER_FIELD_NUMBER;
hash = (53 * hash) + getClientOuIdentifier().hashCode();
}
if (hasPeerOuIdentifier()) {
hash = (37 * hash) + PEER_OU_IDENTIFIER_FIELD_NUMBER;
hash = (53 * hash) + getPeerOuIdentifier().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs 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 org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs 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 org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs 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(org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs 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;
}
/**
*
* FabricNodeOUs contains configuration to tell apart clients from peers from orderers
* based on OUs. If NodeOUs recognition is enabled then an msp identity
* that does not contain any of the specified OU will be considered invalid.
*
*
* Protobuf type {@code msp.FabricNodeOUs}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:msp.FabricNodeOUs)
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricNodeOUs_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricNodeOUs_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.class, org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.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();
enable_ = false;
if (clientOuIdentifierBuilder_ == null) {
clientOuIdentifier_ = null;
} else {
clientOuIdentifier_ = null;
clientOuIdentifierBuilder_ = null;
}
if (peerOuIdentifierBuilder_ == null) {
peerOuIdentifier_ = null;
} else {
peerOuIdentifier_ = null;
peerOuIdentifierBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.internal_static_msp_FabricNodeOUs_descriptor;
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.getDefaultInstance();
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs build() {
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs buildPartial() {
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs result = new org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs(this);
result.enable_ = enable_;
if (clientOuIdentifierBuilder_ == null) {
result.clientOuIdentifier_ = clientOuIdentifier_;
} else {
result.clientOuIdentifier_ = clientOuIdentifierBuilder_.build();
}
if (peerOuIdentifierBuilder_ == null) {
result.peerOuIdentifier_ = peerOuIdentifier_;
} else {
result.peerOuIdentifier_ = peerOuIdentifierBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
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, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs) {
return mergeFrom((org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs other) {
if (other == org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs.getDefaultInstance()) return this;
if (other.getEnable() != false) {
setEnable(other.getEnable());
}
if (other.hasClientOuIdentifier()) {
mergeClientOuIdentifier(other.getClientOuIdentifier());
}
if (other.hasPeerOuIdentifier()) {
mergePeerOuIdentifier(other.getPeerOuIdentifier());
}
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 {
org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.msp.MspConfig.FabricNodeOUs) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private boolean enable_ ;
/**
*
* If true then an msp identity that does not contain any of the specified OU will be considered invalid.
*