File tree 2 files changed +4
-2
lines changed
src/OpenTelemetry.Exporter.OpenTelemetryProtocol
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ internal HttpClient AddCertificatesToHttpClient(HttpClientHandler handler)
273
273
chain . ChainPolicy . CustomTrustStore . Add ( trustedCertificate ) ;
274
274
return chain . Build ( cert ) ;
275
275
}
276
+
276
277
return false ;
277
278
} ;
278
279
}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public static Channel CreateChannel(this OtlpExporterOptions options)
42
42
string clientKeyPem = System . IO . File . ReadAllText ( options . ClientKeyFile ) ;
43
43
var keyPair = new KeyCertificatePair ( clientCertPem , clientKeyPem ) ;
44
44
45
- string ? rootCertPem = null ;
45
+ string rootCertPem = string . Empty ;
46
46
if ( ! string . IsNullOrEmpty ( options . CertificateFile ) )
47
47
{
48
48
rootCertPem = System . IO . File . ReadAllText ( options . CertificateFile ) ;
@@ -52,11 +52,12 @@ public static Channel CreateChannel(this OtlpExporterOptions options)
52
52
}
53
53
else
54
54
{
55
- string ? rootCertPem = null ;
55
+ string rootCertPem = string . Empty ;
56
56
if ( ! string . IsNullOrEmpty ( options . CertificateFile ) )
57
57
{
58
58
rootCertPem = System . IO . File . ReadAllText ( options . CertificateFile ) ;
59
59
}
60
+
60
61
channelCredentials = new SslCredentials ( rootCertPem ) ;
61
62
}
62
63
}
You can’t perform that action at this time.
0 commit comments