Nitrokey / pynitrokey

Python client for Nitrokey devices
Apache License 2.0
93 stars 28 forks source link

Add SE050_RAND_ERROR reporting in status #436

Closed sosthene-nitrokey closed 8 months ago

sosthene-nitrokey commented 9 months ago

This PR adds reporting of SE050 initialization errors as introduced in https://github.com/Nitrokey/nitrokey-3-firmware/pull/335/commits/0bc4cded9162635d86bf0b5541b71869b27c515c.

Relevant Output Example

UUID:               DF776FB18D7DFE800000000000000000
Firmware version:   v1.5.0-test.20230704
Init status:        UNKNOWN (0x10)
Free blocks (int):  255
Free blocks (ext):  473
Variant:            NRF52

Becomes

UUID:               DF776FB18D7DFE800000000000000000
Firmware version:   v1.5.0-test.20230704
Init status:        SE050_RAND_ERROR (0x10)
Free blocks (int):  255
Free blocks (ext):  473
Variant:            NRF52
sosthene-nitrokey commented 9 months ago

I don't see any other now. And indeed the error can include initialization errors.

Maybe it should be SE050_INIT_ERROR? I'm fine with either.

robin-nitrokey commented 9 months ago

As this is called InitStatus, I think we don’t need another INIT, but both options are fine for me.

sosthene-nitrokey commented 9 months ago

Ok!

I renamed it to SE050_ERROR.