mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
Fix errNoCertificates
This commit is contained in:
parent
53b99efe78
commit
1f92b948c0
4 changed files with 14 additions and 2 deletions
|
@ -235,7 +235,7 @@ func getNewGetCertificateFunc(certs []*tls.Certificate, rejectUnknownSNI bool) f
|
|||
}
|
||||
}
|
||||
if rejectUnknownSNI {
|
||||
return nil, newError("reject unknown sni")
|
||||
return nil, errNoCertificates
|
||||
}
|
||||
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 {
|
||||
return nil, newError("reject unknown sni")
|
||||
return nil, errNoCertificates
|
||||
}
|
||||
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 a new issue