internal static KeyVaultCertificateIssuer FromIssuer(IssuerBundle issuer)
{
if (issuer == null)
{
return null;
}
var kvcIssuer = new KeyVaultCertificateIssuer
{
Name = issuer.IssuerIdentifier.Name,
IssuerProvider = issuer.Provider,
OrganizationDetails = KeyVaultCertificateOrganizationDetails.FromOrganizationalDetails(issuer.OrganizationDetails),
};
if (issuer.Credentials != null)
{
kvcIssuer.AccountId = issuer.Credentials.AccountId;
kvcIssuer.ApiKey = issuer.Credentials.Password == null ? null : issuer.Credentials.Password.ConvertToSecureString();
}
return kvcIssuer;
}
}