@@ -181,38 +181,21 @@ public static List<CurrentInventoryItem> GetIISBoundCertificates(Runspace runSpa
181181
182182 if ( foundCert == null ) continue ;
183183
184- var sniValue = "" ;
185- switch ( Convert . ToInt16 ( binding . Properties [ "sniFlg" ] ? . Value ) )
186- {
187- case 0 :
188- sniValue = "0 - No SNI" ;
189- break ;
190- case 1 :
191- sniValue = "1 - SNI Enabled" ;
192- break ;
193- case 2 :
194- sniValue = "2 - Non SNI Binding" ;
195- break ;
196- case 3 :
197- sniValue = "3 - SNI Binding" ;
198- break ;
199- }
200-
201184 var siteSettingsDict = new Dictionary < string , object >
202185 {
203186 { "SiteName" , binding . Properties [ "Name" ] ? . Value } ,
204187 { "Port" , binding . Properties [ "Bindings" ] ? . Value . ToString ( ) ? . Split ( ':' ) [ 1 ] } ,
205188 { "IPAddress" , binding . Properties [ "Bindings" ] ? . Value . ToString ( ) ? . Split ( ':' ) [ 0 ] } ,
206189 { "HostName" , binding . Properties [ "Bindings" ] ? . Value . ToString ( ) ? . Split ( ':' ) [ 2 ] } ,
207- { "SniFlag" , sniValue } ,
190+ { "SniFlag" , binding . Properties [ "sniFlg" ] ? . Value } ,
208191 { "Protocol" , binding . Properties [ "Protocol" ] ? . Value }
209192 } ;
210193
211194 myBoundCerts . Add (
212195 new CurrentInventoryItem
213196 {
214197 Certificates = new [ ] { foundCert . CertificateData } ,
215- Alias = thumbPrint ,
198+ Alias = thumbPrint + ":" + binding . Properties [ "Bindings" ] ? . Value . ToString ( ) ,
216199 PrivateKeyEntry = foundCert . HasPrivateKey ,
217200 UseChainLevel = false ,
218201 ItemStatus = OrchestratorInventoryItemStatus . Unknown ,
0 commit comments