File tree 2 files changed +14
-8
lines changed
jobs/describe_job_execution
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -124,10 +124,13 @@ int main(int argc, char *argv[])
124
124
exit (-1 );
125
125
}
126
126
127
- auto clientConfig = Aws::Iot::MqttClientConnectionConfigBuilder (certificatePath.c_str (), keyPath.c_str ())
128
- .WithEndpoint (endpoint)
129
- .WithCertificateAuthority (caFile.c_str ())
130
- .Build ();
127
+ auto clientConfigBuilder = Aws::Iot::MqttClientConnectionConfigBuilder (certificatePath.c_str (), keyPath.c_str ());
128
+ clientConfigBuilder.WithEndpoint (endpoint);
129
+ if (!caFile.empty ())
130
+ {
131
+ clientConfigBuilder.WithCertificateAuthority (caFile.c_str ());
132
+ }
133
+ auto clientConfig = clientConfigBuilder.Build ();
131
134
132
135
if (!clientConfig)
133
136
{
Original file line number Diff line number Diff line change @@ -164,10 +164,13 @@ int main(int argc, char *argv[])
164
164
exit (-1 );
165
165
}
166
166
167
- auto clientConfig = Aws::Iot::MqttClientConnectionConfigBuilder (certificatePath.c_str (), keyPath.c_str ())
168
- .WithEndpoint (endpoint)
169
- .WithCertificateAuthority (caFile.c_str ())
170
- .Build ();
167
+ auto clientConfigBuilder = Aws::Iot::MqttClientConnectionConfigBuilder (certificatePath.c_str (), keyPath.c_str ());
168
+ clientConfigBuilder.WithEndpoint (endpoint);
169
+ if (!caFile.empty ())
170
+ {
171
+ clientConfigBuilder.WithCertificateAuthority (caFile.c_str ());
172
+ }
173
+ auto clientConfig = clientConfigBuilder.Build ();
171
174
172
175
if (!clientConfig)
173
176
{
You can’t perform that action at this time.
0 commit comments