Microsoft.Azure.Commands.KeyVault.Models.KeyVaultCertificateIssuer.FromIssuer C# (CSharp) Method

FromIssuer() static private method

static private FromIssuer ( IssuerBundle issuer ) : KeyVaultCertificateIssuer
issuer IssuerBundle
return KeyVaultCertificateIssuer
        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;
        }
    }
KeyVaultCertificateIssuer