Elastacloud.AzureManagement.Fluent.Services.Classes.ServiceCertificate.GetExisting C# (CSharp) Method

GetExisting() public method

Gets an existing certificate given a thumbprint from the Local Stores
public GetExisting ( string thumbprint, string password ) : X509Certificate2
thumbprint string
password string
return System.Security.Cryptography.X509Certificates.X509Certificate2
        public X509Certificate2 GetExisting(string thumbprint, string password)
        {
            PvkPassword = password;
            return (Certificate = PublishSettingsExtractor.FromStore(thumbprint));
        }

Usage Example

        /// <summary>
        /// Given a thumbprint and password will search the local stores to find a certificate and associated private key
        /// </summary>
        IHostedServiceActivity IServiceCertificate.UploadExistingServiceCertificate(string thumbprint, string password)
        {
            ServiceCertificate = new ServiceCertificate(string.Empty);
            ServiceCertificate.GetExisting(thumbprint, password);

            return this;
        }