Commit graph

27 commits

Author SHA1 Message Date
Pol Henarejos
dba614ed36
Relicense project under the GNU Affero General Public License v3 (AGPLv3)
and add the Enterprise / Commercial licensing option.

Main changes:
- Replace GPLv3 headers with AGPLv3 headers in source files.
- Update LICENSE file to the full AGPLv3 text.
- Add ENTERPRISE.md describing the dual-licensing model:
  * Community Edition: AGPLv3 (strong copyleft, including network use).
  * Enterprise / Commercial Edition: proprietary license for production /
    multi-user / OEM use without the obligation to disclose derivative code.
- Update README with a new "License and Commercial Use" section pointing to
  ENTERPRISE.md and clarifying how companies can obtain a commercial license.

Why this change:
- AGPLv3 ensures that modified versions offered as a service or deployed
  in production environments must provide corresponding source code.
- The Enterprise / Commercial edition provides organizations with an
  alternative proprietary license that allows internal, large-scale, or OEM
  use (bulk provisioning, policy enforcement, inventory / revocation,
  custom attestation, signed builds) without AGPL disclosure obligations.

This commit formally marks the first release that is dual-licensed:
AGPLv3 for the Community Edition and a proprietary commercial license
for Enterprise customers.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-26 20:18:45 +01:00
Pol Henarejos
3c6684cdab
Rename CCID_ codes to PICOKEY_
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-05 19:29:00 +01:00
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