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

Creating object oriented contexts #88

Open
kathrynfejer opened this issue Nov 7, 2018 · 0 comments
Open

Creating object oriented contexts #88

kathrynfejer opened this issue Nov 7, 2018 · 0 comments

Comments

@kathrynfejer
Copy link
Contributor

Related to #78

In order to help the eventual separation of xtt using tpm and xtt without a tpm, we could create a group_context that abstracts away the implementation of daa (software or tpm) that we use.

Proposed changes to xtt_client_group_context:

struct xtt_client_group_context {
    xtt_group_id gid;
    unsigned char basename[MAX_BASENAME_LENGTH];
    struct xtt_signing_context_{tpm OR software_daa}; //this is the "private key"
}

struct xtt_signing_context_tpm {
    union {
        xtt_daa_credential_lrsw lrsw;
    } cred;
    TPM_HANDLE key_handle;
    char key_password[MAX_TPM_PASSWORD_LENGTH];
    uint16_t key_password_length;
    TSS2_TCTI_CONTEXT *tcti_context;
}

struct xtt_signing_context_software_daa { //better name to come
    union {
        xtt_daa_credential_lrsw lrsw;
    } cred;
    union {
        xtt_daa_priv_key_lrsw lrsw;
    } priv_key;
}

This should decrease the number of #ifdefs we need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant