mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-29 15:23:45 +00:00
feature/tpm: try opening /dev/tpmrm0 before /tmp/tpm0 on Linux (#16600)
The tpmrm0 is a kernel-managed version of tpm0 that multiplexes multiple concurrent connections. The basic tpm0 can only be accessed by one application at a time, which can be pretty unreliable. Updates #15830 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
parent
d1ceb62e27
commit
6c206fab58
@ -9,5 +9,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func open() (transport.TPMCloser, error) {
|
func open() (transport.TPMCloser, error) {
|
||||||
|
tpm, err := linuxtpm.Open("/dev/tpmrm0")
|
||||||
|
if err == nil {
|
||||||
|
return tpm, nil
|
||||||
|
}
|
||||||
return linuxtpm.Open("/dev/tpm0")
|
return linuxtpm.Open("/dev/tpm0")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user