Skip to content

Commit

Permalink
interfaces/u2f-devices: add Nitrokey 3
Browse files Browse the repository at this point in the history
Merge pull request #10937 from robin-nitrokey/u2f-nitrokey-3

This  adds the Nitrokey 3 to the list of U2F devices that is used to generate the UDEV rules.
  • Loading branch information
pedronis authored Oct 21, 2021
2 parents 5f2d0e1 + 9170832 commit bcbf7eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions interfaces/builtin/u2f_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ var u2fDevices = []u2fDevice{
VendorIDPattern: "20a0",
ProductIDPattern: "42b1",
},
{
Name: "Nitrokey 3",
VendorIDPattern: "20a0",
ProductIDPattern: "42b2",
},
{
Name: "Google Titan U2F",
VendorIDPattern: "18d1",
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/u2f_devices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (s *u2fDevicesInterfaceSuite) TestAppArmorSpec(c *C) {
func (s *u2fDevicesInterfaceSuite) TestUDevSpec(c *C) {
spec := &udev.Specification{}
c.Assert(spec.AddConnectedPlug(s.iface, s.plug, s.slot), IsNil)
c.Assert(spec.Snippets(), HasLen, 21)
c.Assert(spec.Snippets(), HasLen, 22)
c.Assert(spec.Snippets(), testutil.Contains, `# u2f-devices
# Yubico YubiKey
SUBSYSTEM=="hidraw", KERNEL=="hidraw*", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0113|0114|0115|0116|0120|0121|0200|0402|0403|0406|0407|0410", TAG+="snap_consumer_app"`)
Expand Down

0 comments on commit bcbf7eb

Please sign in to comment.