public X509Certificate2 GetTrustedCertificate(string user, SecureString password) { try { return(_ssoAdminClient.GetTrustedCertificatesAsync( user, password).FirstOrDefault()); } catch (Exception ex) { _logger.LogError(ex.ToString()); throw; } }
//[Test] public void TestGetSsoTrustedCertificates() { // Act var certificates = _ssoAdminClient.GetTrustedCertificatesAsync( _authorizationUsername, _authorizationPassword); // Assert Assert.NotNull(certificates); Assert.GreaterOrEqual(1, certificates.Length); Assert.NotNull(certificates[0]); }