Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: lmp-el2go-auto-register: fix PKCS#11 slot initialization #850

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 14, 2022

  1. 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 <[email protected]>
    mwasilew committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    87d31aa View commit details
    Browse the repository at this point in the history