mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-17 12:33:01 +00:00
Fix errNoCertificates
This commit is contained in:
parent
53b99efe78
commit
1f92b948c0
@ -235,7 +235,7 @@ func getNewGetCertificateFunc(certs []*tls.Certificate, rejectUnknownSNI bool) f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if rejectUnknownSNI {
|
if rejectUnknownSNI {
|
||||||
return nil, newError("reject unknown sni")
|
return nil, errNoCertificates
|
||||||
}
|
}
|
||||||
return certs[0], nil
|
return certs[0], nil
|
||||||
}
|
}
|
||||||
|
6
transport/internet/tls/unsafe.go
Normal file
6
transport/internet/tls/unsafe.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package tls
|
||||||
|
|
||||||
|
import _ "unsafe"
|
||||||
|
|
||||||
|
//go:linkname errNoCertificates crypto/tls.errNoCertificates
|
||||||
|
var errNoCertificates error
|
@ -236,7 +236,7 @@ func getNewGetCertificateFunc(certs []*xtls.Certificate, rejectUnknownSNI bool)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if rejectUnknownSNI {
|
if rejectUnknownSNI {
|
||||||
return nil, newError("reject unknown sni")
|
return nil, errNoCertificates
|
||||||
}
|
}
|
||||||
return certs[0], nil
|
return certs[0], nil
|
||||||
}
|
}
|
||||||
|
6
transport/internet/xtls/unsafe.go
Normal file
6
transport/internet/xtls/unsafe.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package xtls
|
||||||
|
|
||||||
|
import _ "unsafe"
|
||||||
|
|
||||||
|
//go:linkname errNoCertificates crypto/tls.errNoCertificates
|
||||||
|
var errNoCertificates error
|
Loading…
Reference in New Issue
Block a user