mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 12:49:20 +02: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 {
|
||||
return nil, newError("reject unknown sni")
|
||||
return nil, errNoCertificates
|
||||
}
|
||||
return certs[0], nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
package xtls
|
||||
|
||||
import _ "unsafe"
|
||||
|
||||
//go:linkname errNoCertificates crypto/tls.errNoCertificates
|
||||
var errNoCertificates error
|
Loading…
Reference in New Issue