Commit Graph

5 Commits

Author SHA1 Message Date
Jean-Michel Picod
1c87efd27a Fix clippy warnings.
Because of libtock-rs we can't run clippy on our codebase. But it could
run at least on `build.rs`.
2020-03-02 15:14:50 +01:00
Jean-Michel Picod
ed6f408063 Address comments on pull-request 2020-02-20 17:09:08 +01:00
Jean-Michel Picod
6c363981c4 Better handling of OpenSSL generated keys.
It seems that ECC keys generated by OpenSSL can be between 30 and 33
bytes long whereas OpenSK code expects a fixed size of 32 bytes.
This variation could cause Travis CI to fail but also invalid ECC keys
to be flashed, causing the authenticator to not work.
2020-02-20 15:32:37 +01:00
Jean-Michel Picod
424d1e0be8 Rename "today" to "now" to reflects resolution is seconds. 2020-02-06 10:31:00 +01:00
Jean-Michel Picod
fdbfb1be2a Change the way private key and cert are embedded.
OpenSSL seems to serialize bigints as signed value, which means the ECC
key may end up being 33 bytes instead of the 32 bytes we're expecting,
causing build to fail.
The shell script extraction is now replaced by a build.rs script that
uses OpenSSL to extract the content and do sanity checks.
Forcing generating cryptographic materials now always generate a key and
a certificate (useful to compile/flash multiple keys without them being
considered as clones). The self-signed CA is left untouched.
2020-02-05 18:48:28 +01:00