是否可以找到与所有Identity Server 4示例兼容的免费星级证书?

最佳答案

更改身份服务器配置以使用

 X509Certificate2 signingCertificate = null;
        using (var certStore = new X509Store(storeName: "My",
            storeLocation: StoreLocation.LocalMachine))
        {
            certStore.Open(OpenFlags.ReadOnly);
            signingCertificate = certStore.Certificates.Find(findType: X509FindType.FindByThumbprint,
                findValue: Regex.Replace(input: serverOptions.CertificateThumbPrint, pattern: @"[^\da-zA-z]", replacement: string.Empty).ToUpper(),
                validOnly: true).Count > 0 ?
                certStore.Certificates.Find(findType: X509FindType.FindByThumbprint,
                findValue: Regex.Replace(input: serverOptions.CertificateThumbPrint, pattern: @"[^\da-zA-z]",
                replacement: string.Empty).ToUpper(),
                validOnly: true)[0] : null;
        }


    .AddSigningCredential(signingCertificate)

关于ssl - Identity Server 4 Star SSL证书用于演示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47479042/

10-11 00:34