Pol Henarejos
9cc934282c
Fix memory boundaries check.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-08-25 19:39:30 +02:00
Pol Henarejos
001d076fdf
Better check for XKEK content.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-04-17 19:42:23 +02:00
Pol Henarejos
35d5d5e94e
Use search_file() method.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-04-17 19:19:45 +02:00
Pol Henarejos
b034303193
Use new methods search_file() and file_put_data().
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-04-17 16:36:34 +02:00
Pol Henarejos
481cd5fd69
Some fixes for emulation.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-01-01 20:58:40 +01:00
Pol Henarejos
d82affa880
Added support for building emulation in Windows.
...
It has not been tested but it should not break any linux build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-01-01 01:55:49 +01:00
Pol Henarejos
6b1eeb4004
Fix DKEK import when no logged.
...
DKEK shall accept import even if it is not logged in. However, to store the DKEK, the PIN is used for MKEK, which is not available if it is nog logged in. I added a queueing system to store a pending DKEK after login.
Therefore, to import a DKEK, the user must import it AND call VERIFY command if it is not already logged in.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-10-12 17:42:31 +02:00
Pol Henarejos
5d21e39aa6
Fix deleting key domain.
...
It only checks if contains keys and no other files.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-10-12 17:40:20 +02:00
Pol Henarejos
11bb00e186
Default key domain is 0.
...
It allows to wrap keys not associated to any key domain.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-10-11 21:03:09 +02:00
Pol Henarejos
4e73723747
Fix checking key domain set.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-10 15:59:52 +01:00
Pol Henarejos
11e5338736
Check if key domain is not already initialized when initializing.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-09 20:09:32 +01:00
Pol Henarejos
bee6a7bb92
Return error if a non-initialized key domain is deleted.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-09 18:27:47 +01:00
Pol Henarejos
6aa8d37d07
If a key does not belong to any key domain, it cannot be wrapped.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-07 23:45:37 +01:00
Pol Henarejos
d81b21695f
If no key domain is found, 0 is used by default.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-07 23:15:50 +01:00
Pol Henarejos
cd6e280f4f
Switching to new style.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-02-15 00:10:35 +01:00
Pol Henarejos
daaa5bf402
Harmonize coding style.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-02-14 23:13:46 +01:00
Pol Henarejos
43a49d2a14
Return reference not found when deleting a key domain.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-02-14 18:51:30 +01:00
Pol Henarejos
3b9c2d159b
Fix returning existing key domain.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-02-14 18:47:43 +01:00
Pol Henarejos
691aa3308c
Fix when importing a dkek and it fails.
...
Now the dkek state is returned to the previous one.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-12-06 20:11:26 +01:00
Pol Henarejos
6a57e67629
Fix importing dkek twice.
...
It is not allowed anymore.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-12-06 20:04:18 +01:00
Pol Henarejos
202c8a4b22
Credentials are not necessary when importing DKEK.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-12-06 20:00:32 +01:00
Pol Henarejos
aebb68724a
Removing trailing spaces.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-08-19 01:44:27 +02:00
Pol Henarejos
fec02ca733
Removing cvcerts.h dependency.
...
A python script gets the public key of the device (EF_EE_DEV) and requests to our PKI for a CVC. Once got, it is updated to EF_TERMCA (0x2f02).
termca_pk is now on EF_KEY_DEV and termca is on EF_TERMCA (concat with DICA).
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-08-18 18:17:48 +02:00
Pol Henarejos
f79fe9f7d0
Fix when no DKEK is present.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-08-14 01:16:33 +02:00
Pol Henarejos
e6f082d512
Splitting cmd_xxx() functions in separate files.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-08-13 14:59:27 +02:00