def list_cert_bindings(site):
 ret = dict()
 sites = list_sites()
 if (site not in sites):
  _LOG.warning('Site not found: %s', site)
  return ret
 for binding in sites[site]['bindings']:
  if sites[site]['bindings'][binding]['certificatehash']:
   ret[binding] = sites[site]['bindings'][binding]
 if (not ret):
  _LOG.warning('No certificate bindings found for site: %s', site)
 return ret

def list_cert_bindings ( site ) : ret = dict ( ) sites = list_sites ( ) if ( site not in sites ) : _LOG . warning ( 'Site not found: %s' , site ) return ret for binding in sites [ site ] [ 'bindings' ] : if sites [ site ] [ 'bindings' ] [ binding ] [ 'certificatehash' ] : ret [ binding ] = sites [ site ] [ 'bindings' ] [ binding ] if ( not ret ) : _LOG . warning ( 'No certificate bindings found for site: %s' , site ) return ret
list certificate bindings for an iis site .