mirror of https://github.com/grpc/grpc-node.git
Apparently unset oneof is allowed
This commit is contained in:
parent
6965250011
commit
510d68140b
|
@ -165,6 +165,7 @@ function validateTransportSocket(context: XdsDecodeContext, transportSocket: Tra
|
|||
}
|
||||
const commonTlsContext = downstreamTlsContext.common_tls_context;
|
||||
let validationContext: CertificateValidationContext__Output | null = null;
|
||||
if (commonTlsContext.validation_context_type) {
|
||||
switch (commonTlsContext.validation_context_type) {
|
||||
case 'validation_context_sds_secret_config':
|
||||
errors.push('Unexpected DownstreamTlsContext.common_tls_context.validation_context_sds_secret_config');
|
||||
|
@ -186,6 +187,7 @@ function validateTransportSocket(context: XdsDecodeContext, transportSocket: Tra
|
|||
default:
|
||||
errors.push(`Unsupported DownstreamTlsContext.common_tls_context.validation_context_type: ${commonTlsContext.validation_context_type}`);
|
||||
}
|
||||
}
|
||||
if (downstreamTlsContext.require_client_certificate && !validationContext) {
|
||||
errors.push('DownstreamTlsContext.require_client_certificate set without any validationContext');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue