File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
projects/client/RabbitMQ.Client/src/client/api Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,19 @@ static X509Certificate CertificateSelectionCallback(object sender,
77
77
X509Certificate remoteCertificate ,
78
78
string [ ] acceptableIssuers )
79
79
{
80
- return localCertificates [ 0 ] ;
80
+ if ( acceptableIssuers != null && acceptableIssuers . Length > 0 &&
81
+ localCertificates != null && localCertificates . Count > 0 )
82
+ {
83
+ foreach ( X509Certificate certificate in localCertificates )
84
+ {
85
+ if ( Array . IndexOf ( acceptableIssuers , certificate . Issuer ) != - 1 )
86
+ return certificate ;
87
+ }
88
+ }
89
+ if ( localCertificates != null && localCertificates . Count > 0 )
90
+ return localCertificates [ 0 ] ;
91
+
92
+ return null ;
81
93
}
82
94
83
95
///<summary>Upgrade a Tcp stream to an Ssl stream using the SSL options
You can’t perform that action at this time.
0 commit comments