-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lmp-el2go-auto-register: fix PKCS#11 slot initialization
This patch fixes the potential issues when running the auto-registration script on the device: 1. 1st slot gets overwritten If the 1st slot is not labeled 'aktualizr' and lmp-el2go-auto-register can't log into it with it's default PIN it would overwrite it. This might mean data loss for some othe deamon which initialized the slot 2. Objects not stored in proper slots When writing to pkcs#11 lmp-el2go-auto-register was not using the slot label consistently. This means that some objects were written in proper slot while some other not. This would only happen if the 1st slot (0x0) was initialized with default PIN. 3. has_labels method doesn't use slot label For this reason it would always try to access 1st slot (0x0) and ignore the label. If slot with label 'aktualizr' was initialized in different position this would mean the certificate/key objects would not be stored properly. Signed-off-by: Milosz Wasilewski <milosz.wasilewski@foundries.io>
- Loading branch information
Showing
1 changed file
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters