Skip to content

Commit

Permalink
TLS is done except when root cert is not loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
fdenefaneo committed Feb 22, 2024
1 parent b021b6a commit f2929b6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ArmoniK.SDK.Client/src/ChannelPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,17 @@ ChannelPool::ChannelPool(Common::Properties properties, logger::Logger &logger)
tls_options.set_verify_server_certs(false);
tls_options.set_certificate_provider(
create_certificate_provider(root_cert_pem, user_public_pem, user_private_pem));
credentials_ = TlsCredentials(tls_options);
}
is_secure = true;
} else {
// TODO: certificats clients absents, le simple TLS.
TlsChannelCredentialsOptions tls_options;
tls_options.set_certificate_provider(
create_certificate_provider(root_cert_pem, user_public_pem, user_private_pem));
// FIXME: root certificate must be present if there is no client certificate.
tls_options.set_verify_server_certs(control_plane.isSslValidation());
credentials_ = TlsCredentials(tls_options);
}
is_secure = true;
} else {
credentials_ = grpc::InsecureChannelCredentials();
}
Expand Down

0 comments on commit f2929b6

Please sign in to comment.