我想知道是否有办法为XAMPP生成新的SSL证书。我在firebug控制台中收到很多SHA-1警告,我认为这是因为使用了以sha1作为算法的SSL。
但是,我似乎无法找到如何使用更好的哈希生成新证书。如果我说的话毫无意义,请不要讨厌我,因为我之前从未使用过SSL证书。
另外,我无法抑制警告,因为我使用的是firebug,警告只是让我的POST文件更难找到。
答案 0 :(得分:4)
我按照那里的说明为127.0.0.1和localhost生成一个新的自签名证书:https://notepad.patheticcockroach.com/3054/how-to-create-and-install-an-apache-ssl-certificate-either-self-signed-or-not/ 我只需要添加" -sha256"作为生成CSR和签名的论据,基本上是:
openssl genrsa -des3 -out server.key 3072
openssl req -new -sha256 -key server.key -out server.csr
openssl x509 -req -sha256 -days 11000 -in server.csr -signkey server.key -out server.crt
然后使用这些文件替换位于apache \ conf \ ssl.crt,apache \ conf \ ssl.csr和apache \ conf \ ssl.key中的相同名称的文件
或者您可以使用我的文件:
这是server.crt:
-----BEGIN CERTIFICATE-----
MIIEajCCAtICCQCxKs9wwojDyDANBgkqhkiG9w0BAQsFADB3MQswCQYDVQQGEwJG
UjEOMAwGA1UECAwFUGFyaXMxHjAcBgNVBAoMFVBhdGhldGljQ29ja3JvYWNoLmNv
bTEaMBgGA1UECwwRRGF2aWQgRGVybm9uY291cnQxHDAaBgNVBAMMEzEyNy4wLjAu
MSxsb2NhbGhvc3QwHhcNMTUxMjEwMTQ1MTQxWhcNNDYwMTIxMTQ1MTQxWjB3MQsw
CQYDVQQGEwJGUjEOMAwGA1UECAwFUGFyaXMxHjAcBgNVBAoMFVBhdGhldGljQ29j
a3JvYWNoLmNvbTEaMBgGA1UECwwRRGF2aWQgRGVybm9uY291cnQxHDAaBgNVBAMM
EzEyNy4wLjAuMSxsb2NhbGhvc3QwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGK
AoIBgQDC3vBoD6QyB6mhZ2AgzPHGAMCq0RA3InzEPLBIvagT0IMuuyqlbZAZd1Wj
7lSD6G4q5Kx0rhLu1gYm3I19HWi8HdR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