Trust a self signed cert from IIS

后端 未结 1 690
小鲜肉
小鲜肉 2020-12-19 03:38

I have an externally hosted iis webserver where i run my website. I would like to add a self signed certificate to this website and trust it on my local client, to remove \"

相关标签:
1条回答
  • 2020-12-19 04:22

    There are multiple issues:

    1. IIS certificate generator creates self-signed certificates with SHA1 signature algorithm which is obsolete in modern browsers. You have to use different tools to create test certificates. For example, use PowerShell New-SelfSignedCertificate cmdlet where you can specify signature algorithm. Look at this post to get an example: https://stackoverflow.com/a/45284368/3997611
    New-SelfSignedCertificate `
        -DnsName "ABCD01" `
        -CertStoreLocation "cert:\LocalMachine\My" `
        -FriendlyName "test dev cert" `
        -TextExtension "2.5.29.37={text}1.3.6.1.5.5.7.3.1" `
        -KeyUsage DigitalSignature,KeyEncipherment,DataEncipherment `
        -Provider "Microsoft RSA SChannel Cryptographic Provider" `
        -HashAlgorithm "SHA256"
    
    1. IIS certificate generator cannot build certificate with SAN (Subject Alternative Names) certificate extension which is required in Google Chrome. You have to use different tools to create test certificates. Look at the example above for reference.

    2. Google Chrome uses built-in Windows Certificate store to establish a trust, while FireFox uses its own certificate store. Therefore, after adding the certificate to Windows certificate store, you have to import your test certificate to FireFox manually.

    0 讨论(0)
提交回复
热议问题