mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-02-15 05:53:14 +03:00
Commands: Use ".crt" & ".key" suffixes when generating TLS certificates
https://github.com/XTLS/Xray-core/issues/4313#issuecomment-2645844058
This commit is contained in:
parent
613c63b165
commit
925a985cc0
3
common/protocol/tls/cert/.gitignore
vendored
3
common/protocol/tls/cert/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
*.pem
|
*.crt
|
||||||
|
*.key
|
@ -78,9 +78,9 @@ func printJSON(certificate *Certificate) {
|
|||||||
func printFile(certificate *Certificate, name string) error {
|
func printFile(certificate *Certificate, name string) error {
|
||||||
certPEM, keyPEM := certificate.ToPEM()
|
certPEM, keyPEM := certificate.ToPEM()
|
||||||
return task.Run(context.Background(), func() error {
|
return task.Run(context.Background(), func() error {
|
||||||
return writeFile(certPEM, name+"_cert.pem")
|
return writeFile(certPEM, name+".crt")
|
||||||
}, func() error {
|
}, func() error {
|
||||||
return writeFile(keyPEM, name+"_key.pem")
|
return writeFile(keyPEM, name+".key")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,9 +120,9 @@ func writeFile(content []byte, name string) error {
|
|||||||
func printFile(certificate *cert.Certificate, name string) error {
|
func printFile(certificate *cert.Certificate, name string) error {
|
||||||
certPEM, keyPEM := certificate.ToPEM()
|
certPEM, keyPEM := certificate.ToPEM()
|
||||||
return task.Run(context.Background(), func() error {
|
return task.Run(context.Background(), func() error {
|
||||||
return writeFile(certPEM, name+"_cert.pem")
|
return writeFile(certPEM, name+".crt")
|
||||||
}, func() error {
|
}, func() error {
|
||||||
return writeFile(keyPEM, name+"_key.pem")
|
return writeFile(keyPEM, name+".key")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user